about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/resolve/extern-prelude-fail.rs1
-rw-r--r--tests/ui/resolve/extern-prelude-fail.stderr4
-rw-r--r--tests/ui/resolve/resolve-bad-visibility.rs1
-rw-r--r--tests/ui/resolve/resolve-bad-visibility.stderr10
-rw-r--r--tests/ui/resolve/suggest-builder-fn.rs2
-rw-r--r--tests/ui/resolve/unresolved-segments-visibility.rs2
-rw-r--r--tests/ui/resolve/unresolved-segments-visibility.stderr6
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr8
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-empty-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr12
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-nested-paths.stderr10
-rw-r--r--tests/ui/rust-2018/edition-lint-paths.fixed1
-rw-r--r--tests/ui/rust-2018/edition-lint-paths.rs1
-rw-r--r--tests/ui/rust-2018/edition-lint-paths.stderr20
-rw-r--r--tests/ui/rust-2018/extern-crate-rename.fixed1
-rw-r--r--tests/ui/rust-2018/extern-crate-rename.rs1
-rw-r--r--tests/ui/rust-2018/extern-crate-rename.stderr4
-rw-r--r--tests/ui/rust-2018/extern-crate-submod.fixed1
-rw-r--r--tests/ui/rust-2018/extern-crate-submod.rs1
-rw-r--r--tests/ui/rust-2018/extern-crate-submod.stderr4
-rw-r--r--tests/ui/rust-2018/try-ident.fixed1
-rw-r--r--tests/ui/rust-2018/try-ident.rs1
-rw-r--r--tests/ui/rust-2018/try-ident.stderr6
-rw-r--r--tests/ui/rust-2018/try-macro.fixed1
-rw-r--r--tests/ui/rust-2018/try-macro.rs1
-rw-r--r--tests/ui/rust-2018/try-macro.stderr4
-rw-r--r--tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs2
-rw-r--r--tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr4
-rw-r--r--tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs1
-rw-r--r--tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr8
-rw-r--r--tests/ui/suggestions/issue-116434-2015.rs2
-rw-r--r--tests/ui/suggestions/issue-116434-2015.stderr14
-rw-r--r--tests/ui/suggestions/issue-61963.rs1
-rw-r--r--tests/ui/suggestions/issue-61963.stderr6
-rw-r--r--tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed1
-rw-r--r--tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs1
-rw-r--r--tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr2
-rw-r--r--tests/ui/traits/const-traits/mbe-dyn-const-2015.rs1
43 files changed, 90 insertions, 63 deletions
diff --git a/tests/ui/resolve/extern-prelude-fail.rs b/tests/ui/resolve/extern-prelude-fail.rs
index c0716f1ebf5..7d0df03e57b 100644
--- a/tests/ui/resolve/extern-prelude-fail.rs
+++ b/tests/ui/resolve/extern-prelude-fail.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ compile-flags:--extern extern_prelude
 //@ aux-build:extern-prelude.rs
 
diff --git a/tests/ui/resolve/extern-prelude-fail.stderr b/tests/ui/resolve/extern-prelude-fail.stderr
index 199a31244c0..b9668154f44 100644
--- a/tests/ui/resolve/extern-prelude-fail.stderr
+++ b/tests/ui/resolve/extern-prelude-fail.stderr
@@ -1,5 +1,5 @@
 error[E0432]: unresolved import `extern_prelude`
-  --> $DIR/extern-prelude-fail.rs:7:9
+  --> $DIR/extern-prelude-fail.rs:8:9
    |
 LL |     use extern_prelude::S;
    |         ^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `extern_prelude`
@@ -10,7 +10,7 @@ LL + extern crate extern_prelude;
    |
 
 error[E0433]: failed to resolve: use of unresolved module or unlinked crate `extern_prelude`
-  --> $DIR/extern-prelude-fail.rs:8:15
+  --> $DIR/extern-prelude-fail.rs:9:15
    |
 LL |     let s = ::extern_prelude::S;
    |               ^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `extern_prelude`
diff --git a/tests/ui/resolve/resolve-bad-visibility.rs b/tests/ui/resolve/resolve-bad-visibility.rs
index 7d48bb97b10..81635611fca 100644
--- a/tests/ui/resolve/resolve-bad-visibility.rs
+++ b/tests/ui/resolve/resolve-bad-visibility.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 enum E {}
 trait Tr {}
 
