Skip to content

Commit 20ab952

Browse files
committed
Explicitly annotate edition for unpretty=expanded and unpretty=hir tests
These emit prelude imports which means they are always edition dependent
1 parent efb1e3d commit 20ab952

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+53
-7
lines changed

diff

Whitespace-only changes.

tests/ui/asm/unpretty-expanded.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ needs-asm-support
22
//@ check-pass
33
//@ compile-flags: -Zunpretty=expanded
4+
//@ edition: 2015
45
core::arch::global_asm!("x: .byte 42");

tests/ui/asm/unpretty-expanded.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ extern crate std;
77
//@ needs-asm-support
88
//@ check-pass
99
//@ compile-flags: -Zunpretty=expanded
10+
//@ edition: 2015
1011
global_asm! ("x: .byte 42");

tests/ui/codemap_tests/unicode.expanded.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ extern crate std;
77
//@ revisions: normal expanded
88
//@[expanded] check-pass
99
//@[expanded]compile-flags: -Zunpretty=expanded
10+
//@ edition: 2015
1011

1112
extern "路濫狼á́́" fn foo() {}
1213

tests/ui/codemap_tests/unicode.normal.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0703]: invalid ABI: found `路濫狼á́́`
2-
--> $DIR/unicode.rs:5:8
2+
--> $DIR/unicode.rs:6:8
33
|
44
LL | extern "路濫狼á́́" fn foo() {}
55
| ^^^^^^^^^ invalid ABI

tests/ui/codemap_tests/unicode.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ revisions: normal expanded
22
//@[expanded] check-pass
33
//@[expanded]compile-flags: -Zunpretty=expanded
4+
//@ edition: 2015
45

56
extern "路濫狼á́́" fn foo() {} //[normal]~ ERROR invalid ABI
67

tests/ui/const-generics/defaults/pretty-printing-ast.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Test the AST pretty printer correctly handles default values for const generics
22
//@ check-pass
33
//@ compile-flags: -Z unpretty=expanded
4+
//@ edition: 2015
45

56
#![crate_type = "lib"]
67

tests/ui/const-generics/defaults/pretty-printing-ast.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Test the AST pretty printer correctly handles default values for const generics
44
//@ check-pass
55
//@ compile-flags: -Z unpretty=expanded
6+
//@ edition: 2015
67

78
#![crate_type = "lib"]
89
#[prelude_import]

tests/ui/deriving/built-in-proc-macro-scope.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ check-pass
22
//@ proc-macro: another-proc-macro.rs
33
//@ compile-flags: -Zunpretty=expanded
4+
//@ edition:2015
45

56
#![feature(derive_coerce_pointee)]
67

tests/ui/deriving/built-in-proc-macro-scope.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//@ check-pass
44
//@ proc-macro: another-proc-macro.rs
55
//@ compile-flags: -Zunpretty=expanded
6+
//@ edition:2015
67

78
#![feature(derive_coerce_pointee)]
89
#[prelude_import]

tests/ui/deriving/deriving-coerce-pointee-expanded.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ check-pass
22
//@ compile-flags: -Zunpretty=expanded
3+
//@ edition: 2015
34
#![feature(derive_coerce_pointee)]
45
use std::marker::CoercePointee;
56

tests/ui/deriving/deriving-coerce-pointee-expanded.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![no_std]
33
//@ check-pass
44
//@ compile-flags: -Zunpretty=expanded
5+
//@ edition: 2015
56
#![feature(derive_coerce_pointee)]
67
#[prelude_import]
78
use ::std::prelude::rust_2015::*;

tests/ui/deriving/proc-macro-attribute-mixing.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//@ check-pass
88
//@ proc-macro: another-proc-macro.rs
99
//@ compile-flags: -Zunpretty=expanded
10+
//@ edition: 2015
1011

1112
#![feature(derive_coerce_pointee)]
1213

tests/ui/deriving/proc-macro-attribute-mixing.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//@ check-pass
1010
//@ proc-macro: another-proc-macro.rs
1111
//@ compile-flags: -Zunpretty=expanded
12+
//@ edition: 2015
1213

1314
#![feature(derive_coerce_pointee)]
1415
#[prelude_import]

tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// This ensures that ICEs like rust#94953 don't happen
22
//@ check-pass
33
//@ compile-flags: -Z unpretty=expanded
4+
//@ edition: 2015
45

56
// This `expect` will create an expectation with an unstable expectation id
67
#[expect(while_true)]

tests/ui/lint/rfc-2383-lint-reason/no_ice_for_partial_compiler_runs.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ extern crate std;
77
// This ensures that ICEs like rust#94953 don't happen
88
//@ check-pass
99
//@ compile-flags: -Z unpretty=expanded
10+
//@ edition: 2015
1011

1112
// This `expect` will create an expectation with an unstable expectation id
1213
#[expect(while_true)]

