summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--diff0
-rw-r--r--tests/ui/asm/unpretty-expanded.rs1
-rw-r--r--tests/ui/asm/unpretty-expanded.stdout1
-rw-r--r--tests/ui/codemap_tests/unicode.expanded.stdout1
-rw-r--r--tests/ui/codemap_tests/unicode.normal.stderr2
-rw-r--r--tests/ui/codemap_tests/unicode.rs1
-rw-r--r--tests/ui/const-generics/defaults/pretty-printing-ast.rs1
-rw-r--r--tests/ui/const-generics/defaults/pretty-printing-ast.stdout1
-rw-r--r--tests/ui/deriving/built-in-proc-macro-scope.rs1
-rw-r--r--tests/ui/deriving/built-in-proc-macro-scope.stdout1
-rw-r--r--tests/ui/deriving/deriving-coerce-pointee-expanded.rs1
-rw-r--r--tests/ui/deriving/deriving-coerce-pointee-expanded.stdout1
-rw-r--r--tests/ui/deriving/proc-macro-attribute-mixing.rs1
-rw-r--r--tests/ui/deriving/proc-macro-attribute-mixing.stdout1
-rw-r--r--tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs1
-rw-r--r--tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout1
-rw-r--r--tests/ui/macros/genercs-in-path-with-prettry-hir.rs1
-rw-r--r--tests/ui/macros/genercs-in-path-with-prettry-hir.stderr2
-rw-r--r--tests/ui/macros/genercs-in-path-with-prettry-hir.stdout1
-rw-r--r--tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs1
-rw-r--r--tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout1
-rw-r--r--tests/ui/match/issue-82392.rs1
-rw-r--r--tests/ui/match/issue-82392.stdout1
-rw-r--r--tests/ui/proc-macro/nonterminal-token-hygiene.rs1
-rw-r--r--tests/ui/proc-macro/nonterminal-token-hygiene.stdout9
-rw-r--r--tests/ui/proc-macro/quote/debug.rs1
-rw-r--r--tests/ui/proc-macro/quote/debug.stdout1
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs1
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout1
-rw-r--r--tests/ui/type-alias-impl-trait/issue-60662.rs1
-rw-r--r--tests/ui/type-alias-impl-trait/issue-60662.stdout1
-rw-r--r--tests/ui/unpretty/bad-literal.rs1
-rw-r--r--tests/ui/unpretty/bad-literal.stderr2
-rw-r--r--tests/ui/unpretty/bad-literal.stdout1
-rw-r--r--tests/ui/unpretty/debug-fmt-hir.rs1
-rw-r--r--tests/ui/unpretty/debug-fmt-hir.stdout1
-rw-r--r--tests/ui/unpretty/deprecated-attr.rs1
-rw-r--r--tests/ui/unpretty/deprecated-attr.stdout1
-rw-r--r--tests/ui/unpretty/diagnostic-attr.rs1
-rw-r--r--tests/ui/unpretty/diagnostic-attr.stdout1
-rw-r--r--tests/ui/unpretty/expanded-interpolation.rs1
-rw-r--r--tests/ui/unpretty/expanded-interpolation.stdout1
-rw-r--r--tests/ui/unpretty/flattened-format-args.rs1
-rw-r--r--tests/ui/unpretty/flattened-format-args.stdout1
-rw-r--r--tests/ui/unpretty/let-else-hir.rs1
-rw-r--r--tests/ui/unpretty/let-else-hir.stdout1
-rw-r--r--tests/ui/unpretty/self-hir.rs1
-rw-r--r--tests/ui/unpretty/self-hir.stdout1
-rw-r--r--tests/ui/unpretty/unpretty-expr-fn-arg.rs1
-rw-r--r--tests/ui/unpretty/unpretty-expr-fn-arg.stdout1
50 files changed, 53 insertions, 7 deletions
diff --git a/diff b/diff
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/diff
diff --git a/tests/ui/asm/unpretty-expanded.rs b/tests/ui/asm/unpretty-expanded.rs
index 1da2c7704f4..3eb46fe4889 100644
--- a/tests/ui/asm/unpretty-expanded.rs
+++ b/tests/ui/asm/unpretty-expanded.rs
@@ -1,4 +1,5 @@
 //@ needs-asm-support
 //@ check-pass
 //@ compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 core::arch::global_asm!("x: .byte 42");
