diff --git a/tests/ui/did_you_mean/E0178.rs b/tests/ui/did_you_mean/E0178.rs index 095df640c38f2..cdaddac35a357 100644 --- a/tests/ui/did_you_mean/E0178.rs +++ b/tests/ui/did_you_mean/E0178.rs @@ -1,3 +1,4 @@ +//@ edition:2015 #![allow(bare_trait_objects)] trait Foo {} diff --git a/tests/ui/did_you_mean/E0178.stderr b/tests/ui/did_you_mean/E0178.stderr index 36e4dbdf7c45d..7b69f860381ea 100644 --- a/tests/ui/did_you_mean/E0178.stderr +++ b/tests/ui/did_you_mean/E0178.stderr @@ -1,5 +1,5 @@ error[E0178]: expected a path on the left-hand side of `+` - --> $DIR/E0178.rs:6:8 + --> $DIR/E0178.rs:7:8 | LL | w: &'a Foo + Copy, | ^^^^^^^ @@ -10,7 +10,7 @@ LL | w: &'a (Foo + Copy), | + + error[E0178]: expected a path on the left-hand side of `+` - --> $DIR/E0178.rs:7:8 + --> $DIR/E0178.rs:8:8 | LL | x: &'a Foo + 'a, | ^^^^^^^ @@ -21,7 +21,7 @@ LL | x: &'a (Foo + 'a), | + + error[E0178]: expected a path on the left-hand side of `+` - --> $DIR/E0178.rs:8:8 + --> $DIR/E0178.rs:9:8 | LL | y: &'a mut Foo + 'a, | ^^^^^^^^^^^ @@ -32,7 +32,7 @@ LL | y: &'a mut (Foo + 'a), | + + error[E0178]: expected a path on the left-hand side of `+` - --> $DIR/E0178.rs:9:8 + --> $DIR/E0178.rs:10:8 | LL | z: fn() -> Foo + 'a, | ^^^^^^^^^^^----- diff --git a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs index b7470864a30db..eff431f4665f9 100644 --- a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs +++ b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 #![allow(bare_trait_objects)] fn main() { diff --git a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr index 57dbc79a0fda2..b051d181ad80a 100644 --- a/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr +++ b/tests/ui/did_you_mean/trait-object-reference-without-parens-suggestion.stderr @@ -1,5 +1,5 @@ error[E0178]: expected a path on the left-hand side of `+` - --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:12 + --> $DIR/trait-object-reference-without-parens-suggestion.rs:5:12 | LL | let _: &Copy + 'static; | ^^^^^ @@ -10,7 +10,7 @@ LL | let _: &(Copy + 'static); | + + error[E0178]: expected a path on the left-hand side of `+` - --> $DIR/trait-object-reference-without-parens-suggestion.rs:6:12 + --> $DIR/trait-object-reference-without-parens-suggestion.rs:7:12 | LL | let _: &'static Copy + 'static; | ^^^^^^^^^^^^^ @@ -21,7 +21,7 @@ LL | let _: &'static (Copy + 'static); | + + error[E0038]: the trait `Copy` is not dyn compatible - --> $DIR/trait-object-reference-without-parens-suggestion.rs:4:13 + --> $DIR/trait-object-reference-without-parens-suggestion.rs:5:13 | LL | let _: &Copy + 'static; | ^^^^ `Copy` is not dyn compatible @@ -31,7 +31,7 @@ LL | let _: &Copy + 'static; for more information, visit error[E0038]: the trait `Copy` is not dyn compatible - --> $DIR/trait-object-reference-without-parens-suggestion.rs:6:21 + --> $DIR/trait-object-reference-without-parens-suggestion.rs:7:21 | LL | let _: &'static Copy + 'static; | ^^^^ `Copy` is not dyn compatible diff --git a/tests/ui/editions/async-block-2015.rs b/tests/ui/editions/async-block-2015.rs index a079b4aad911e..21549f059de26 100644 --- a/tests/ui/editions/async-block-2015.rs +++ b/tests/ui/editions/async-block-2015.rs @@ -1,3 +1,4 @@ +//@ edition:2015 async fn foo() { //~^ ERROR `async fn` is not permitted in Rust 2015 //~| NOTE to use `async fn`, switch to Rust 2018 or later diff --git a/tests/ui/editions/async-block-2015.stderr b/tests/ui/editions/async-block-2015.stderr index 574bcacc1cfa7..139df1758cc43 100644 --- a/tests/ui/editions/async-block-2015.stderr +++ b/tests/ui/editions/async-block-2015.stderr @@ -1,5 +1,5 @@ error[E0670]: `async fn` is not permitted in Rust 2015 - --> $DIR/async-block-2015.rs:1:1 + --> $DIR/async-block-2015.rs:2:1 | LL | async fn foo() { | ^^^^^ to use `async fn`, switch to Rust 2018 or later @@ -8,7 +8,7 @@ LL | async fn foo() { = note: for more on editions, read https://doc.rust-lang.org/edition-guide error: expected identifier, found keyword `let` - --> $DIR/async-block-2015.rs:11:9 + --> $DIR/async-block-2015.rs:12:9 | LL | let y = async { | ----- `async` blocks are only allowed in Rust 2018 or later @@ -19,7 +19,7 @@ LL | let x = 42; = note: for more on editions, read https://doc.rust-lang.org/edition-guide error: expected identifier, found `42` - --> $DIR/async-block-2015.rs:19:9 + --> $DIR/async-block-2015.rs:20:9 | LL | let z = async { | ----- `async` blocks are only allowed in Rust 2018 or later @@ -30,7 +30,7 @@ LL | 42 = note: for more on editions, read https://doc.rust-lang.org/edition-guide error[E0422]: cannot find struct, variant or union type `async` in this scope - --> $DIR/async-block-2015.rs:7:13 + --> $DIR/async-block-2015.rs:8:13 | LL | let x = async {}; | ^^^^^ `async` blocks are only allowed in Rust 2018 or later diff --git a/tests/ui/ergonomic-clones/async/edition-2015.rs b/tests/ui/ergonomic-clones/async/edition-2015.rs index d3b2071b9f91f..7883124942902 100644 --- a/tests/ui/ergonomic-clones/async/edition-2015.rs +++ b/tests/ui/ergonomic-clones/async/edition-2015.rs @@ -1,3 +1,4 @@ +//@ edition:2015 #![feature(ergonomic_clones)] #![allow(incomplete_features)] diff --git a/tests/ui/ergonomic-clones/async/edition-2015.stderr b/tests/ui/ergonomic-clones/async/edition-2015.stderr index b218e6b242e19..8de90f4bfd3c9 100644 --- a/tests/ui/ergonomic-clones/async/edition-2015.stderr +++ b/tests/ui/ergonomic-clones/async/edition-2015.stderr @@ -1,5 +1,5 @@ error: `async use` blocks are only allowed in Rust 2018 or later - --> $DIR/edition-2015.rs:5:5 + --> $DIR/edition-2015.rs:6:5 | LL | async use {}; | ^^^^^^^^^ diff --git a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs index 69a4c13530bd3..d6bb64662270e 100644 --- a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs +++ b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.rs @@ -1,3 +1,4 @@ +//@ edition:2015 trait MyIterator : Iterator {} fn main() { diff --git a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr index 24f00cfa6be91..7f3022c29233e 100644 --- a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr +++ b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr @@ -1,5 +1,5 @@ warning: trait objects without an explicit `dyn` are deprecated - --> $DIR/dynless-turbofish-e0191-issue-91997.rs:4:13 + --> $DIR/dynless-turbofish-e0191-issue-91997.rs:5:13 | LL | let _ = MyIterator::next; | ^^^^^^^^^^ @@ -13,7 +13,7 @@ LL | let _ = ::next; | ++++ + error[E0191]: the value of the associated type `Item` in `Iterator` must be specified - --> $DIR/dynless-turbofish-e0191-issue-91997.rs:4:13 + --> $DIR/dynless-turbofish-e0191-issue-91997.rs:5:13 | LL | let _ = MyIterator::next; | ^^^^^^^^^^ help: specify the associated type: `MyIterator::` diff --git a/tests/ui/expr/scope.rs b/tests/ui/expr/scope.rs index 3a1c8b87da8fa..b059e43de9ee2 100644 --- a/tests/ui/expr/scope.rs +++ b/tests/ui/expr/scope.rs @@ -1,3 +1,4 @@ +//@ edition:2015 //@ run-pass // Regression test for issue #762 diff --git a/tests/ui/imports/import-glob-crate.rs b/tests/ui/imports/import-glob-crate.rs index 0a2ca6ef2c315..ee0679318766b 100644 --- a/tests/ui/imports/import-glob-crate.rs +++ b/tests/ui/imports/import-glob-crate.rs @@ -1,3 +1,4 @@ +//@ edition: 2015 //@ run-pass use std::mem::*;