diff --git a/tests/ui/resolve/resolve-bad-visibility.stderr b/tests/ui/resolve/resolve-bad-visibility.stderr
index ac7e1c735b1..c7bbdfbd249 100644
--- a/tests/ui/resolve/resolve-bad-visibility.stderr
+++ b/tests/ui/resolve/resolve-bad-visibility.stderr
@@ -1,23 +1,23 @@
 error[E0577]: expected module, found enum `E`
-  --> $DIR/resolve-bad-visibility.rs:4:8
+  --> $DIR/resolve-bad-visibility.rs:5:8
    |
 LL | pub(in E) struct S;
    |        ^ not a module
 
 error[E0577]: expected module, found trait `Tr`
-  --> $DIR/resolve-bad-visibility.rs:5:8
+  --> $DIR/resolve-bad-visibility.rs:6:8
    |
 LL | pub(in Tr) struct Z;
    |        ^^ not a module
 
 error[E0742]: visibilities can only be restricted to ancestor modules
-  --> $DIR/resolve-bad-visibility.rs:6:8
+  --> $DIR/resolve-bad-visibility.rs:7:8
    |
 LL | pub(in std::vec) struct F;
    |        ^^^^^^^^
 
 error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
-  --> $DIR/resolve-bad-visibility.rs:7:8
+  --> $DIR/resolve-bad-visibility.rs:8:8
    |
 LL | pub(in nonexistent) struct G;
    |        ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
@@ -28,7 +28,7 @@ LL + extern crate nonexistent;
    |
 
 error[E0433]: failed to resolve: use of unresolved module or unlinked crate `too_soon`
-  --> $DIR/resolve-bad-visibility.rs:8:8
+  --> $DIR/resolve-bad-visibility.rs:9:8
    |
 LL | pub(in too_soon) struct H;
    |        ^^^^^^^^ use of unresolved module or unlinked crate `too_soon`