diff --git a/tests/ui/asm/unpretty-expanded.stdout b/tests/ui/asm/unpretty-expanded.stdout
index 80ccd127d50..7ba1702dfed 100644
--- a/tests/ui/asm/unpretty-expanded.stdout
+++ b/tests/ui/asm/unpretty-expanded.stdout
@@ -7,4 +7,5 @@ extern crate std;
 //@ needs-asm-support
 //@ check-pass
 //@ compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 global_asm! ("x: .byte 42");
diff --git a/tests/ui/codemap_tests/unicode.expanded.stdout b/tests/ui/codemap_tests/unicode.expanded.stdout
index eb53d12e94f..c88035de044 100644
--- a/tests/ui/codemap_tests/unicode.expanded.stdout
+++ b/tests/ui/codemap_tests/unicode.expanded.stdout
@@ -7,6 +7,7 @@ extern crate std;
 //@ revisions: normal expanded
 //@[expanded] check-pass
 //@[expanded]compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 
 extern "路濫狼á́́" fn foo() {}
 
diff --git a/tests/ui/codemap_tests/unicode.normal.stderr b/tests/ui/codemap_tests/unicode.normal.stderr
index 0f254e0246f..10cb34f4832 100644
--- a/tests/ui/codemap_tests/unicode.normal.stderr
+++ b/tests/ui/codemap_tests/unicode.normal.stderr
@@ -1,5 +1,5 @@
 error[E0703]: invalid ABI: found `路濫狼á́́`
-  --> $DIR/unicode.rs:5:8
+  --> $DIR/unicode.rs:6:8
    |
 LL | extern "路濫狼á́́" fn foo() {}
    |        ^^^^^^^^^ invalid ABI
diff --git a/tests/ui/codemap_tests/unicode.rs b/tests/ui/codemap_tests/unicode.rs
index 73023e3c669..4b93ef09406 100644
--- a/tests/ui/codemap_tests/unicode.rs
+++ b/tests/ui/codemap_tests/unicode.rs
@@ -1,6 +1,7 @@
 //@ revisions: normal expanded
 //@[expanded] check-pass
 //@[expanded]compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 
 extern "路濫狼á́́" fn foo() {} //[normal]~ ERROR invalid ABI
 
diff --git a/tests/ui/const-generics/defaults/pretty-printing-ast.rs b/tests/ui/const-generics/defaults/pretty-printing-ast.rs
index 20bf900d9f3..f7a166d00d5 100644
--- a/tests/ui/const-generics/defaults/pretty-printing-ast.rs
+++ b/tests/ui/const-generics/defaults/pretty-printing-ast.rs
@@ -1,6 +1,7 @@
 // Test the AST pretty printer correctly handles default values for const generics
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 #![crate_type = "lib"]
 
diff --git a/tests/ui/const-generics/defaults/pretty-printing-ast.stdout b/tests/ui/const-generics/defaults/pretty-printing-ast.stdout
index f1cd1451700..b6cb7fa09c8 100644
--- a/tests/ui/const-generics/defaults/pretty-printing-ast.stdout
+++ b/tests/ui/const-generics/defaults/pretty-printing-ast.stdout
@@ -3,6 +3,7 @@
 // Test the AST pretty printer correctly handles default values for const generics
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 #![crate_type = "lib"]
 #[prelude_import]