tests/ui/macros/genercs-in-path-with-prettry-hir.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ compile-flags: -Zunpretty=hir
2+
//@ edition: 2015
23

34
// issue#97006
45

tests/ui/macros/genercs-in-path-with-prettry-hir.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unexpected generic arguments in path
2-
--> $DIR/genercs-in-path-with-prettry-hir.rs:12:10
2+
--> $DIR/genercs-in-path-with-prettry-hir.rs:13:10
33
|
44
LL | m!(inline<u8>);
55
| ^^^^

tests/ui/macros/genercs-in-path-with-prettry-hir.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use ::std::prelude::rust_2015::*;
33
#[macro_use]
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir
6+
//@ edition: 2015
67

78
// issue#97006
89

tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ check-pass
22
//@ compile-flags: -Z unpretty=expanded
3+
//@ edition: 2015
34

45
#![feature(core_intrinsics, generic_assert)]
56

tests/ui/macros/rfc-2011-nicer-assert-messages/non-consuming-methods-have-optimized-codegen.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![no_std]
33
//@ check-pass
44
//@ compile-flags: -Z unpretty=expanded
5+
//@ edition: 2015
56

67
#![feature(core_intrinsics, generic_assert)]
78
#[prelude_import]

tests/ui/match/issue-82392.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// https://github.com/rust-lang/rust/issues/82329
22
//@ compile-flags: -Zunpretty=hir,typed
33
//@ check-pass
4+
//@ edition:2015
45