diff --git a/tests/ui/resolve/suggest-builder-fn.rs b/tests/ui/resolve/suggest-builder-fn.rs
index 0d9b35549a4..959675ef2c9 100644
--- a/tests/ui/resolve/suggest-builder-fn.rs
+++ b/tests/ui/resolve/suggest-builder-fn.rs
@@ -32,7 +32,7 @@ impl Bar {
 }
 
 mod SomeMod {
-    use Bar;
+    use crate::Bar;
 
     impl Bar {
         // Public method. Should be suggested
diff --git a/tests/ui/resolve/unresolved-segments-visibility.rs b/tests/ui/resolve/unresolved-segments-visibility.rs
index c26171f75d2..fc86b31adfc 100644
--- a/tests/ui/resolve/unresolved-segments-visibility.rs
+++ b/tests/ui/resolve/unresolved-segments-visibility.rs
@@ -5,7 +5,7 @@ extern crate alloc as b;
 
 mod foo {
     mod bar {
-        pub(in b::string::String::newy) extern crate alloc as e;
+        pub(in crate::b::string::String::newy) extern crate alloc as e;
         //~^ ERROR failed to resolve: `String` is a struct, not a module [E0433]
     }
 }
diff --git a/tests/ui/resolve/unresolved-segments-visibility.stderr b/tests/ui/resolve/unresolved-segments-visibility.stderr
index 09f3c50258d..082579c9fa1 100644
--- a/tests/ui/resolve/unresolved-segments-visibility.stderr
+++ b/tests/ui/resolve/unresolved-segments-visibility.stderr
@@ -1,8 +1,8 @@
 error[E0433]: failed to resolve: `String` is a struct, not a module
-  --> $DIR/unresolved-segments-visibility.rs:8:27
+  --> $DIR/unresolved-segments-visibility.rs:8:34
    |
-LL |         pub(in b::string::String::newy) extern crate alloc as e;
-   |                           ^^^^^^ `String` is a struct, not a module
+LL |         pub(in crate::b::string::String::newy) extern crate alloc as e;
+   |                                  ^^^^^^ `String` is a struct, not a module
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
index fbe415e2e10..d685c4944ba 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 
 #![deny(absolute_paths_not_starting_with_crate)]
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
index 72a212453cd..7a5ecf2720a 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 
 #![deny(absolute_paths_not_starting_with_crate)]
diff --git a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
index 036b9ccab4f..c0a322edcd6 100644
--- a/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr
@@ -1,5 +1,5 @@
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-fully-qualified-paths.rs:18:25
+  --> $DIR/edition-lint-fully-qualified-paths.rs:19:25
    |
 LL |     let _: <foo::Baz as ::foo::Foo>::Bar = ();
    |                         ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo`
@@ -7,13 +7,13 @@ LL |     let _: <foo::Baz as ::foo::Foo>::Bar = ();
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 note: the lint level is defined here
-  --> $DIR/edition-lint-fully-qualified-paths.rs:3:9
+  --> $DIR/edition-lint-fully-qualified-paths.rs:4:9
    |
 LL | #![deny(absolute_paths_not_starting_with_crate)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-fully-qualified-paths.rs:18:25
+  --> $DIR/edition-lint-fully-qualified-paths.rs:19:25
    |
 LL |     let _: <foo::Baz as ::foo::Foo>::Bar = ();
    |                         ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo`
@@ -23,7 +23,7 @@ LL |     let _: <foo::Baz as ::foo::Foo>::Bar = ();
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-fully-qualified-paths.rs:24:13
+  --> $DIR/edition-lint-fully-qualified-paths.rs:25:13
    |
 LL |     let _: <::foo::Baz as foo::Foo>::Bar = ();
    |             ^^^^^^^^^^ help: use `crate`: `crate::foo::Baz`
diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed
index 7ec421099c7..4a584a55e64 100644
--- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 
 #![deny(absolute_paths_not_starting_with_crate)]
diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs
index 135908c8aef..2baafbd9704 100644
--- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 
 #![deny(absolute_paths_not_starting_with_crate)]
diff --git a/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr b/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr
index 4174c2fa9ad..041572be844 100644
--- a/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr
@@ -1,5 +1,5 @@
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-empty-paths.rs:16:5
+  --> $DIR/edition-lint-nested-empty-paths.rs:17:5
    |
 LL | use foo::{bar::{baz::{}}};
    |     ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}}}`
@@ -7,13 +7,13 @@ LL | use foo::{bar::{baz::{}}};
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 note: the lint level is defined here
-  --> $DIR/edition-lint-nested-empty-paths.rs:3:9
+  --> $DIR/edition-lint-nested-empty-paths.rs:4:9
    |
 LL | #![deny(absolute_paths_not_starting_with_crate)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-empty-paths.rs:20:5
+  --> $DIR/edition-lint-nested-empty-paths.rs:21:5
    |
 LL | use foo::{bar::{XX, baz::{}}};
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}`
@@ -22,7 +22,7 @@ LL | use foo::{bar::{XX, baz::{}}};
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-empty-paths.rs:20:5
+  --> $DIR/edition-lint-nested-empty-paths.rs:21:5
    |
 LL | use foo::{bar::{XX, baz::{}}};
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}`
@@ -32,7 +32,7 @@ LL | use foo::{bar::{XX, baz::{}}};
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-empty-paths.rs:26:5
+  --> $DIR/edition-lint-nested-empty-paths.rs:27:5
    |
 LL | use foo::{bar::{baz::{}, baz1::{}}};
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}`
@@ -41,7 +41,7 @@ LL | use foo::{bar::{baz::{}, baz1::{}}};
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-empty-paths.rs:26:5
+  --> $DIR/edition-lint-nested-empty-paths.rs:27:5
    |
 LL | use foo::{bar::{baz::{}, baz1::{}}};
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}`
diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.fixed b/tests/ui/rust-2018/edition-lint-nested-paths.fixed
index 93ccb2fe6af..bf0038c3be4 100644
--- a/tests/ui/rust-2018/edition-lint-nested-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-nested-paths.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 
 #![deny(absolute_paths_not_starting_with_crate)]
diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.rs b/tests/ui/rust-2018/edition-lint-nested-paths.rs
index 1c1d21dbab9..87dc51a3745 100644
--- a/tests/ui/rust-2018/edition-lint-nested-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-nested-paths.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 
 #![deny(absolute_paths_not_starting_with_crate)]
diff --git a/tests/ui/rust-2018/edition-lint-nested-paths.stderr b/tests/ui/rust-2018/edition-lint-nested-paths.stderr
index d059a2533a9..4a70bb7e5c8 100644
--- a/tests/ui/rust-2018/edition-lint-nested-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-nested-paths.stderr
@@ -1,5 +1,5 @@
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-paths.rs:5:5
+  --> $DIR/edition-lint-nested-paths.rs:6:5
    |
 LL | use foo::{a, b};
    |     ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}`
