diff --git a/tests/ui/issues/issue-10806.rs b/tests/ui/issues/issue-10806.rs index 72d99ae3a795e..31315dc7c93a5 100644 --- a/tests/ui/issues/issue-10806.rs +++ b/tests/ui/issues/issue-10806.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ run-pass #![allow(unused_imports)] diff --git a/tests/ui/issues/issue-12729.rs b/tests/ui/issues/issue-12729.rs index 74014981df5de..4d45846bc6083 100644 --- a/tests/ui/issues/issue-12729.rs +++ b/tests/ui/issues/issue-12729.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ check-pass #![allow(dead_code)] diff --git a/tests/ui/issues/issue-13105.rs b/tests/ui/issues/issue-13105.rs index 0dd78372a2690..d119aa9c788d9 100644 --- a/tests/ui/issues/issue-13105.rs +++ b/tests/ui/issues/issue-13105.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ check-pass trait Foo { diff --git a/tests/ui/issues/issue-13775.rs b/tests/ui/issues/issue-13775.rs index 500ec6782a8b1..1477dab9e2158 100644 --- a/tests/ui/issues/issue-13775.rs +++ b/tests/ui/issues/issue-13775.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ check-pass trait Foo { diff --git a/tests/ui/issues/issue-15774.rs b/tests/ui/issues/issue-15774.rs index 8eb327a0d5e7a..dadd59cc077b1 100644 --- a/tests/ui/issues/issue-15774.rs +++ b/tests/ui/issues/issue-15774.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ run-pass #![deny(warnings)] diff --git a/tests/ui/issues/issue-34074.rs b/tests/ui/issues/issue-34074.rs index 9b3dee11d9b79..d642c74d412a4 100644 --- a/tests/ui/issues/issue-34074.rs +++ b/tests/ui/issues/issue-34074.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ check-pass // Make sure several unnamed function parameters don't conflict with each other diff --git a/tests/ui/issues/issue-50571.fixed b/tests/ui/issues/issue-50571.fixed index 37ed729be8168..6d73f17cca4ca 100644 --- a/tests/ui/issues/issue-50571.fixed +++ b/tests/ui/issues/issue-50571.fixed @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/issues/issue-50571.rs b/tests/ui/issues/issue-50571.rs index 97a042d3ec1fb..dd840ffe4d170 100644 --- a/tests/ui/issues/issue-50571.rs +++ b/tests/ui/issues/issue-50571.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ run-rustfix #![allow(dead_code)] diff --git a/tests/ui/issues/issue-50571.stderr b/tests/ui/issues/issue-50571.stderr index 86709410670c1..9b00fe0f5db64 100644 --- a/tests/ui/issues/issue-50571.stderr +++ b/tests/ui/issues/issue-50571.stderr @@ -1,5 +1,5 @@ error[E0642]: patterns aren't allowed in methods without bodies - --> $DIR/issue-50571.rs:5:12 + --> $DIR/issue-50571.rs:6:12 | LL | fn foo([a, b]: [i32; 2]) {} | ^^^^^^ diff --git a/tests/ui/issues/issue-86756.rs b/tests/ui/issues/issue-86756.rs index 7f864eb285074..55a6c144839e8 100644 --- a/tests/ui/issues/issue-86756.rs +++ b/tests/ui/issues/issue-86756.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 trait Foo {} //~^ ERROR the name `T` is already used for a generic parameter in this item's generic parameters diff --git a/tests/ui/issues/issue-86756.stderr b/tests/ui/issues/issue-86756.stderr index 728d7ea709558..0f68b7648503c 100644 --- a/tests/ui/issues/issue-86756.stderr +++ b/tests/ui/issues/issue-86756.stderr @@ -1,5 +1,5 @@ error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters - --> $DIR/issue-86756.rs:1:14 + --> $DIR/issue-86756.rs:2:14 | LL | trait Foo {} | - ^ already used @@ -7,13 +7,13 @@ LL | trait Foo {} | first use of `T` error[E0412]: cannot find type `dyn` in this scope - --> $DIR/issue-86756.rs:5:10 + --> $DIR/issue-86756.rs:6:10 | LL | eq:: | ^^^ not found in this scope warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/issue-86756.rs:5:15 + --> $DIR/issue-86756.rs:6:15 | LL | eq:: | ^^^ @@ -27,13 +27,13 @@ LL | eq:: | +++ error[E0107]: missing generics for trait `Foo` - --> $DIR/issue-86756.rs:5:15 + --> $DIR/issue-86756.rs:6:15 | LL | eq:: | ^^^ expected at least 1 generic argument | note: trait defined here, with at least 1 generic parameter: `T` - --> $DIR/issue-86756.rs:1:7 + --> $DIR/issue-86756.rs:2:7 | LL | trait Foo {} | ^^^ - diff --git a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rs b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rs index 52781d9c6d858..5b290899a70ba 100644 --- a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rs +++ b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rs @@ -1,4 +1,5 @@ //@ revisions: rust2015 rust2018 rust2021 +//@[rust2015] edition:2015 //@[rust2018] edition:2018 //@[rust2021] edition:2021 fn main() { diff --git a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2015.stderr b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2015.stderr index 2f92225de1fba..be3b114baf9ef 100644 --- a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2015.stderr +++ b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2015.stderr @@ -1,5 +1,5 @@ error[E0762]: unterminated character literal - --> $DIR/lex-bad-str-literal-as-char-3.rs:5:26 + --> $DIR/lex-bad-str-literal-as-char-3.rs:6:26 | LL | println!('hello world'); | ^^^ diff --git a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2018.stderr b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2018.stderr index 2f92225de1fba..be3b114baf9ef 100644 --- a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2018.stderr +++ b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2018.stderr @@ -1,5 +1,5 @@ error[E0762]: unterminated character literal - --> $DIR/lex-bad-str-literal-as-char-3.rs:5:26 + --> $DIR/lex-bad-str-literal-as-char-3.rs:6:26 | LL | println!('hello world'); | ^^^ diff --git a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2021.stderr b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2021.stderr index e10046e58e451..605cb66df1cf0 100644 --- a/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2021.stderr +++ b/tests/ui/lexer/lex-bad-str-literal-as-char-3.rust2021.stderr @@ -1,5 +1,5 @@ error: prefix `world` is unknown - --> $DIR/lex-bad-str-literal-as-char-3.rs:5:21 + --> $DIR/lex-bad-str-literal-as-char-3.rs:6:21 | LL | println!('hello world'); | ^^^^^ unknown prefix @@ -12,7 +12,7 @@ LL + println!("hello world"); | error[E0762]: unterminated character literal - --> $DIR/lex-bad-str-literal-as-char-3.rs:5:26 + --> $DIR/lex-bad-str-literal-as-char-3.rs:6:26 | LL | println!('hello world'); | ^^^ diff --git a/tests/ui/lifetimes/bare-trait-object-borrowck.rs b/tests/ui/lifetimes/bare-trait-object-borrowck.rs index c54d3effffe52..4b81b66118a7a 100644 --- a/tests/ui/lifetimes/bare-trait-object-borrowck.rs +++ b/tests/ui/lifetimes/bare-trait-object-borrowck.rs @@ -1,5 +1,7 @@ -#![allow(bare_trait_objects)] +//@ edition: 2015 //@ check-pass +#![allow(bare_trait_objects)] + pub struct FormatWith<'a, I, F> { sep: &'a str, /// FormatWith uses interior mutability because Display::fmt takes &self. diff --git a/tests/ui/lifetimes/bare-trait-object.rs b/tests/ui/lifetimes/bare-trait-object.rs index 2feb8a880b1d9..e74f8ac03eab6 100644 --- a/tests/ui/lifetimes/bare-trait-object.rs +++ b/tests/ui/lifetimes/bare-trait-object.rs @@ -1,4 +1,5 @@ // Verify that lifetime resolution correctly accounts for `Fn` bare trait objects. +//@ edition: 2015 //@ check-pass #![allow(bare_trait_objects)] diff --git a/tests/ui/lint/bare-trait-objects-path.rs b/tests/ui/lint/bare-trait-objects-path.rs index 0e2294715cd8b..9643c48c9b8c1 100644 --- a/tests/ui/lint/bare-trait-objects-path.rs +++ b/tests/ui/lint/bare-trait-objects-path.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 #![feature(associated_type_defaults)] trait Assoc { diff --git a/tests/ui/lint/bare-trait-objects-path.stderr b/tests/ui/lint/bare-trait-objects-path.stderr index e611abd31f3b4..25f3e857806f2 100644 --- a/tests/ui/lint/bare-trait-objects-path.stderr +++ b/tests/ui/lint/bare-trait-objects-path.stderr @@ -1,5 +1,5 @@ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/bare-trait-objects-path.rs:14:5 + --> $DIR/bare-trait-objects-path.rs:15:5 | LL | Dyn::func(); | ^^^ @@ -13,7 +13,7 @@ LL | ::func(); | ++++ + warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/bare-trait-objects-path.rs:17:5 + --> $DIR/bare-trait-objects-path.rs:18:5 | LL | ::Dyn::func(); | ^^^^^ @@ -26,7 +26,7 @@ LL | ::func(); | ++++++ ++ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/bare-trait-objects-path.rs:20:5 + --> $DIR/bare-trait-objects-path.rs:21:5 | LL | Dyn::CONST; | ^^^ @@ -39,7 +39,7 @@ LL | ::CONST; | ++++ + warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/bare-trait-objects-path.rs:23:12 + --> $DIR/bare-trait-objects-path.rs:24:12 | LL | let _: Dyn::Ty; | ^^^ @@ -52,7 +52,7 @@ LL | let _: ::Ty; | ++++ + error[E0223]: ambiguous associated type - --> $DIR/bare-trait-objects-path.rs:23:12 + --> $DIR/bare-trait-objects-path.rs:24:12 | LL | let _: Dyn::Ty; | ^^^^^^^ diff --git a/tests/ui/lint/lint-pre-expansion-extern-module.rs b/tests/ui/lint/lint-pre-expansion-extern-module.rs index f1ab0cf3b7425..e85261befbc0b 100644 --- a/tests/ui/lint/lint-pre-expansion-extern-module.rs +++ b/tests/ui/lint/lint-pre-expansion-extern-module.rs @@ -1,5 +1,6 @@ //@ check-pass //@ compile-flags: -W rust-2018-compatibility +//@ edition: 2015 fn main() {} diff --git a/tests/ui/lint/lint-qualification.fixed b/tests/ui/lint/lint-qualification.fixed index 7c8fd5236e608..04067b6b6ff64 100644 --- a/tests/ui/lint/lint-qualification.fixed +++ b/tests/ui/lint/lint-qualification.fixed @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ run-rustfix #![deny(unused_qualifications)] #![deny(unused_imports)] diff --git a/tests/ui/lint/lint-qualification.rs b/tests/ui/lint/lint-qualification.rs index 009b3080d5c79..20c261bf87829 100644 --- a/tests/ui/lint/lint-qualification.rs +++ b/tests/ui/lint/lint-qualification.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ run-rustfix #![deny(unused_qualifications)] #![deny(unused_imports)] diff --git a/tests/ui/lint/lint-qualification.stderr b/tests/ui/lint/lint-qualification.stderr index cefa54a12ae10..1e8b8da1e86a5 100644 --- a/tests/ui/lint/lint-qualification.stderr +++ b/tests/ui/lint/lint-qualification.stderr @@ -1,11 +1,11 @@ error: unnecessary qualification - --> $DIR/lint-qualification.rs:12:5 + --> $DIR/lint-qualification.rs:13:5 | LL | foo::bar(); | ^^^^^^^^ | note: the lint level is defined here - --> $DIR/lint-qualification.rs:2:9 + --> $DIR/lint-qualification.rs:3:9 | LL | #![deny(unused_qualifications)] | ^^^^^^^^^^^^^^^^^^^^^ @@ -16,7 +16,7 @@ LL + bar(); | error: unnecessary qualification - --> $DIR/lint-qualification.rs:13:5 + --> $DIR/lint-qualification.rs:14:5 | LL | crate::foo::bar(); | ^^^^^^^^^^^^^^^ @@ -28,7 +28,7 @@ LL + bar(); | error: unnecessary qualification - --> $DIR/lint-qualification.rs:18:13 + --> $DIR/lint-qualification.rs:19:13 | LL | let _ = std::string::String::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -40,7 +40,7 @@ LL + let _ = String::new(); | error: unnecessary qualification - --> $DIR/lint-qualification.rs:20:12 + --> $DIR/lint-qualification.rs:21:12 | LL | let _: std::vec::Vec = std::vec::Vec::::new(); | ^^^^^^^^^^^^^^^^^^^^^ @@ -52,7 +52,7 @@ LL + let _: Vec = std::vec::Vec::::new(); | error: unnecessary qualification - --> $DIR/lint-qualification.rs:20:36 + --> $DIR/lint-qualification.rs:21:36 | LL | let _: std::vec::Vec = std::vec::Vec::::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -64,19 +64,19 @@ LL + let _: std::vec::Vec = Vec::::new(); | error: unused import: `std::fmt` - --> $DIR/lint-qualification.rs:24:9 + --> $DIR/lint-qualification.rs:25:9 | LL | use std::fmt; | ^^^^^^^^ | note: the lint level is defined here - --> $DIR/lint-qualification.rs:3:9 + --> $DIR/lint-qualification.rs:4:9 | LL | #![deny(unused_imports)] | ^^^^^^^^^^^^^^ error: unnecessary qualification - --> $DIR/lint-qualification.rs:29:13 + --> $DIR/lint-qualification.rs:30:13 | LL | let _ = ::default(); // issue #121999 (modified) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.rs b/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.rs index 6abe3602abee7..7dc9ba0afeae5 100644 --- a/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.rs +++ b/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ check-pass #![warn(redundant_imports)] diff --git a/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.stderr b/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.stderr index 2b0e16a87dc06..48d5c275055f3 100644 --- a/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.stderr +++ b/tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.stderr @@ -1,5 +1,5 @@ warning: the item `Some` is imported redundantly - --> $DIR/use-redundant-prelude-rust-2015.rs:5:5 + --> $DIR/use-redundant-prelude-rust-2015.rs:6:5 | LL | use std::option::Option::Some; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -8,13 +8,13 @@ LL | use std::option::Option::Some; = note: the item `Some` is already defined here | note: the lint level is defined here - --> $DIR/use-redundant-prelude-rust-2015.rs:2:9 + --> $DIR/use-redundant-prelude-rust-2015.rs:3:9 | LL | #![warn(redundant_imports)] | ^^^^^^^^^^^^^^^^^ warning: the item `None` is imported redundantly - --> $DIR/use-redundant-prelude-rust-2015.rs:6:5 + --> $DIR/use-redundant-prelude-rust-2015.rs:7:5 | LL | use std::option::Option::None; | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ LL | use std::option::Option::None; = note: the item `None` is already defined here warning: the item `Ok` is imported redundantly - --> $DIR/use-redundant-prelude-rust-2015.rs:8:5 + --> $DIR/use-redundant-prelude-rust-2015.rs:9:5 | LL | use std::result::Result::Ok; | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | use std::result::Result::Ok; = note: the item `Ok` is already defined here warning: the item `Err` is imported redundantly - --> $DIR/use-redundant-prelude-rust-2015.rs:9:5 + --> $DIR/use-redundant-prelude-rust-2015.rs:10:5 | LL | use std::result::Result::Err; | ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/macros/try-macro.rs b/tests/ui/macros/try-macro.rs index b579143583eb7..f6268654cfc17 100644 --- a/tests/ui/macros/try-macro.rs +++ b/tests/ui/macros/try-macro.rs @@ -1,4 +1,5 @@ //@ run-pass +//@ edition: 2015 #![allow(deprecated)] // for deprecated `try!()` macro use std::num::{ParseFloatError, ParseIntError}; diff --git a/tests/ui/parser/dyn-trait-compatibility.rs b/tests/ui/parser/dyn-trait-compatibility.rs index 717b14c5941fd..c6e84284fbec1 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 08e0a50010a88..a57c033c1e13d 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; | ^^^ 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; | ^^^ 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; | ^^^ 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>; | ^^^ 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>; | ^^^ 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>; | ^^^ 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 529e0f1ab5cb8..13bd786d09219 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 188257ea53a31..f1bc561b89fb7 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 3bf68e8cc04fe..6f033e2b0c6ff 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 332258b628c37..3f7e0f685acd2 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 02323cb99cbf3..1243ef8b1802b 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 b9e3c5783ebd7..b78832bbe3dc0 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 a012220e8c7c9..3745cf8b07790 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 dyn>; | ^ expected identifier diff --git a/tests/ui/proc-macro/trait-fn-args-2015.rs b/tests/ui/proc-macro/trait-fn-args-2015.rs index c25bd768efe76..010d986a86df6 100644 --- a/tests/ui/proc-macro/trait-fn-args-2015.rs +++ b/tests/ui/proc-macro/trait-fn-args-2015.rs @@ -1,6 +1,7 @@ // Unnamed arguments in trait functions can be passed through proc macros on 2015 edition. //@ check-pass +//@ edition: 2015 //@ proc-macro: test-macros.rs #![allow(anonymous_parameters)]