about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-02-27 04:10:42 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-03-01 23:02:17 +0100
commit176fe3f8ac79e58e35793e6a92c75eed3c8e5b91 (patch)
treefa21c9074e37c5927f3908f71891a37aa6f95021 /src/test/ui/parser
parentbeac68a88711a90346ec8b68e3baefbec62b3b0d (diff)
downloadrust-176fe3f8ac79e58e35793e6a92c75eed3c8e5b91.tar.gz
rust-176fe3f8ac79e58e35793e6a92c75eed3c8e5b91.zip
encode `;` stmt w/o expr as `StmtKind::Empty`
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/attr-dangling-in-fn.stderr6
-rw-r--r--src/test/ui/parser/attr-stmt-expr-attr-bad.stderr8
-rw-r--r--src/test/ui/parser/doc-before-semi.rs2
-rw-r--r--src/test/ui/parser/doc-before-semi.stderr8
4 files changed, 7 insertions, 17 deletions
diff --git a/src/test/ui/parser/attr-dangling-in-fn.stderr b/src/test/ui/parser/attr-dangling-in-fn.stderr
index 71488d2e5c3..b1bb3ab3b17 100644
--- a/src/test/ui/parser/attr-dangling-in-fn.stderr
+++ b/src/test/ui/parser/attr-dangling-in-fn.stderr
@@ -1,8 +1,8 @@
 error: expected statement after outer attribute
-  --> $DIR/attr-dangling-in-fn.rs:5:1
+  --> $DIR/attr-dangling-in-fn.rs:4:3
    |
-LL | }
-   | ^
+LL |   #[foo = "bar"]
+   |   ^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr b/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr
index 4775b9b7bc0..b03db85422d 100644
--- a/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr
+++ b/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr
@@ -411,16 +411,16 @@ LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
    |                                  ^ expected one of `.`, `;`, `?`, or an operator
 
 error: expected statement after outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:114:44
+  --> $DIR/attr-stmt-expr-attr-bad.rs:114:37
    |
 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } }
-   |                                            ^
+   |                                     ^^^^^^^
 
 error: expected statement after outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:116:45
+  --> $DIR/attr-stmt-expr-attr-bad.rs:116:37
    |
 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } }
-   |                                             ^
+   |                                     ^^^^^^^
 
 error: aborting due to 57 previous errors
 
diff --git a/src/test/ui/parser/doc-before-semi.rs b/src/test/ui/parser/doc-before-semi.rs
index c3f478fe420..405a7e1e2a3 100644
--- a/src/test/ui/parser/doc-before-semi.rs
+++ b/src/test/ui/parser/doc-before-semi.rs
@@ -3,6 +3,4 @@ fn main() {
     //~^ ERROR found a documentation comment that doesn't document anything
     //~| HELP maybe a comment was intended
     ;
-    //~^ WARNING unnecessary trailing semicolon
-    //~| HELP remove this semicolon
 }
diff --git a/src/test/ui/parser/doc-before-semi.stderr b/src/test/ui/parser/doc-before-semi.stderr
index b9ac30b09b2..e6bade18d0a 100644
--- a/src/test/ui/parser/doc-before-semi.stderr
+++ b/src/test/ui/parser/doc-before-semi.stderr
@@ -6,14 +6,6 @@ LL |     /// hi
    |
    = help: doc comments must come before what they document, maybe a comment was intended with `//`?
 
-warning: unnecessary trailing semicolon
-  --> $DIR/doc-before-semi.rs:5:5
-   |
-LL |     ;
-   |     ^ help: remove this semicolon
-   |
-   = note: `#[warn(redundant_semicolon)]` on by default
-
 error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0585`.