@@ -7,13 +7,13 @@ LL | use foo::{a, b};
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 note: the lint level is defined here
-  --> $DIR/edition-lint-nested-paths.rs:3:9
+  --> $DIR/edition-lint-nested-paths.rs:4:9
    |
 LL | #![deny(absolute_paths_not_starting_with_crate)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-paths.rs:5:5
+  --> $DIR/edition-lint-nested-paths.rs:6:5
    |
 LL | use foo::{a, b};
    |     ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}`
@@ -23,7 +23,7 @@ LL | use foo::{a, b};
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-paths.rs:22:13
+  --> $DIR/edition-lint-nested-paths.rs:23:13
    |
 LL |         use foo::{self as x, c};
    |             ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}`
@@ -32,7 +32,7 @@ LL |         use foo::{self as x, c};
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-nested-paths.rs:22:13
+  --> $DIR/edition-lint-nested-paths.rs:23:13
    |
 LL |         use foo::{self as x, c};
    |             ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}`
diff --git a/tests/ui/rust-2018/edition-lint-paths.fixed b/tests/ui/rust-2018/edition-lint-paths.fixed
index 014bf91886f..9664b461161 100644
--- a/tests/ui/rust-2018/edition-lint-paths.fixed
+++ b/tests/ui/rust-2018/edition-lint-paths.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ aux-build:edition-lint-paths.rs
 //@ run-rustfix
 
diff --git a/tests/ui/rust-2018/edition-lint-paths.rs b/tests/ui/rust-2018/edition-lint-paths.rs
index 0ecd090c1df..39cdad3ab98 100644
--- a/tests/ui/rust-2018/edition-lint-paths.rs
+++ b/tests/ui/rust-2018/edition-lint-paths.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ aux-build:edition-lint-paths.rs
 //@ run-rustfix
 
diff --git a/tests/ui/rust-2018/edition-lint-paths.stderr b/tests/ui/rust-2018/edition-lint-paths.stderr
index 553a3bfdaa8..fde17338d98 100644
--- a/tests/ui/rust-2018/edition-lint-paths.stderr
+++ b/tests/ui/rust-2018/edition-lint-paths.stderr
@@ -1,5 +1,5 @@
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:11:9
+  --> $DIR/edition-lint-paths.rs:12:9
    |
 LL |     use bar::Bar;
    |         ^^^^^^^^ help: use `crate`: `crate::bar::Bar`
@@ -7,13 +7,13 @@ LL |     use bar::Bar;
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 note: the lint level is defined here
-  --> $DIR/edition-lint-paths.rs:4:9
+  --> $DIR/edition-lint-paths.rs:5:9
    |
 LL | #![deny(absolute_paths_not_starting_with_crate)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:18:9
+  --> $DIR/edition-lint-paths.rs:19:9
    |
 LL |     use bar;
    |         ^^^ help: use `crate`: `crate::bar`
@@ -22,7 +22,7 @@ LL |     use bar;
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:24:9
+  --> $DIR/edition-lint-paths.rs:25:9
    |
 LL |     use {main, Bar as SomethingElse};
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -31,7 +31,7 @@ LL |     use {main, Bar as SomethingElse};
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:24:9
+  --> $DIR/edition-lint-paths.rs:25:9
    |
 LL |     use {main, Bar as SomethingElse};
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -41,7 +41,7 @@ LL |     use {main, Bar as SomethingElse};
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:24:9
+  --> $DIR/edition-lint-paths.rs:25:9
    |
 LL |     use {main, Bar as SomethingElse};
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -51,7 +51,7 @@ LL |     use {main, Bar as SomethingElse};
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:39:5
+  --> $DIR/edition-lint-paths.rs:40:5
    |
 LL | use bar::Bar;
    |     ^^^^^^^^ help: use `crate`: `crate::bar::Bar`
@@ -60,7 +60,7 @@ LL | use bar::Bar;
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:51:9
+  --> $DIR/edition-lint-paths.rs:52:9
    |
 LL |     use *;
    |         ^ help: use `crate`: `crate::*`
@@ -69,7 +69,7 @@ LL |     use *;
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:56:6
+  --> $DIR/edition-lint-paths.rs:57:6
    |
 LL | impl ::foo::SomeTrait for u32 {}
    |      ^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::SomeTrait`
