about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/dyn-trait-compatibility.rs2
-rw-r--r--tests/ui/parser/dyn-trait-compatibility.stderr16
-rw-r--r--tests/ui/parser/extern-crate-async.rs3
-rw-r--r--tests/ui/parser/fn-field-parse-error-ice.rs1
-rw-r--r--tests/ui/parser/fn-field-parse-error-ice.stderr6
-rw-r--r--tests/ui/parser/issues/issue-114219.rs2
-rw-r--r--tests/ui/parser/issues/issue-114219.stderr2
-rw-r--r--tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs2
-rw-r--r--tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr6
9 files changed, 24 insertions, 16 deletions
diff --git a/tests/ui/parser/dyn-trait-compatibility.rs b/tests/ui/parser/dyn-trait-compatibility.rs
index 717b14c5941..c6e84284fbe 100644
--- a/tests/ui/parser/dyn-trait-compatibility.rs
+++ b/tests/ui/parser/dyn-trait-compatibility.rs
@@ -1,3 +1,5 @@
+//@ edition: 2015
+
 type A0 = dyn;
 //~^ ERROR cannot find type `dyn` in this scope
 type A1 = dyn::dyn;
diff --git a/tests/ui/parser/dyn-trait-compatibility.stderr b/tests/ui/parser/dyn-trait-compatibility.stderr
index 08e0a50010a..a57c033c1e1 100644
--- a/tests/ui/parser/dyn-trait-compatibility.stderr
+++ b/tests/ui/parser/dyn-trait-compatibility.stderr
@@ -1,47 +1,47 @@
 error[E0412]: cannot find type `dyn` in this scope
-  --> $DIR/dyn-trait-compatibility.rs:1:11
+  --> $DIR/dyn-trait-compatibility.rs:3:11
    |
 LL | type A0 = dyn;
    |           ^^^ not found in this scope
 
 error[E0412]: cannot find type `dyn` in this scope
-  --> $DIR/dyn-trait-compatibility.rs:5:11
+  --> $DIR/dyn-trait-compatibility.rs:7:11
    |
 LL | type A2 = dyn<dyn, dyn>;
    |           ^^^ not found in this scope
 
 error[E0412]: cannot find type `dyn` in this scope
-  --> $DIR/dyn-trait-compatibility.rs:5:15
+  --> $DIR/dyn-trait-compatibility.rs:7:15
    |
 LL | type A2 = dyn<dyn, dyn>;
    |               ^^^ not found in this scope
 
 error[E0412]: cannot find type `dyn` in this scope
-  --> $DIR/dyn-trait-compatibility.rs:5:20
+  --> $DIR/dyn-trait-compatibility.rs:7:20
    |
 LL | type A2 = dyn<dyn, dyn>;
    |                    ^^^ not found in this scope
 
 error[E0412]: cannot find type `dyn` in this scope
-  --> $DIR/dyn-trait-compatibility.rs:9:11
+  --> $DIR/dyn-trait-compatibility.rs:11:11
    |
 LL | type A3 = dyn<<dyn as dyn>::dyn>;
    |           ^^^ not found in this scope
 
 error[E0405]: cannot find trait `dyn` in this scope
-  --> $DIR/dyn-trait-compatibility.rs:9:23
+  --> $DIR/dyn-trait-compatibility.rs:11:23
    |
 LL | type A3 = dyn<<dyn as dyn>::dyn>;
    |                       ^^^ not found in this scope
 
 error[E0412]: cannot find type `dyn` in this scope
-  --> $DIR/dyn-trait-compatibility.rs:9:16
+  --> $DIR/dyn-trait-compatibility.rs:11:16
    |
 LL | type A3 = dyn<<dyn as dyn>::dyn>;
    |                ^^^ not found in this scope
 
 error[E0433]: failed to resolve: use of unresolved module or unlinked crate `dyn`
-  --> $DIR/dyn-trait-compatibility.rs:3:11
+  --> $DIR/dyn-trait-compatibility.rs:5:11
    |
 LL | type A1 = dyn::dyn;
    |           ^^^ use of unresolved module or unlinked crate `dyn`
diff --git a/tests/ui/parser/extern-crate-async.rs b/tests/ui/parser/extern-crate-async.rs
index 529e0f1ab5c..13bd786d092 100644
--- a/tests/ui/parser/extern-crate-async.rs
+++ b/tests/ui/parser/extern-crate-async.rs
@@ -1,6 +1,7 @@
-// Make sure that we don't parse `extern crate async`
+// Make sure that we don't parse `extern crate async` as
 // the front matter of a function leading us astray.
 