56
pub fn main() {
67
if true {

tests/ui/match/issue-82392.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ extern crate std;
55
// https://github.com/rust-lang/rust/issues/82329
66
//@ compile-flags: -Zunpretty=hir,typed
77
//@ check-pass
8+
//@ edition:2015
89

910
fn main() ({
1011
(if (true as bool)

tests/ui/proc-macro/nonterminal-token-hygiene.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//@ normalize-stdout: "expn\d{3,}" -> "expnNNN"
99
//@ normalize-stdout: "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */"
1010
//@ proc-macro: test-macros.rs
11+
//@ edition: 2015
1112

1213
#![feature(decl_macro)]
1314
#![no_std] // Don't load unnecessary hygiene information from std

tests/ui/proc-macro/nonterminal-token-hygiene.stdout

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
55
stream: TokenStream [
66
Ident {
77
ident: "struct",
8-
span: $DIR/nonterminal-token-hygiene.rs:32:5: 32:11 (#5),
8+
span: $DIR/nonterminal-token-hygiene.rs:33:5: 33:11 (#5),
99
},
1010
Ident {
1111
ident: "S",
12-
span: $DIR/nonterminal-token-hygiene.rs:32:12: 32:13 (#5),
12+
span: $DIR/nonterminal-token-hygiene.rs:33:12: 33:13 (#5),
1313
},
1414
Punct {
1515
ch: ';',
1616
spacing: Alone,
17-
span: $DIR/nonterminal-token-hygiene.rs:32:13: 32:14 (#5),
17+
span: $DIR/nonterminal-token-hygiene.rs:33:13: 33:14 (#5),
1818
},
1919
],
20-
span: $DIR/nonterminal-token-hygiene.rs:22:27: 22:32 (#4),
20+
span: $DIR/nonterminal-token-hygiene.rs:23:27: 23:32 (#4),
2121
},
2222
]
2323
#![feature /* 0#0 */(prelude_import)]
@@ -32,6 +32,7 @@ PRINT-BANG INPUT (DEBUG): TokenStream [
3232
//@ normalize-stdout: "expn\d{3,}" -> "expnNNN"
3333
//@ normalize-stdout: "extern crate compiler_builtins /\* \d+ \*/" -> "extern crate compiler_builtins /* NNN */"
3434
//@ proc-macro: test-macros.rs
35+
//@ edition: 2015
3536

3637
#![feature /* 0#0 */(decl_macro)]
3738
#![no_std /* 0#0 */]

tests/ui/proc-macro/quote/debug.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//@ no-prefer-dynamic
44
//@ compile-flags: -Z unpretty=expanded
55
//@ needs-unwind compiling proc macros with panic=abort causes a warning
6+
//@ edition: 2015
67
//
78
// This file is not actually used as a proc-macro - instead,
89
// it's just used to show the output of the `quote!` macro

tests/ui/proc-macro/quote/debug.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//@ no-prefer-dynamic
66
//@ compile-flags: -Z unpretty=expanded
77
//@ needs-unwind compiling proc macros with panic=abort causes a warning
8+
//@ edition: 2015
89
//
910
// This file is not actually used as a proc-macro - instead,
1011
// it's just used to show the output of the `quote!` macro

tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ check-pass
22
//@ compile-flags: -Z unpretty=expanded
3+
//@ edition: 2015
34

45
fn main() {
56
if let 0 = 1 {}

tests/ui/rfcs/rfc-2497-if-let-chains/ast-pretty-check.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ use ::std::prelude::rust_2015::*;
66
extern crate std;
77
//@ check-pass
88
//@ compile-flags: -Z unpretty=expanded
9+
//@ edition: 2015
910

1011
fn main() { if let 0 = 1 {} }

tests/ui/type-alias-impl-trait/issue-60662.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ check-pass
22
//@ compile-flags: -Z unpretty=hir
3+
//@ edition: 2015
34

45
#![feature(type_alias_impl_trait)]
56

tests/ui/type-alias-impl-trait/issue-60662.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ check-pass
22
//@ compile-flags: -Z unpretty=hir
3+
//@ edition: 2015
34

45
#![feature(type_alias_impl_trait)]
56
#[prelude_import]

tests/ui/unpretty/bad-literal.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=hir
22
//@ check-fail
3+
//@ edition: 2015
34

45
// In #100948 this caused an ICE with -Zunpretty=hir.
56
fn main() {

tests/ui/unpretty/bad-literal.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: invalid suffix `u` for number literal
2-
--> $DIR/bad-literal.rs:6:5
2+
--> $DIR/bad-literal.rs:7:5
33
|
44
LL | 1u;
55
| ^^ invalid suffix `u`

tests/ui/unpretty/bad-literal.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir
66
//@ check-fail
7+
//@ edition: 2015
78

89
// In #100948 this caused an ICE with -Zunpretty=hir.
910
fn main() {

tests/ui/unpretty/debug-fmt-hir.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=hir
22
//@ check-pass
3+
//@ edition: 2015
34

45
use std::fmt;
56

tests/ui/unpretty/debug-fmt-hir.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir
66
//@ check-pass
7+
//@ edition: 2015
78

89
use std::fmt;
910

tests/ui/unpretty/deprecated-attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=hir
22
//@ check-pass
3+
//@ edition: 2015
34

45
#[deprecated]
56
pub struct PlainDeprecated;

tests/ui/unpretty/deprecated-attr.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir
66
//@ check-pass
7+
//@ edition: 2015
78

89
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
910
struct PlainDeprecated;

tests/ui/unpretty/diagnostic-attr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=hir
22
//@ check-pass
3+
//@ edition: 2015
34

45
#[diagnostic::on_unimplemented(
56
message = "My Message for `ImportantTrait<{A}>` implemented for `{Self}`",

tests/ui/unpretty/diagnostic-attr.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir
66
//@ check-pass
7+
//@ edition: 2015
78

89
#[diagnostic::on_unimplemented(message =
910
"My Message for `ImportantTrait<{A}>` implemented for `{Self}`", label =

tests/ui/unpretty/expanded-interpolation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=expanded
22
//@ check-pass
3+
//@ edition: 2015
34

45
// This test covers the AST pretty-printer's insertion of parentheses in some
56
// macro metavariable edge cases. Synthetic parentheses (i.e. not appearing in

tests/ui/unpretty/expanded-interpolation.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![no_std]
33
//@ compile-flags: -Zunpretty=expanded
44
//@ check-pass
5+
//@ edition: 2015
56

67
// This test covers the AST pretty-printer's insertion of parentheses in some
78
// macro metavariable edge cases. Synthetic parentheses (i.e. not appearing in

tests/ui/unpretty/flattened-format-args.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes
22
//@ check-pass
3+
//@ edition: 2015
34

45
fn main() {
56
let x = 1;

tests/ui/unpretty/flattened-format-args.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes
66
//@ check-pass
7+
//@ edition: 2015
78

89
fn main() {
910
let x = 1;

tests/ui/unpretty/let-else-hir.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=hir
22
//@ check-pass
3+
//@ edition: 2015
34

45

56

tests/ui/unpretty/let-else-hir.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir
66
//@ check-pass
7+
//@ edition: 2015
78

89

910

tests/ui/unpretty/self-hir.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ compile-flags: -Zunpretty=hir
22
//@ check-pass
3+
//@ edition: 2015
34

45
pub struct Bar {
56
a: String,

tests/ui/unpretty/self-hir.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ::std::prelude::rust_2015::*;
44
extern crate std;
55
//@ compile-flags: -Zunpretty=hir
66
//@ check-pass
7+
//@ edition: 2015
78

89
struct Bar {
910
a: String,

tests/ui/unpretty/unpretty-expr-fn-arg.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
//@ check-pass
88
//@ compile-flags: -Zunpretty=hir,typed
9+
//@ edition: 2015
910
#![allow(dead_code)]
1011

1112
fn main() {}

tests/ui/unpretty/unpretty-expr-fn-arg.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
//@ check-pass
88
//@ compile-flags: -Zunpretty=hir,typed
9+
//@ edition: 2015
910
#![allow(dead_code)]
1011
#[prelude_import]
1112
use ::std::prelude::rust_2015::*;

0 commit comments

Comments
 (0)