@@ -78,7 +78,7 @@ LL | impl ::foo::SomeTrait for u32 {}
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/edition-lint-paths.rs:61:13
+  --> $DIR/edition-lint-paths.rs:62:13
    |
 LL |     let x = ::bar::Bar;
    |             ^^^^^^^^^^ help: use `crate`: `crate::bar::Bar`
diff --git a/tests/ui/rust-2018/extern-crate-rename.fixed b/tests/ui/rust-2018/extern-crate-rename.fixed
index 36b52802990..b6b665f537e 100644
--- a/tests/ui/rust-2018/extern-crate-rename.fixed
+++ b/tests/ui/rust-2018/extern-crate-rename.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ aux-build:edition-lint-paths.rs
 //@ run-rustfix
 
diff --git a/tests/ui/rust-2018/extern-crate-rename.rs b/tests/ui/rust-2018/extern-crate-rename.rs
index 725e3aaa072..3257ab876e1 100644
--- a/tests/ui/rust-2018/extern-crate-rename.rs
+++ b/tests/ui/rust-2018/extern-crate-rename.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ aux-build:edition-lint-paths.rs
 //@ run-rustfix
 
diff --git a/tests/ui/rust-2018/extern-crate-rename.stderr b/tests/ui/rust-2018/extern-crate-rename.stderr
index 6b251208030..36986c89c62 100644
--- a/tests/ui/rust-2018/extern-crate-rename.stderr
+++ b/tests/ui/rust-2018/extern-crate-rename.stderr
@@ -1,5 +1,5 @@
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/extern-crate-rename.rs:11:5
+  --> $DIR/extern-crate-rename.rs:12:5
    |
 LL | use my_crate::foo;
    |     ^^^^^^^^^^^^^ help: use `crate`: `crate::my_crate::foo`
@@ -7,7 +7,7 @@ LL | use my_crate::foo;
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 note: the lint level is defined here
-  --> $DIR/extern-crate-rename.rs:7:9
+  --> $DIR/extern-crate-rename.rs:8:9
    |
 LL | #![deny(absolute_paths_not_starting_with_crate)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2018/extern-crate-submod.fixed b/tests/ui/rust-2018/extern-crate-submod.fixed
index dc864d87039..8657960e972 100644
--- a/tests/ui/rust-2018/extern-crate-submod.fixed
+++ b/tests/ui/rust-2018/extern-crate-submod.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ aux-build:edition-lint-paths.rs
 //@ run-rustfix
 
diff --git a/tests/ui/rust-2018/extern-crate-submod.rs b/tests/ui/rust-2018/extern-crate-submod.rs
index f15bc6bced8..bf0a38d2b34 100644
--- a/tests/ui/rust-2018/extern-crate-submod.rs
+++ b/tests/ui/rust-2018/extern-crate-submod.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ aux-build:edition-lint-paths.rs
 //@ run-rustfix
 
diff --git a/tests/ui/rust-2018/extern-crate-submod.stderr b/tests/ui/rust-2018/extern-crate-submod.stderr
index 0d45d32d568..85e26d72a67 100644
--- a/tests/ui/rust-2018/extern-crate-submod.stderr
+++ b/tests/ui/rust-2018/extern-crate-submod.stderr
@@ -1,5 +1,5 @@
 error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