+//@ edition: 2015
 //@ check-pass
 
 fn main() {}
diff --git a/tests/ui/parser/fn-field-parse-error-ice.rs b/tests/ui/parser/fn-field-parse-error-ice.rs
index 188257ea53a..f1bc561b89f 100644
--- a/tests/ui/parser/fn-field-parse-error-ice.rs
+++ b/tests/ui/parser/fn-field-parse-error-ice.rs
@@ -1,4 +1,5 @@
 // Regression test for #85794
+//@ edition: 2015
 
 struct Baz {
     inner : dyn fn ()
diff --git a/tests/ui/parser/fn-field-parse-error-ice.stderr b/tests/ui/parser/fn-field-parse-error-ice.stderr
index 3bf68e8cc04..6f033e2b0c6 100644
--- a/tests/ui/parser/fn-field-parse-error-ice.stderr
+++ b/tests/ui/parser/fn-field-parse-error-ice.stderr
@@ -1,11 +1,11 @@
 error: expected `,`, or `}`, found keyword `fn`
-  --> $DIR/fn-field-parse-error-ice.rs:4:16
+  --> $DIR/fn-field-parse-error-ice.rs:5:16
    |
 LL |     inner : dyn fn ()
    |                ^ help: try adding a comma: `,`
 
 error: expected identifier, found keyword `fn`
-  --> $DIR/fn-field-parse-error-ice.rs:4:17
+  --> $DIR/fn-field-parse-error-ice.rs:5:17
    |
 LL | struct Baz {
    |        --- while parsing this struct
@@ -18,7 +18,7 @@ LL |     inner : dyn r#fn ()
    |                 ++
 
 error[E0412]: cannot find type `dyn` in this scope
-  --> $DIR/fn-field-parse-error-ice.rs:4:13
+  --> $DIR/fn-field-parse-error-ice.rs:5:13
    |
 LL |     inner : dyn fn ()
    |             ^^^ not found in this scope
diff --git a/tests/ui/parser/issues/issue-114219.rs b/tests/ui/parser/issues/issue-114219.rs
index 332258b628c..3f7e0f685ac 100644
--- a/tests/ui/parser/issues/issue-114219.rs
+++ b/tests/ui/parser/issues/issue-114219.rs
@@ -1,3 +1,5 @@
+//@ edition: 2015
+
 fn main() {
     async move {};
     //~^ ERROR `async move` blocks are only allowed in Rust 2018 or later
diff --git a/tests/ui/parser/issues/issue-114219.stderr b/tests/ui/parser/issues/issue-114219.stderr
index 02323cb99cb..1243ef8b180 100644
--- a/tests/ui/parser/issues/issue-114219.stderr
+++ b/tests/ui/parser/issues/issue-114219.stderr
@@ -1,5 +1,5 @@
 error: `async move` blocks are only allowed in Rust 2018 or later
-  --> $DIR/issue-114219.rs:2:5
+  --> $DIR/issue-114219.rs:4:5
    |
 LL |     async move {};
    |     ^^^^^^^^^^
diff --git a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs
index b9e3c5783eb..b78832bbe3d 100644
--- a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs
+++ b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.rs
@@ -1,3 +1,5 @@
+//@ edition: 2015
+
 trait Trait {}
 
 fn test(_: &for<'a> dyn Trait) {}
diff --git a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr
index a012220e8c7..3745cf8b077 100644
--- a/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr
+++ b/tests/ui/parser/recover-hrtb-before-dyn-impl-kw.stderr
@@ -1,5 +1,5 @@
 error: `for<...>` expected after `dyn`, not before
-  --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:3:21
+  --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:5:21
    |
 LL | fn test(_: &for<'a> dyn Trait) {}
    |                     ^^^
@@ -11,7 +11,7 @@ LL + fn test(_: &dyn for<'a> Trait) {}
    |
 
 error: `for<...>` expected after `impl`, not before
-  --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:6:21
+  --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:8:21
    |
 LL | fn test2(_: for<'a> impl Trait) {}
    |                     ^^^^
@@ -23,7 +23,7 @@ LL + fn test2(_: impl for<'a> Trait) {}
    |
 
 error: expected identifier, found `>`
-  --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:10:24
+  --> $DIR/recover-hrtb-before-dyn-impl-kw.rs:12:24
    |
 LL | type A2 = dyn<for<> dyn>;
    |                        ^ expected identifier