diff --git a/tests/ui/deriving/built-in-proc-macro-scope.rs b/tests/ui/deriving/built-in-proc-macro-scope.rs
index e67197b7e20..69128a08b99 100644
--- a/tests/ui/deriving/built-in-proc-macro-scope.rs
+++ b/tests/ui/deriving/built-in-proc-macro-scope.rs
@@ -1,6 +1,7 @@
 //@ check-pass
 //@ proc-macro: another-proc-macro.rs
 //@ compile-flags: -Zunpretty=expanded
+//@ edition:2015
 
 #![feature(derive_coerce_pointee)]
 
diff --git a/tests/ui/deriving/built-in-proc-macro-scope.stdout b/tests/ui/deriving/built-in-proc-macro-scope.stdout
index fa4e50968f4..2697618ab00 100644
--- a/tests/ui/deriving/built-in-proc-macro-scope.stdout
+++ b/tests/ui/deriving/built-in-proc-macro-scope.stdout
@@ -3,6 +3,7 @@
 //@ check-pass
 //@ proc-macro: another-proc-macro.rs
 //@ compile-flags: -Zunpretty=expanded
+//@ edition:2015
 
 #![feature(derive_coerce_pointee)]
 #[prelude_import]
diff --git a/tests/ui/deriving/deriving-coerce-pointee-expanded.rs b/tests/ui/deriving/deriving-coerce-pointee-expanded.rs
index 94be7031fb7..9394ae4efe5 100644
--- a/tests/ui/deriving/deriving-coerce-pointee-expanded.rs
+++ b/tests/ui/deriving/deriving-coerce-pointee-expanded.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 #![feature(derive_coerce_pointee)]
 use std::marker::CoercePointee;
 
diff --git a/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout b/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout
index a774efbbe35..84f8e9a3195 100644
--- a/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout
+++ b/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout
@@ -2,6 +2,7 @@
 #![no_std]
 //@ check-pass
 //@ compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 #![feature(derive_coerce_pointee)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
diff --git a/tests/ui/deriving/proc-macro-attribute-mixing.rs b/tests/ui/deriving/proc-macro-attribute-mixing.rs
index 2c11c3f72ca..c9e123d7e8a 100644
--- a/tests/ui/deriving/proc-macro-attribute-mixing.rs
+++ b/tests/ui/deriving/proc-macro-attribute-mixing.rs
@@ -7,6 +7,7 @@
 //@ check-pass
 //@ proc-macro: another-proc-macro.rs
 //@ compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 
 #![feature(derive_coerce_pointee)]
 
diff --git a/tests/ui/deriving/proc-macro-attribute-mixing.stdout b/tests/ui/deriving/proc-macro-attribute-mixing.stdout
index ad743d013d2..faa9c0218a3 100644
--- a/tests/ui/deriving/proc-macro-attribute-mixing.stdout
+++ b/tests/ui/deriving/proc-macro-attribute-mixing.stdout
@@ -9,6 +9,7 @@
 //@ check-pass
 //@ proc-macro: another-proc-macro.rs
 //@ compile-flags: -Zunpretty=expanded
+//@ edition: 2015
 
 #![feature(derive_coerce_pointee)]
 #[prelude_import]
diff --git a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs
index 9e38b94b76c..11ee2bc852a 100644
--- a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs
+++ b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs
@@ -1,6 +1,7 @@
 // This ensures that ICEs like rust#94953 don't happen
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 // This `expect` will create an expectation with an unstable expectation id
 #[expect(while_true)]
diff --git a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout
index d804c1d2d20..d63abea9230 100644
--- a/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout
+++ b/tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout
@@ -7,6 +7,7 @@ extern crate std;
 // This ensures that ICEs like rust#94953 don't happen
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 // This `expect` will create an expectation with an unstable expectation id
 #[expect(while_true)]
diff --git a/tests/ui/macros/genercs-in-path-with-prettry-hir.rs b/tests/ui/macros/genercs-in-path-with-prettry-hir.rs
index 84370fcebbc..e6773f610da 100644
--- a/tests/ui/macros/genercs-in-path-with-prettry-hir.rs
+++ b/tests/ui/macros/genercs-in-path-with-prettry-hir.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: -Zunpretty=hir
+//@ edition: 2015
 
 // issue#97006
 