-  --> $DIR/extern-crate-submod.rs:18:5
+  --> $DIR/extern-crate-submod.rs:19:5
    |
 LL | use m::edition_lint_paths::foo;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::m::edition_lint_paths::foo`
@@ -7,7 +7,7 @@ LL | use m::edition_lint_paths::foo;
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
 note: the lint level is defined here
-  --> $DIR/extern-crate-submod.rs:8:9
+  --> $DIR/extern-crate-submod.rs:9:9
    |
 LL | #![deny(absolute_paths_not_starting_with_crate)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rust-2018/try-ident.fixed b/tests/ui/rust-2018/try-ident.fixed
index b1c446e1022..b514c6d0756 100644
--- a/tests/ui/rust-2018/try-ident.fixed
+++ b/tests/ui/rust-2018/try-ident.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 //@ check-pass
 
diff --git a/tests/ui/rust-2018/try-ident.rs b/tests/ui/rust-2018/try-ident.rs
index 8e62f698e25..2b8bb9234e5 100644
--- a/tests/ui/rust-2018/try-ident.rs
+++ b/tests/ui/rust-2018/try-ident.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 //@ check-pass
 
diff --git a/tests/ui/rust-2018/try-ident.stderr b/tests/ui/rust-2018/try-ident.stderr
index eaf4c235697..aca623d7d48 100644
--- a/tests/ui/rust-2018/try-ident.stderr
+++ b/tests/ui/rust-2018/try-ident.stderr
@@ -1,5 +1,5 @@
 warning: `try` is a keyword in the 2018 edition
-  --> $DIR/try-ident.rs:7:5
+  --> $DIR/try-ident.rs:8:5
    |
 LL |     try();
    |     ^^^ help: you can use a raw identifier to stay compatible: `r#try`
@@ -7,14 +7,14 @@ LL |     try();
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 note: the lint level is defined here
-  --> $DIR/try-ident.rs:4:9
+  --> $DIR/try-ident.rs:5:9
    |
 LL | #![warn(rust_2018_compatibility)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^
    = note: `#[warn(keyword_idents_2018)]` implied by `#[warn(rust_2018_compatibility)]`
 
 warning: `try` is a keyword in the 2018 edition
-  --> $DIR/try-ident.rs:12:4
+  --> $DIR/try-ident.rs:13:4
    |
 LL | fn try() {
    |    ^^^ help: you can use a raw identifier to stay compatible: `r#try`
diff --git a/tests/ui/rust-2018/try-macro.fixed b/tests/ui/rust-2018/try-macro.fixed
index 98c48d6b96f..f2d8cf2bd9a 100644
--- a/tests/ui/rust-2018/try-macro.fixed
+++ b/tests/ui/rust-2018/try-macro.fixed
@@ -1,5 +1,6 @@
 // Test that `try!` macros are rewritten.
 
+//@ edition: 2015
 //@ run-rustfix
 //@ check-pass
 
diff --git a/tests/ui/rust-2018/try-macro.rs b/tests/ui/rust-2018/try-macro.rs
index 99480b2a3ec..fec8eaa1786 100644
--- a/tests/ui/rust-2018/try-macro.rs
+++ b/tests/ui/rust-2018/try-macro.rs
@@ -1,5 +1,6 @@
 // Test that `try!` macros are rewritten.
 
+//@ edition: 2015
 //@ run-rustfix
 //@ check-pass
 
diff --git a/tests/ui/rust-2018/try-macro.stderr b/tests/ui/rust-2018/try-macro.stderr
index 095c755539d..20105e1868f 100644
--- a/tests/ui/rust-2018/try-macro.stderr
+++ b/tests/ui/rust-2018/try-macro.stderr
@@ -1,5 +1,5 @@
 warning: `try` is a keyword in the 2018 edition
-  --> $DIR/try-macro.rs:12:5
+  --> $DIR/try-macro.rs:13:5
    |
 LL |     try!(x);
    |     ^^^ help: you can use a raw identifier to stay compatible: `r#try`
@@ -7,7 +7,7 @@ LL |     try!(x);
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
 note: the lint level is defined here
-  --> $DIR/try-macro.rs:6:9
+  --> $DIR/try-macro.rs:7:9
    |
 LL | #![warn(rust_2018_compatibility)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs
index 66a432be357..baa664d5933 100644
--- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs
+++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs
@@ -1,3 +1,5 @@
+//@ edition: 2015
+
 #![warn(rust_2021_incompatible_closure_captures)]
 
 fn main() {}
diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr
index 5ecbedf1867..00b9a81b27d 100644
--- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr
+++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr
@@ -1,5 +1,5 @@
 error[E0670]: `async fn` is not permitted in Rust 2015
-  --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs:8:16
+  --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs:10:16
    |
 LL |     pub(crate) async fn new(
    |                ^^^^^ to use `async fn`, switch to Rust 2018 or later
@@ -8,7 +8,7 @@ LL |     pub(crate) async fn new(
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
 error[E0412]: cannot find type `Duration` in this scope
-  --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs:10:19
+  --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs:12:19
    |
 LL |         interval: Duration,
    |                   ^^^^^^^^ not found in this scope
diff --git a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs
index efa296db47c..d10b3bec543 100644
--- a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs
+++ b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.rs
@@ -1,4 +1,5 @@
 // Regression test for ICE #125876
+//@ edition: 2015
 
 fn main() {
     std::ptr::from_ref(num).cast_mut().as_deref();
diff --git a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr
index f943688e657..696151b6ee2 100644
--- a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr
+++ b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr
@@ -1,11 +1,11 @@
 error[E0425]: cannot find value `num` in this scope
-  --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:24
+  --> $DIR/ice-unwrap-probe-many-result-125876.rs:5:24
    |
 LL |     std::ptr::from_ref(num).cast_mut().as_deref();
    |                        ^^^ not found in this scope
 
 warning: type annotations needed
-  --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:29
+  --> $DIR/ice-unwrap-probe-many-result-125876.rs:5:29
    |
 LL |     std::ptr::from_ref(num).cast_mut().as_deref();
    |                             ^^^^^^^^
@@ -15,7 +15,7 @@ LL |     std::ptr::from_ref(num).cast_mut().as_deref();
    = note: `#[warn(tyvar_behind_raw_pointer)]` on by default
 
 warning: type annotations needed
-  --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:40
+  --> $DIR/ice-unwrap-probe-many-result-125876.rs:5:40
    |
 LL |     std::ptr::from_ref(num).cast_mut().as_deref();
    |                                        ^^^^^^^^
@@ -24,7 +24,7 @@ LL |     std::ptr::from_ref(num).cast_mut().as_deref();
    = note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
 
 error[E0599]: no method named `as_deref` found for raw pointer `*mut _` in the current scope
-  --> $DIR/ice-unwrap-probe-many-result-125876.rs:4:40
+  --> $DIR/ice-unwrap-probe-many-result-125876.rs:5:40
    |
 LL |     std::ptr::from_ref(num).cast_mut().as_deref();
    |                                        ^^^^^^^^
diff --git a/tests/ui/suggestions/issue-116434-2015.rs b/tests/ui/suggestions/issue-116434-2015.rs
index 1518765152f..bad9d02321c 100644
--- a/tests/ui/suggestions/issue-116434-2015.rs
+++ b/tests/ui/suggestions/issue-116434-2015.rs
@@ -1,3 +1,5 @@
+//@ edition: 2015
+
 trait Foo {
     type Clone;
     fn foo() -> Clone;
diff --git a/tests/ui/suggestions/issue-116434-2015.stderr b/tests/ui/suggestions/issue-116434-2015.stderr
index 07a254432a2..a0a99cc560d 100644
--- a/tests/ui/suggestions/issue-116434-2015.stderr
+++ b/tests/ui/suggestions/issue-116434-2015.stderr
@@ -1,5 +1,5 @@
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-116434-2015.rs:3:17
+  --> $DIR/issue-116434-2015.rs:5:17
    |
 LL |     fn foo() -> Clone;
    |                 ^^^^^
@@ -13,7 +13,7 @@ LL |     fn foo() -> dyn Clone;
    |                 +++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-116434-2015.rs:3:17
+  --> $DIR/issue-116434-2015.rs:5:17
    |
 LL |     fn foo() -> Clone;
    |                 ^^^^^
@@ -27,7 +27,7 @@ LL |     fn foo() -> dyn Clone;
    |                 +++
 
 error[E0038]: the trait `Clone` is not dyn compatible
-  --> $DIR/issue-116434-2015.rs:3:17
+  --> $DIR/issue-116434-2015.rs:5:17
    |
 LL |     fn foo() -> Clone;
    |                 ^^^^^ `Clone` is not dyn compatible
@@ -41,7 +41,7 @@ LL |     fn foo() -> Self::Clone;
    |                 ++++++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-116434-2015.rs:18:20
+  --> $DIR/issue-116434-2015.rs:20:20
    |
 LL |     fn handle() -> DbHandle;
    |                    ^^^^^^^^
@@ -54,7 +54,7 @@ LL |     fn handle() -> dyn DbHandle;
    |                    +++
 
 warning: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-116434-2015.rs:18:20
+  --> $DIR/issue-116434-2015.rs:20:20
    |
 LL |     fn handle() -> DbHandle;
    |                    ^^^^^^^^
@@ -68,14 +68,14 @@ LL |     fn handle() -> dyn DbHandle;
    |                    +++
 
 error[E0038]: the trait `DbHandle` is not dyn compatible
-  --> $DIR/issue-116434-2015.rs:18:20
+  --> $DIR/issue-116434-2015.rs:20:20
    |
 LL |     fn handle() -> DbHandle;
    |                    ^^^^^^^^ `DbHandle` is not dyn compatible
    |
 note: for a trait to be dyn compatible it needs to allow building a vtable
       for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
-  --> $DIR/issue-116434-2015.rs:14:17
+  --> $DIR/issue-116434-2015.rs:16:17
    |
 LL | trait DbHandle: Sized {}
    |       --------  ^^^^^ ...because it requires `Self: Sized`
diff --git a/tests/ui/suggestions/issue-61963.rs b/tests/ui/suggestions/issue-61963.rs
index 2fafe629db9..77e4b21f5db 100644
--- a/tests/ui/suggestions/issue-61963.rs
+++ b/tests/ui/suggestions/issue-61963.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ proc-macro: issue-61963.rs
 //@ proc-macro: issue-61963-1.rs
 #![deny(bare_trait_objects)]
diff --git a/tests/ui/suggestions/issue-61963.stderr b/tests/ui/suggestions/issue-61963.stderr
index 734c88f3fd6..ef11efe5c74 100644
--- a/tests/ui/suggestions/issue-61963.stderr
+++ b/tests/ui/suggestions/issue-61963.stderr
@@ -1,5 +1,5 @@
 error: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-61963.rs:22:14
+  --> $DIR/issue-61963.rs:23:14
    |
 LL |     bar: Box<Bar>,
    |              ^^^
@@ -7,7 +7,7 @@ LL |     bar: Box<Bar>,
    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
 note: the lint level is defined here
-  --> $DIR/issue-61963.rs:3:9
+  --> $DIR/issue-61963.rs:4:9
    |
 LL | #![deny(bare_trait_objects)]
    |         ^^^^^^^^^^^^^^^^^^
@@ -17,7 +17,7 @@ LL |     bar: Box<dyn Bar>,
    |              +++
 
 error: trait objects without an explicit `dyn` are deprecated
-  --> $DIR/issue-61963.rs:18:1
+  --> $DIR/issue-61963.rs:19:1
    |
 LL | pub struct Foo {
    | ^^^
diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
index e6aac1708ce..6354676bb25 100644
--- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
+++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 #![allow(non_snake_case)]
 mod A {
diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs
index d5c557dc9c7..c3b3a00aa6d 100644
--- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs
+++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs
@@ -1,3 +1,4 @@
+//@ edition: 2015
 //@ run-rustfix
 #![allow(non_snake_case)]
 mod A {
diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr
index e2a72697501..4fb0dcc7901 100644
--- a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr
+++ b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.stderr
@@ -1,5 +1,5 @@
 error[E0405]: cannot find trait `Trait` in `A`
-  --> $DIR/shadowed-path-in-trait-bound-suggestion.rs:9:24
+  --> $DIR/shadowed-path-in-trait-bound-suggestion.rs:10:24
    |
 LL |     pub struct A<H: A::Trait>(pub H);
    |                        ^^^^^ not found in `A`
diff --git a/tests/ui/traits/const-traits/mbe-dyn-const-2015.rs b/tests/ui/traits/const-traits/mbe-dyn-const-2015.rs
index 9d65a2ac302..fadfbe66788 100644
--- a/tests/ui/traits/const-traits/mbe-dyn-const-2015.rs
+++ b/tests/ui/traits/const-traits/mbe-dyn-const-2015.rs
@@ -1,6 +1,7 @@
 // Ensure that the introduction of const trait bound didn't regress this code in Rust 2015.
 // See also `mbe-const-trait-bound-theoretical-regression.rs`.
 
+//@ edition: 2015
 //@ check-pass
 
 macro_rules! check {