diff --git a/tests/ui/macros/genercs-in-path-with-prettry-hir.stderr b/tests/ui/macros/genercs-in-path-with-prettry-hir.stderr
index 8fcc7c6fbff..173e77569a8 100644
--- a/tests/ui/macros/genercs-in-path-with-prettry-hir.stderr
+++ b/tests/ui/macros/genercs-in-path-with-prettry-hir.stderr
@@ -1,5 +1,5 @@
 error: unexpected generic arguments in path
-  --> $DIR/genercs-in-path-with-prettry-hir.rs:12:10
+  --> $DIR/genercs-in-path-with-prettry-hir.rs:13:10
    |
 LL | m!(inline<u8>);
    |          ^^^^
diff --git a/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout b/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
index e8c88d2dcdf..6b41eb530db 100644
--- a/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
+++ b/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
@@ -3,6 +3,7 @@ use ::std::prelude::rust_2015::*;
 #[macro_use]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
+//@ edition: 2015
 
 // issue#97006
 
diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs
index cf47a1e67ae..29f71d10719 100644
--- a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs
+++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 #![feature(core_intrinsics, generic_assert)]
 
diff --git a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout
index 8065d0dff8f..9300f610f8e 100644
--- a/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout
+++ b/tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout
@@ -2,6 +2,7 @@
 #![no_std]
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 #![feature(core_intrinsics, generic_assert)]
 #[prelude_import]
diff --git a/tests/ui/match/issue-82392.rs b/tests/ui/match/issue-82392.rs
index 6f9527fb337..4ae08fed93a 100644
--- a/tests/ui/match/issue-82392.rs
+++ b/tests/ui/match/issue-82392.rs
@@ -1,6 +1,7 @@
 // https://github.com/rust-lang/rust/issues/82329
 //@ compile-flags: -Zunpretty=hir,typed
 //@ check-pass
+//@ edition:2015
 
 pub fn main() {
     if true {
diff --git a/tests/ui/match/issue-82392.stdout b/tests/ui/match/issue-82392.stdout
index 8949611ac12..8b7edabf004 100644
--- a/tests/ui/match/issue-82392.stdout
+++ b/tests/ui/match/issue-82392.stdout
@@ -5,6 +5,7 @@ extern crate std;
 // https://github.com/rust-lang/rust/issues/82329
 //@ compile-flags: -Zunpretty=hir,typed
 //@ check-pass
+//@ edition:2015
 
 fn main() ({
     (if (true as bool)
diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.rs b/tests/ui/proc-macro/nonterminal-token-hygiene.rs
index e2aedb245d0..b7b0d1ea3dd 100644
--- a/tests/ui/proc-macro/nonterminal-token-hygiene.rs
+++ b/tests/ui/proc-macro/nonterminal-token-hygiene.rs
@@ -8,6 +8,7 @@
 //@ normalize-stdout: "expn\d{3,}" -> "expnNNN"
 //@ normalize-stdout: "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */"
 //@ proc-macro: test-macros.rs
+//@ edition: 2015
 
 #![feature(decl_macro)]
 #![no_std] // Don't load unnecessary hygiene information from std
diff --git a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
index 6fd6cb47469..2ebfb47d981 100644
--- a/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
+++ b/tests/ui/proc-macro/nonterminal-token-hygiene.stdout
@@ -5,19 +5,19 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
         stream: TokenStream [
             Ident {
                 ident: "struct",
-                span: $DIR/nonterminal-token-hygiene.rs:32:5: 32:11 (#5),
+                span: $DIR/nonterminal-token-hygiene.rs:33:5: 33:11 (#5),
             },
             Ident {
                 ident: "S",
-                span: $DIR/nonterminal-token-hygiene.rs:32:12: 32:13 (#5),
+                span: $DIR/nonterminal-token-hygiene.rs:33:12: 33:13 (#5),
             },
             Punct {
                 ch: ';',
                 spacing: Alone,
-                span: $DIR/nonterminal-token-hygiene.rs:32:13: 32:14 (#5),
+                span: $DIR/nonterminal-token-hygiene.rs:33:13: 33:14 (#5),
             },
         ],
-        span: $DIR/nonterminal-token-hygiene.rs:22:27: 22:32 (#4),
+        span: $DIR/nonterminal-token-hygiene.rs:23:27: 23:32 (#4),
     },
 ]
 #![feature /* 0#0 */(prelude_import)]
@@ -32,6 +32,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
 //@ normalize-stdout: "expn\d{3,}" -> "expnNNN"
 //@ normalize-stdout: "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */"
 //@ proc-macro: test-macros.rs
+//@ edition: 2015
 
 #![feature /* 0#0 */(decl_macro)]
 #![no_std /* 0#0 */]
diff --git a/tests/ui/proc-macro/quote/debug.rs b/tests/ui/proc-macro/quote/debug.rs
index ce113079e56..ce1ef81beda 100644
--- a/tests/ui/proc-macro/quote/debug.rs
+++ b/tests/ui/proc-macro/quote/debug.rs
@@ -3,6 +3,7 @@
 //@ no-prefer-dynamic
 //@ compile-flags: -Z unpretty=expanded
 //@ needs-unwind compiling proc macros with panic=abort causes a warning
+//@ edition: 2015
 //
 // This file is not actually used as a proc-macro - instead,
 // it's just used to show the output of the `quote!` macro
diff --git a/tests/ui/proc-macro/quote/debug.stdout b/tests/ui/proc-macro/quote/debug.stdout
index 3eaad9eb969..6ebb3a37951 100644
--- a/tests/ui/proc-macro/quote/debug.stdout
+++ b/tests/ui/proc-macro/quote/debug.stdout
@@ -5,6 +5,7 @@
 //@ no-prefer-dynamic
 //@ compile-flags: -Z unpretty=expanded
 //@ needs-unwind compiling proc macros with panic=abort causes a warning
+//@ edition: 2015
 //
 // This file is not actually used as a proc-macro - instead,
 // it's just used to show the output of the `quote!` macro
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs
index 8d782646333..16165c4a42c 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 fn main() {
     if let 0 = 1 {}
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout
index 1c103f03c35..e2e45ae94ea 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout
@@ -6,5 +6,6 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ check-pass
 //@ compile-flags: -Z unpretty=expanded
+//@ edition: 2015
 
 fn main() { if let 0 = 1 {} }
diff --git a/tests/ui/type-alias-impl-trait/issue-60662.rs b/tests/ui/type-alias-impl-trait/issue-60662.rs
index 35d96e52fd6..7ecdd264735 100644
--- a/tests/ui/type-alias-impl-trait/issue-60662.rs
+++ b/tests/ui/type-alias-impl-trait/issue-60662.rs
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ compile-flags: -Z unpretty=hir
+//@ edition: 2015
 
 #![feature(type_alias_impl_trait)]
 
diff --git a/tests/ui/type-alias-impl-trait/issue-60662.stdout b/tests/ui/type-alias-impl-trait/issue-60662.stdout
index b541cbeb227..56fef852e37 100644
--- a/tests/ui/type-alias-impl-trait/issue-60662.stdout
+++ b/tests/ui/type-alias-impl-trait/issue-60662.stdout
@@ -1,5 +1,6 @@
 //@ check-pass
 //@ compile-flags: -Z unpretty=hir
+//@ edition: 2015
 
 #![feature(type_alias_impl_trait)]
 #[prelude_import]
diff --git a/tests/ui/unpretty/bad-literal.rs b/tests/ui/unpretty/bad-literal.rs
index 37377898b14..0ec1d7b07f1 100644
--- a/tests/ui/unpretty/bad-literal.rs
+++ b/tests/ui/unpretty/bad-literal.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=hir
 //@ check-fail
+//@ edition: 2015
 
 // In #100948 this caused an ICE with -Zunpretty=hir.
 fn main() {
diff --git a/tests/ui/unpretty/bad-literal.stderr b/tests/ui/unpretty/bad-literal.stderr
index b6259484f67..fd1801a87f2 100644
--- a/tests/ui/unpretty/bad-literal.stderr
+++ b/tests/ui/unpretty/bad-literal.stderr
@@ -1,5 +1,5 @@
 error: invalid suffix `u` for number literal
-  --> $DIR/bad-literal.rs:6:5
+  --> $DIR/bad-literal.rs:7:5
    |
 LL |     1u;
    |     ^^ invalid suffix `u`
diff --git a/tests/ui/unpretty/bad-literal.stdout b/tests/ui/unpretty/bad-literal.stdout
index c5272711d6e..06116a4ab55 100644
--- a/tests/ui/unpretty/bad-literal.stdout
+++ b/tests/ui/unpretty/bad-literal.stdout
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-fail
+//@ edition: 2015
 
 // In #100948 this caused an ICE with -Zunpretty=hir.
 fn main() {
diff --git a/tests/ui/unpretty/debug-fmt-hir.rs b/tests/ui/unpretty/debug-fmt-hir.rs
index c19f3c4c0c5..c79349de444 100644
--- a/tests/ui/unpretty/debug-fmt-hir.rs
+++ b/tests/ui/unpretty/debug-fmt-hir.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 use std::fmt;
 
diff --git a/tests/ui/unpretty/debug-fmt-hir.stdout b/tests/ui/unpretty/debug-fmt-hir.stdout
index 2c9c96de9d1..dc18675ea80 100644
--- a/tests/ui/unpretty/debug-fmt-hir.stdout
+++ b/tests/ui/unpretty/debug-fmt-hir.stdout
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 use std::fmt;
 
diff --git a/tests/ui/unpretty/deprecated-attr.rs b/tests/ui/unpretty/deprecated-attr.rs
index dda362a595e..0c80203e965 100644
--- a/tests/ui/unpretty/deprecated-attr.rs
+++ b/tests/ui/unpretty/deprecated-attr.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 #[deprecated]
 pub struct PlainDeprecated;
diff --git a/tests/ui/unpretty/deprecated-attr.stdout b/tests/ui/unpretty/deprecated-attr.stdout
index 42de7b4533e..97d863b2e94 100644
--- a/tests/ui/unpretty/deprecated-attr.stdout
+++ b/tests/ui/unpretty/deprecated-attr.stdout
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 #[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
 struct PlainDeprecated;
diff --git a/tests/ui/unpretty/diagnostic-attr.rs b/tests/ui/unpretty/diagnostic-attr.rs
index 27f5b693e69..4ef85c71f90 100644
--- a/tests/ui/unpretty/diagnostic-attr.rs
+++ b/tests/ui/unpretty/diagnostic-attr.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 #[diagnostic::on_unimplemented(
     message = "My Message for `ImportantTrait<{A}>` implemented for `{Self}`",
diff --git a/tests/ui/unpretty/diagnostic-attr.stdout b/tests/ui/unpretty/diagnostic-attr.stdout
index e8696d04d38..81d71b91d81 100644
--- a/tests/ui/unpretty/diagnostic-attr.stdout
+++ b/tests/ui/unpretty/diagnostic-attr.stdout
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 #[diagnostic::on_unimplemented(message =
 "My Message for `ImportantTrait<{A}>` implemented for `{Self}`", label =
diff --git a/tests/ui/unpretty/expanded-interpolation.rs b/tests/ui/unpretty/expanded-interpolation.rs
index 1dc72c67f51..0c447ae669d 100644
--- a/tests/ui/unpretty/expanded-interpolation.rs
+++ b/tests/ui/unpretty/expanded-interpolation.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=expanded
 //@ check-pass
+//@ edition: 2015
 
 // This test covers the AST pretty-printer's insertion of parentheses in some
 // macro metavariable edge cases. Synthetic parentheses (i.e. not appearing in
diff --git a/tests/ui/unpretty/expanded-interpolation.stdout b/tests/ui/unpretty/expanded-interpolation.stdout
index 556e57dbd92..10729a96ef5 100644
--- a/tests/ui/unpretty/expanded-interpolation.stdout
+++ b/tests/ui/unpretty/expanded-interpolation.stdout
@@ -2,6 +2,7 @@
 #![no_std]
 //@ compile-flags: -Zunpretty=expanded
 //@ check-pass
+//@ edition: 2015
 
 // This test covers the AST pretty-printer's insertion of parentheses in some
 // macro metavariable edge cases. Synthetic parentheses (i.e. not appearing in
diff --git a/tests/ui/unpretty/flattened-format-args.rs b/tests/ui/unpretty/flattened-format-args.rs
index 772f44cc268..ab065f494dc 100644
--- a/tests/ui/unpretty/flattened-format-args.rs
+++ b/tests/ui/unpretty/flattened-format-args.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes
 //@ check-pass
+//@ edition: 2015
 
 fn main() {
     let x = 1;
diff --git a/tests/ui/unpretty/flattened-format-args.stdout b/tests/ui/unpretty/flattened-format-args.stdout
index 2de1cdd96b5..a5d943281ad 100644
--- a/tests/ui/unpretty/flattened-format-args.stdout
+++ b/tests/ui/unpretty/flattened-format-args.stdout
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes
 //@ check-pass
+//@ edition: 2015
 
 fn main() {
     let x = 1;
diff --git a/tests/ui/unpretty/let-else-hir.rs b/tests/ui/unpretty/let-else-hir.rs
index 9c231189659..786c84a09dd 100644
--- a/tests/ui/unpretty/let-else-hir.rs
+++ b/tests/ui/unpretty/let-else-hir.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 
 
diff --git a/tests/ui/unpretty/let-else-hir.stdout b/tests/ui/unpretty/let-else-hir.stdout
index a2ffa5de567..a6dd943ec1b 100644
--- a/tests/ui/unpretty/let-else-hir.stdout
+++ b/tests/ui/unpretty/let-else-hir.stdout
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 
 
diff --git a/tests/ui/unpretty/self-hir.rs b/tests/ui/unpretty/self-hir.rs
index 448d828d444..70e0ba589fb 100644
--- a/tests/ui/unpretty/self-hir.rs
+++ b/tests/ui/unpretty/self-hir.rs
@@ -1,5 +1,6 @@
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 pub struct Bar {
     a: String,
diff --git a/tests/ui/unpretty/self-hir.stdout b/tests/ui/unpretty/self-hir.stdout
index 4da080dc611..a9e80b1f592 100644
--- a/tests/ui/unpretty/self-hir.stdout
+++ b/tests/ui/unpretty/self-hir.stdout
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
+//@ edition: 2015
 
 struct Bar {
     a: String,
diff --git a/tests/ui/unpretty/unpretty-expr-fn-arg.rs b/tests/ui/unpretty/unpretty-expr-fn-arg.rs
index 7f496e773c2..b2ab2e0911e 100644
--- a/tests/ui/unpretty/unpretty-expr-fn-arg.rs
+++ b/tests/ui/unpretty/unpretty-expr-fn-arg.rs
@@ -6,6 +6,7 @@
 
 //@ check-pass
 //@ compile-flags: -Zunpretty=hir,typed
+//@ edition: 2015
 #![allow(dead_code)]
 
 fn main() {}
diff --git a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout
index 43aa93c83bd..fd2e794fcac 100644
--- a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout
+++ b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout
@@ -6,6 +6,7 @@
 
 //@ check-pass
 //@ compile-flags: -Zunpretty=hir,typed
+//@ edition: 2015
 #![allow(dead_code)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;