diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index ed89bf0d806..939154fac7a 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -909,13 +909,14 @@ pub fn build_session_with_codemap(sopts: config::Options, let emitter: Box = match (sopts.error_format, emitter_dest) { (config::ErrorOutputType::HumanReadable(color_config), None) => { - Box::new(EmitterWriter::stderr(color_config, - Some(codemap.clone()), - false, - sopts.debugging_opts.teach)) + Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()), + false, sopts.debugging_opts.teach) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::HumanReadable(_), Some(dst)) => { - Box::new(EmitterWriter::new(dst, Some(codemap.clone()), false, false)) + Box::new(EmitterWriter::new(dst, Some(codemap.clone()), + false, false) + .ui_testing(sopts.debugging_opts.ui_testing)) } (config::ErrorOutputType::Json(pretty), None) => { Box::new(JsonEmitter::stderr(Some(registry), codemap.clone(), diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index d04a210a904..0bd9b7268cb 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -189,8 +189,9 @@ impl EmitterWriter { } } - pub fn ui_testing(self, ui_testing: bool) -> Self { - Self { ui_testing, ..self } + pub fn ui_testing(mut self, ui_testing: bool) -> Self { + self.ui_testing = ui_testing; + self } fn maybe_anonymized(&self, line_num: usize) -> String { diff --git a/src/test/ui-fulldeps/proc-macro/load-panic.stderr b/src/test/ui-fulldeps/proc-macro/load-panic.stderr index ab2ab84315a..edfd134469c 100644 --- a/src/test/ui-fulldeps/proc-macro/load-panic.stderr +++ b/src/test/ui-fulldeps/proc-macro/load-panic.stderr @@ -1,7 +1,7 @@ error: proc-macro derive panicked --> $DIR/load-panic.rs:17:10 | -17 | #[derive(A)] +LL | #[derive(A)] | ^ | = help: message: nope! diff --git a/src/test/ui/command-line-diagnostics.stderr b/src/test/ui/command-line-diagnostics.stderr index fd7f98ea563..9e9e03373e8 100644 --- a/src/test/ui/command-line-diagnostics.stderr +++ b/src/test/ui/command-line-diagnostics.stderr @@ -1,9 +1,9 @@ error[E0384]: cannot assign twice to immutable variable `x` --> $DIR/command-line-diagnostics.rs:16:5 | -15 | let x = 42; +LL | let x = 42; | - first assignment to `x` -16 | x = 43; +LL | x = 43; | ^^^^^^ cannot assign twice to immutable variable error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr index 322c2090207..64c20ff8e07 100644 --- a/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr +++ b/src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr @@ -1,13 +1,13 @@ error[E0560]: struct `submodule::Demo` has no field named `inocently_mispellable` --> $DIR/issue-42599_available_fields_note.rs:26:39 | -26 | Self { secret_integer: 2, inocently_mispellable: () } +LL | Self { secret_integer: 2, inocently_mispellable: () } | ^^^^^^^^^^^^^^^^^^^^^ field does not exist - did you mean `innocently_misspellable`? error[E0560]: struct `submodule::Demo` has no field named `egregiously_nonexistent_field` --> $DIR/issue-42599_available_fields_note.rs:31:39 | -31 | Self { secret_integer: 3, egregiously_nonexistent_field: () } +LL | Self { secret_integer: 3, egregiously_nonexistent_field: () } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `submodule::Demo` does not have this field | = note: available fields are: `favorite_integer`, `secret_integer`, `innocently_misspellable`, `another_field`, `yet_another_field` ... and 2 others diff --git a/src/test/ui/error-codes/E0062.stderr b/src/test/ui/error-codes/E0062.stderr index 0978de24f15..a24c5e05914 100644 --- a/src/test/ui/error-codes/E0062.stderr +++ b/src/test/ui/error-codes/E0062.stderr @@ -3,7 +3,7 @@ error[E0062]: field `x` specified more than once | LL | x: 0, | ---- first use of `x` -18 | x: 0, +LL | x: 0, | ^ used more than once error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0559.stderr b/src/test/ui/error-codes/E0559.stderr index c5a2aa6a949..5e0382de5c9 100644 --- a/src/test/ui/error-codes/E0559.stderr +++ b/src/test/ui/error-codes/E0559.stderr @@ -1,7 +1,7 @@ error[E0559]: variant `Field::Fool` has no field named `joke` --> $DIR/E0559.rs:16:27 | -16 | let s = Field::Fool { joke: 0 }; +LL | let s = Field::Fool { joke: 0 }; | ^^^^ `Field::Fool` does not have this field | = note: available fields are: `x` diff --git a/src/test/ui/error-codes/E0560.stderr b/src/test/ui/error-codes/E0560.stderr index 71b2bfb32ad..1b4e62425f0 100644 --- a/src/test/ui/error-codes/E0560.stderr +++ b/src/test/ui/error-codes/E0560.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `Simba` has no field named `father` --> $DIR/E0560.rs:16:32 | -16 | let s = Simba { mother: 1, father: 0 }; +LL | let s = Simba { mother: 1, father: 0 }; | ^^^^^^ `Simba` does not have this field | = note: available fields are: `mother` diff --git a/src/test/ui/error-codes/E0657.stderr b/src/test/ui/error-codes/E0657.stderr index 13734d1eefa..34952dc73c2 100644 --- a/src/test/ui/error-codes/E0657.stderr +++ b/src/test/ui/error-codes/E0657.stderr @@ -1,14 +1,14 @@ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level --> $DIR/E0657.rs:20:31 | -LL | -> impl for<'a> Id> - | ^^ +LL | -> Box Id>> + | ^^ error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level --> $DIR/E0657.rs:29:35 | -LL | -> impl for<'a> Id> - | ^^ +LL | -> Box Id>> + | ^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/error-festival.stderr b/src/test/ui/error-festival.stderr index 35a35430fe1..231864e9655 100644 --- a/src/test/ui/error-festival.stderr +++ b/src/test/ui/error-festival.stderr @@ -1,19 +1,19 @@ error[E0425]: cannot find value `y` in this scope --> $DIR/error-festival.rs:24:5 | -24 | y = 2; +LL | y = 2; | ^ did you mean `x`? error[E0603]: constant `FOO` is private --> $DIR/error-festival.rs:32:5 | -32 | foo::FOO; +LL | foo::FOO; | ^^^^^^^^ error[E0368]: binary assignment operation `+=` cannot be applied to type `&str` --> $DIR/error-festival.rs:22:5 | -22 | x += 2; +LL | x += 2; | -^^^^^ | | | cannot use `+=` on type `&str` @@ -21,25 +21,25 @@ error[E0368]: binary assignment operation `+=` cannot be applied to type `&str` error[E0599]: no method named `z` found for type `&str` in the current scope --> $DIR/error-festival.rs:26:7 | -26 | x.z(); +LL | x.z(); | ^ error[E0600]: cannot apply unary operator `!` to type `Question` --> $DIR/error-festival.rs:29:5 | -29 | !Question::Yes; +LL | !Question::Yes; | ^^^^^^^^^^^^^^ error[E0604]: only `u8` can be cast as `char`, not `u32` --> $DIR/error-festival.rs:35:5 | -35 | 0u32 as char; +LL | 0u32 as char; | ^^^^^^^^^^^^ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` --> $DIR/error-festival.rs:39:5 | -39 | x as Vec; +LL | x as Vec; | ^^^^^^^^^^^^ | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait @@ -47,7 +47,7 @@ error[E0605]: non-primitive cast: `u8` as `std::vec::Vec` error[E0054]: cannot cast as `bool` --> $DIR/error-festival.rs:43:24 | -43 | let x_is_nonzero = x as bool; +LL | let x_is_nonzero = x as bool; | ^^^^^^^^^ unsupported cast | = help: compare with zero instead @@ -55,19 +55,19 @@ error[E0054]: cannot cast as `bool` error[E0606]: casting `&u8` as `u32` is invalid --> $DIR/error-festival.rs:47:18 | -47 | let y: u32 = x as u32; +LL | let y: u32 = x as u32; | ^^^^^^^^ cannot cast `&u8` as `u32` | help: did you mean `*x`? --> $DIR/error-festival.rs:47:18 | -47 | let y: u32 = x as u32; +LL | let y: u32 = x as u32; | ^ error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` --> $DIR/error-festival.rs:51:5 | -51 | v as *const [u8]; +LL | v as *const [u8]; | ^^^^^^^^^^^^^^^^ error: aborting due to 10 previous errors diff --git a/src/test/ui/feature-gate-if_while_or_patterns.stderr b/src/test/ui/feature-gate-if_while_or_patterns.stderr index d9ebdcee0e9..6096804190e 100644 --- a/src/test/ui/feature-gate-if_while_or_patterns.stderr +++ b/src/test/ui/feature-gate-if_while_or_patterns.stderr @@ -1,9 +1,9 @@ error[E0658]: multiple patterns in `if let` and `while let` are unstable (see issue #48215) --> $DIR/feature-gate-if_while_or_patterns.rs:12:5 | -12 | / if let 0 | 1 = 0 { //~ ERROR multiple patterns in `if let` and `while let` are unstable -13 | | ; -14 | | } +LL | / if let 0 | 1 = 0 { //~ ERROR multiple patterns in `if let` and `while let` are unstable +LL | | ; +LL | | } | |_____^ | = help: add #![feature(if_while_or_patterns)] to the crate attributes to enable @@ -11,9 +11,9 @@ error[E0658]: multiple patterns in `if let` and `while let` are unstable (see is error[E0658]: multiple patterns in `if let` and `while let` are unstable (see issue #48215) --> $DIR/feature-gate-if_while_or_patterns.rs:15:5 | -15 | / while let 0 | 1 = 1 { //~ ERROR multiple patterns in `if let` and `while let` are unstable -16 | | break; -17 | | } +LL | / while let 0 | 1 = 1 { //~ ERROR multiple patterns in `if let` and `while let` are unstable +LL | | break; +LL | | } | |_____^ | = help: add #![feature(if_while_or_patterns)] to the crate attributes to enable diff --git a/src/test/ui/impl_trait_projections.stderr b/src/test/ui/impl_trait_projections.stderr index a0a24cc9d04..f519f21215e 100644 --- a/src/test/ui/impl_trait_projections.stderr +++ b/src/test/ui/impl_trait_projections.stderr @@ -1,31 +1,31 @@ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:23:51 | -23 | fn projection_is_disallowed(x: impl Iterator) -> ::Item { +LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:30:9 | -30 | -> ::Item +LL | -> ::Item | ^^^^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:37:27 | -37 | -> <::std::ops::Range as Iterator>::Item +LL | -> <::std::ops::Range as Iterator>::Item | ^^^^^^^^^^ error[E0667]: `impl Trait` is not allowed in path parameters --> $DIR/impl_trait_projections.rs:44:29 | -44 | -> as Iterator>::Item +LL | -> as Iterator>::Item | ^^^^^^^^^^ error[E0223]: ambiguous associated type --> $DIR/impl_trait_projections.rs:23:50 | -23 | fn projection_is_disallowed(x: impl Iterator) -> ::Item { +LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type | = note: specify the type using the syntax `::Item` diff --git a/src/test/ui/issue-19922.stderr b/src/test/ui/issue-19922.stderr index 023c12ecce8..ac64cb12ef0 100644 --- a/src/test/ui/issue-19922.stderr +++ b/src/test/ui/issue-19922.stderr @@ -1,7 +1,7 @@ error[E0559]: variant `Homura::Akemi` has no field named `kaname` --> $DIR/issue-19922.rs:16:34 | -16 | let homura = Homura::Akemi { kaname: () }; +LL | let homura = Homura::Akemi { kaname: () }; | ^^^^^^ `Homura::Akemi` does not have this field | = note: available fields are: `madoka` diff --git a/src/test/ui/issue-23302-1.stderr b/src/test/ui/issue-23302-1.stderr index 1248d2075a5..13a2a23cc52 100644 --- a/src/test/ui/issue-23302-1.stderr +++ b/src/test/ui/issue-23302-1.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-1.rs:14:9 | -14 | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when const-evaluating `X::A::{{initializer}}`... --> $DIR/issue-23302-1.rs:14:5 | -14 | A = X::A as isize, //~ ERROR E0391 +LL | A = X::A as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^^^^^ = note: ...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-23302-2.stderr b/src/test/ui/issue-23302-2.stderr index 5438ce4b797..f303fa7c671 100644 --- a/src/test/ui/issue-23302-2.stderr +++ b/src/test/ui/issue-23302-2.stderr @@ -1,13 +1,13 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-2.rs:14:9 | -14 | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when const-evaluating `Y::A::{{initializer}}`... --> $DIR/issue-23302-2.rs:14:5 | -14 | A = Y::B as isize, //~ ERROR E0391 +LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^^^^^ = note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle. diff --git a/src/test/ui/issue-23302-3.stderr b/src/test/ui/issue-23302-3.stderr index 0a7e239d32f..ec615809749 100644 --- a/src/test/ui/issue-23302-3.stderr +++ b/src/test/ui/issue-23302-3.stderr @@ -1,18 +1,18 @@ error[E0391]: cyclic dependency detected --> $DIR/issue-23302-3.rs:11:16 | -11 | const A: i32 = B; //~ ERROR E0391 +LL | const A: i32 = B; //~ ERROR E0391 | ^ cyclic reference | note: the cycle begins when processing `B`... --> $DIR/issue-23302-3.rs:13:1 | -13 | const B: i32 = A; +LL | const B: i32 = A; | ^^^^^^^^^^^^^^^^^ note: ...which then requires processing `A`... --> $DIR/issue-23302-3.rs:13:16 | -13 | const B: i32 = A; +LL | const B: i32 = A; | ^ = note: ...which then again requires processing `B`, completing the cycle. diff --git a/src/test/ui/issue-36163.stderr b/src/test/ui/issue-36163.stderr index 6810ee8be5d..c511b576a21 100644 --- a/src/test/ui/issue-36163.stderr +++ b/src/test/ui/issue-36163.stderr @@ -1,20 +1,20 @@ -error[E0265]: recursive constant - --> $DIR/issue-36163.rs:11:1 - | -LL | const A: i32 = Foo::B; //~ ERROR E0265 - | ^^^^^^^^^^^^^^^^^^^^^^ recursion not allowed in constant - -error[E0265]: recursive constant +error[E0391]: cyclic dependency detected --> $DIR/issue-36163.rs:14:9 | -LL | B = A, //~ ERROR E0265 - | ^ recursion not allowed in constant - -error[E0265]: recursive constant - --> $DIR/issue-36163.rs:18:9 +LL | B = A, //~ ERROR E0391 + | ^ cyclic reference | -LL | C = Bar::C, //~ ERROR E0265 - | ^^^^^^ recursion not allowed in constant +note: the cycle begins when const-evaluating `Foo::B::{{initializer}}`... + --> $DIR/issue-36163.rs:14:5 + | +LL | B = A, //~ ERROR E0391 + | ^^^^^ +note: ...which then requires const-evaluating `A`... + --> $DIR/issue-36163.rs:14:9 + | +LL | B = A, //~ ERROR E0391 + | ^ + = note: ...which then again requires const-evaluating `Foo::B::{{initializer}}`, completing the cycle. error: aborting due to previous error diff --git a/src/test/ui/issue-45157.stderr b/src/test/ui/issue-45157.stderr index 9df58ac4b83..3ce93da6ad5 100644 --- a/src/test/ui/issue-45157.stderr +++ b/src/test/ui/issue-45157.stderr @@ -1,19 +1,19 @@ error[E0502]: cannot borrow `u.z.c` as immutable because it is also borrowed as mutable --> $DIR/issue-45157.rs:37:20 | -34 | let mref = &mut u.s.a; +LL | let mref = &mut u.s.a; | ---------- mutable borrow occurs here ... -37 | let nref = &u.z.c; +LL | let nref = &u.z.c; | ^^^^^^ immutable borrow occurs here error[E0502]: cannot borrow `u.s.a` as mutable because it is also borrowed as immutable --> $DIR/issue-45157.rs:39:27 | -37 | let nref = &u.z.c; +LL | let nref = &u.z.c; | ------ immutable borrow occurs here -38 | //~^ ERROR cannot borrow `u.z.c` as immutable because it is also borrowed as mutable [E0502] -39 | println!("{} {}", mref, nref) +LL | //~^ ERROR cannot borrow `u.z.c` as immutable because it is also borrowed as mutable [E0502] +LL | println!("{} {}", mref, nref) | ^^^^ mutable borrow occurs here error: aborting due to 2 previous errors diff --git a/src/test/ui/issue-47706.stderr b/src/test/ui/issue-47706.stderr index 5651972cbd9..ef48d4d7aae 100644 --- a/src/test/ui/issue-47706.stderr +++ b/src/test/ui/issue-47706.stderr @@ -10,20 +10,20 @@ LL | self.foo.map(Foo::new) error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> $DIR/issue-47706.rs:37:5 | -27 | Bar(i32), +LL | Bar(i32), | -------- takes 1 argument ... -37 | foo(Qux::Bar); +LL | foo(Qux::Bar); | ^^^ expected function that takes 0 arguments | note: required by `foo` --> $DIR/issue-47706.rs:30:1 | -30 | / fn foo(f: F) -31 | | where -32 | | F: Fn(), -33 | | { -34 | | } +LL | / fn foo(f: F) +LL | | where +LL | | F: Fn(), +LL | | { +LL | | } | |_^ error: aborting due to 2 previous errors diff --git a/src/test/ui/lint/lint-group-nonstandard-style.stderr b/src/test/ui/lint/lint-group-nonstandard-style.stderr index b0ce19e35ee..6979510e500 100644 --- a/src/test/ui/lint/lint-group-nonstandard-style.stderr +++ b/src/test/ui/lint/lint-group-nonstandard-style.stderr @@ -1,65 +1,65 @@ error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-nonstandard-style.rs:14:1 | -14 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:11:9 | -11 | #![deny(nonstandard_style)] +LL | #![deny(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[deny(non_snake_case)] implied by #[deny(nonstandard_style)] error: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-nonstandard-style.rs:22:9 | -22 | fn CamelCase() {} //~ ERROR should have a snake +LL | fn CamelCase() {} //~ ERROR should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:20:14 | -20 | #[forbid(nonstandard_style)] +LL | #[forbid(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[forbid(non_snake_case)] implied by #[forbid(nonstandard_style)] error: static variable `bad` should have an upper case name such as `BAD` --> $DIR/lint-group-nonstandard-style.rs:24:9 | -24 | static bad: isize = 1; //~ ERROR should have an upper +LL | static bad: isize = 1; //~ ERROR should have an upper | ^^^^^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:20:14 | -20 | #[forbid(nonstandard_style)] +LL | #[forbid(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[forbid(non_upper_case_globals)] implied by #[forbid(nonstandard_style)] warning: function `CamelCase` should have a snake case name such as `camel_case` --> $DIR/lint-group-nonstandard-style.rs:30:9 | -30 | fn CamelCase() {} //~ WARN should have a snake +LL | fn CamelCase() {} //~ WARN should have a snake | ^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:28:17 | -28 | #![warn(nonstandard_style)] +LL | #![warn(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)] warning: type `snake_case` should have a camel case name such as `SnakeCase` --> $DIR/lint-group-nonstandard-style.rs:32:9 | -32 | struct snake_case; //~ WARN should have a camel +LL | struct snake_case; //~ WARN should have a camel | ^^^^^^^^^^^^^^^^^^ | note: lint level defined here --> $DIR/lint-group-nonstandard-style.rs:28:17 | -28 | #![warn(nonstandard_style)] +LL | #![warn(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ = note: #[warn(non_camel_case_types)] implied by #[warn(nonstandard_style)] diff --git a/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr b/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr index 67a77e0a481..d382082a575 100644 --- a/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr +++ b/src/test/ui/macros/macro-at-most-once-rep-ambig.stderr @@ -1,79 +1,79 @@ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:40:11 | -40 | foo!(a?a?a); //~ ERROR no rules expected the token `?` +LL | foo!(a?a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:41:11 | -41 | foo!(a?a); //~ ERROR no rules expected the token `?` +LL | foo!(a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:42:11 | -42 | foo!(a?); //~ ERROR no rules expected the token `?` +LL | foo!(a?); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:43:11 | -43 | baz!(a?a?a); //~ ERROR no rules expected the token `?` +LL | baz!(a?a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:44:11 | -44 | baz!(a?a); //~ ERROR no rules expected the token `?` +LL | baz!(a?a); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:45:11 | -45 | baz!(a?); //~ ERROR no rules expected the token `?` +LL | baz!(a?); //~ ERROR no rules expected the token `?` | ^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:46:11 | -46 | baz!(a,); //~ ERROR unexpected end of macro invocation +LL | baz!(a,); //~ ERROR unexpected end of macro invocation | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:47:11 | -47 | baz!(a?a?a,); //~ ERROR no rules expected the token `?` +LL | baz!(a?a?a,); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:48:11 | -48 | baz!(a?a,); //~ ERROR no rules expected the token `?` +LL | baz!(a?a,); //~ ERROR no rules expected the token `?` | ^ error: no rules expected the token `?` --> $DIR/macro-at-most-once-rep-ambig.rs:49:11 | -49 | baz!(a?,); //~ ERROR no rules expected the token `?` +LL | baz!(a?,); //~ ERROR no rules expected the token `?` | ^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:50:5 | -50 | barplus!(); //~ ERROR unexpected end of macro invocation +LL | barplus!(); //~ ERROR unexpected end of macro invocation | ^^^^^^^^^^^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:51:15 | -51 | barplus!(a?); //~ ERROR unexpected end of macro invocation +LL | barplus!(a?); //~ ERROR unexpected end of macro invocation | ^ error: unexpected end of macro invocation --> $DIR/macro-at-most-once-rep-ambig.rs:52:15 | -52 | barstar!(a?); //~ ERROR unexpected end of macro invocation +LL | barstar!(a?); //~ ERROR unexpected end of macro invocation | ^ error: aborting due to 13 previous errors diff --git a/src/test/ui/nested_impl_trait.stderr b/src/test/ui/nested_impl_trait.stderr index 6849a8e08e2..b3e61e74bbb 100644 --- a/src/test/ui/nested_impl_trait.stderr +++ b/src/test/ui/nested_impl_trait.stderr @@ -1,7 +1,7 @@ error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:16:56 | -16 | fn bad_in_ret_position(x: impl Into) -> impl Into { x } +LL | fn bad_in_ret_position(x: impl Into) -> impl Into { x } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -10,7 +10,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:19:42 | -19 | fn bad_in_fn_syntax(x: fn() -> impl Into) {} +LL | fn bad_in_fn_syntax(x: fn() -> impl Into) {} | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -19,7 +19,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:23:37 | -23 | fn bad_in_arg_position(_: impl Into) { } +LL | fn bad_in_arg_position(_: impl Into) { } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -28,7 +28,7 @@ error[E0666]: nested `impl Trait` is not allowed error[E0666]: nested `impl Trait` is not allowed --> $DIR/nested_impl_trait.rs:28:44 | -28 | fn bad(x: impl Into) -> impl Into { x } +LL | fn bad(x: impl Into) -> impl Into { x } | ----------^^^^^^^^^^- | | | | | nested `impl Trait` here @@ -37,13 +37,13 @@ error[E0666]: nested `impl Trait` is not allowed error[E0562]: `impl Trait` not allowed outside of function and inherent method return types --> $DIR/nested_impl_trait.rs:19:32 | -19 | fn bad_in_fn_syntax(x: fn() -> impl Into) {} +LL | fn bad_in_fn_syntax(x: fn() -> impl Into) {} | ^^^^^^^^^^^^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types --> $DIR/nested_impl_trait.rs:36:42 | -36 | fn allowed_in_ret_type() -> impl Fn() -> impl Into { +LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into { | ^^^^^^^^^^^^^^ error: aborting due to 6 previous errors diff --git a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr index e97392e5979..a580502f175 100644 --- a/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr @@ -53,7 +53,7 @@ LL | | } note: External requirements --> $DIR/projection-no-regions-closure.rs:46:23 | -46 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ @@ -84,7 +84,7 @@ LL | | } note: External requirements --> $DIR/projection-no-regions-closure.rs:54:23 | -54 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ @@ -126,7 +126,7 @@ LL | | } note: External requirements --> $DIR/projection-no-regions-closure.rs:65:23 | -65 | with_signature(x, |mut y| Box::new(y.next())) +LL | with_signature(x, |mut y| Box::new(y.next())) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index d562b9a4cfc..f557b448cec 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -66,7 +66,7 @@ LL | | } note: External requirements --> $DIR/projection-one-region-closure.rs:68:29 | -68 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -115,7 +115,7 @@ LL | | } note: External requirements --> $DIR/projection-one-region-closure.rs:90:29 | -90 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -162,21 +162,21 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-closure.rs:103:29 - | -103 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) - ] - = note: number of external vids: 4 - = note: where T: '_#3r - = note: where '_#2r: '_#3r + --> $DIR/projection-one-region-closure.rs:103:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + ] + = note: number of external vids: 4 + = note: where T: '_#3r + = note: where '_#2r: '_#3r note: No external requirements --> $DIR/projection-one-region-closure.rs:97:1 diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index eb15d3b85d2..7a8010ad8e0 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -57,7 +57,7 @@ LL | | } note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:59:29 | -59 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -97,7 +97,7 @@ LL | | } note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:80:29 | -80 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -137,7 +137,7 @@ LL | | } note: External requirements --> $DIR/projection-one-region-trait-bound-closure.rs:91:29 | -91 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ @@ -169,19 +169,19 @@ LL | | } ] note: External requirements - --> $DIR/projection-one-region-trait-bound-closure.rs:103:29 - | -103 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where '_#1r: '_#2r + --> $DIR/projection-one-region-trait-bound-closure.rs:103:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where '_#1r: '_#2r note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:95:1 diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr index b124ac80004..875907e6b39 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.stderr @@ -14,12 +14,12 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:43:1 | -43 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) -44 | | where -45 | | T: Anything<'b>, -46 | | { -47 | | with_signature(cell, t, |cell, t| require(cell, t)); -48 | | } +LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) +LL | | where +LL | | T: Anything<'b>, +LL | | { +LL | | with_signature(cell, t, |cell, t| require(cell, t)); +LL | | } | |_^ | = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [ @@ -30,7 +30,7 @@ note: No external requirements note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:56:29 | -56 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -62,7 +62,7 @@ LL | | } note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:75:29 | -75 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -94,7 +94,7 @@ LL | | } note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:84:29 | -84 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [ @@ -126,7 +126,7 @@ LL | | } note: No external requirements --> $DIR/projection-one-region-trait-bound-static-closure.rs:96:29 | -96 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index 6fb92d29748..4fc0dffa675 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -67,7 +67,7 @@ LL | | } note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:60:29 | -60 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [ @@ -111,7 +111,7 @@ LL | | } note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:81:29 | -81 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [ @@ -155,7 +155,7 @@ LL | | } note: External requirements --> $DIR/projection-two-region-trait-bound-closure.rs:92:29 | -92 | with_signature(cell, t, |cell, t| require(cell, t)); +LL | with_signature(cell, t, |cell, t| require(cell, t)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [ @@ -189,21 +189,21 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:101:29 - | -101 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - '_#3r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) - ] - = note: number of external vids: 5 - = note: where >::AssocType: '_#4r + --> $DIR/projection-two-region-trait-bound-closure.rs:101:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + '_#3r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#4r ()>, T)) + ] + = note: number of external vids: 5 + = note: where >::AssocType: '_#4r note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:96:1 @@ -225,19 +225,19 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:109:29 - | -109 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where >::AssocType: '_#2r + --> $DIR/projection-two-region-trait-bound-closure.rs:109:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where >::AssocType: '_#2r error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))` --> $DIR/projection-two-region-trait-bound-closure.rs:109:20 @@ -263,20 +263,20 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:120:29 - | -120 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ - '_#1r, - '_#2r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) - ] - = note: number of external vids: 4 - = note: where >::AssocType: '_#3r + --> $DIR/projection-two-region-trait-bound-closure.rs:120:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [ + '_#1r, + '_#2r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)) + ] + = note: number of external vids: 4 + = note: where >::AssocType: '_#3r note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:115:1 @@ -297,19 +297,19 @@ LL | | } ] note: External requirements - --> $DIR/projection-two-region-trait-bound-closure.rs:132:29 - | -132 | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ - '_#1r, - T, - i32, - extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) - ] - = note: number of external vids: 3 - = note: where >::AssocType: '_#2r + --> $DIR/projection-two-region-trait-bound-closure.rs:132:29 + | +LL | with_signature(cell, t, |cell, t| require(cell, t)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [ + '_#1r, + T, + i32, + extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)) + ] + = note: number of external vids: 3 + = note: where >::AssocType: '_#2r note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:124:1 diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr index 443439298a3..ab3c4006459 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.stderr @@ -49,7 +49,7 @@ LL | | } note: External requirements --> $DIR/ty-param-closure-approximate-lower-bound.rs:43:24 | -43 | twice(cell, value, |a, b| invoke(a, b)); +LL | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^ | = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [ diff --git a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr index 6aa37311019..83d2b959c80 100644 --- a/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr +++ b/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.stderr @@ -65,14 +65,14 @@ LL | | } note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:55:26 | -55 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -56 | | // Key point of this test: -57 | | // -58 | | // The *closure* is being type-checked with all of its free +LL | | // Key point of this test: +LL | | // +LL | | // The *closure* is being type-checked with all of its free ... | -67 | | require(&x, &y) -68 | | }) +LL | | require(&x, &y) +LL | | }) | |_____^ | = note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [ @@ -104,13 +104,13 @@ LL | | } note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26 | -76 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -77 | | //~^ ERROR the parameter type `T` may not live long enough -78 | | // See `correct_region` -79 | | require(&x, &y) -80 | | //~^ WARNING not reporting region error due to -Znll -81 | | }) +LL | | //~^ ERROR the parameter type `T` may not live long enough +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | //~^ WARNING not reporting region error due to -Znll +LL | | }) | |_____^ | = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [ @@ -156,11 +156,11 @@ LL | | } note: External requirements --> $DIR/ty-param-closure-outlives-from-where-clause.rs:90:26 | -90 | with_signature(a, b, |x, y| { +LL | with_signature(a, b, |x, y| { | __________________________^ -91 | | // See `correct_region` -92 | | require(&x, &y) -93 | | }) +LL | | // See `correct_region` +LL | | require(&x, &y) +LL | | }) | |_____^ | = note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [ diff --git a/src/test/ui/numeric-fields.stderr b/src/test/ui/numeric-fields.stderr index 8ee0575cda2..bed94e8f09a 100644 --- a/src/test/ui/numeric-fields.stderr +++ b/src/test/ui/numeric-fields.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `S` has no field named `0b1` --> $DIR/numeric-fields.rs:14:15 | -14 | let s = S{0b1: 10, 0: 11}; +LL | let s = S{0b1: 10, 0: 11}; | ^^^ `S` does not have this field | = note: available fields are: `0`, `1` diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index 9811d115c80..d300357fa0b 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -19,15 +19,15 @@ LL | let y = World::Hello + World::Goodbye; error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-39018.rs:21:13 | -21 | let x = "Hello " + "World!".to_owned(); +LL | let x = "Hello " + "World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `+` can't be used to concatenate a `&str` with a `String` help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | -21 | let x = "Hello ".to_owned() + "World!".to_owned(); +LL | let x = "Hello ".to_owned() + "World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^ help: you also need to borrow the `String` on the right to get a `&str` | -21 | let x = "Hello " + &"World!".to_owned(); +LL | let x = "Hello " + &"World!".to_owned(); | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 3 previous errors diff --git a/src/test/ui/struct-fields-hints-no-dupe.stderr b/src/test/ui/struct-fields-hints-no-dupe.stderr index 5a08a5c4841..7c276098feb 100644 --- a/src/test/ui/struct-fields-hints-no-dupe.stderr +++ b/src/test/ui/struct-fields-hints-no-dupe.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints-no-dupe.rs:20:9 | -20 | bar : 42, +LL | bar : 42, | ^^^ field does not exist - did you mean `barr`? error: aborting due to previous error diff --git a/src/test/ui/struct-fields-hints.stderr b/src/test/ui/struct-fields-hints.stderr index 1f0995f1dc0..6e4d3008660 100644 --- a/src/test/ui/struct-fields-hints.stderr +++ b/src/test/ui/struct-fields-hints.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `A` has no field named `bar` --> $DIR/struct-fields-hints.rs:20:9 | -20 | bar : 42, +LL | bar : 42, | ^^^ field does not exist - did you mean `car`? error: aborting due to previous error diff --git a/src/test/ui/struct-fields-too-many.stderr b/src/test/ui/struct-fields-too-many.stderr index 6818a737ce0..8132cf687a3 100644 --- a/src/test/ui/struct-fields-too-many.stderr +++ b/src/test/ui/struct-fields-too-many.stderr @@ -1,7 +1,7 @@ error[E0560]: struct `BuildData` has no field named `bar` --> $DIR/struct-fields-too-many.rs:18:9 | -18 | bar: 0 +LL | bar: 0 | ^^^ `BuildData` does not have this field | = note: available fields are: `foo` diff --git a/src/test/ui/suggest-private-fields.stderr b/src/test/ui/suggest-private-fields.stderr index d5dda75bfce..fb3d8a67569 100644 --- a/src/test/ui/suggest-private-fields.stderr +++ b/src/test/ui/suggest-private-fields.stderr @@ -1,13 +1,13 @@ error[E0560]: struct `xc::B` has no field named `aa` --> $DIR/suggest-private-fields.rs:25:9 | -25 | aa: 20, +LL | aa: 20, | ^^ field does not exist - did you mean `a`? error[E0560]: struct `xc::B` has no field named `bb` --> $DIR/suggest-private-fields.rs:27:9 | -27 | bb: 20, +LL | bb: 20, | ^^ `xc::B` does not have this field | = note: available fields are: `a` @@ -15,13 +15,13 @@ error[E0560]: struct `xc::B` has no field named `bb` error[E0560]: struct `A` has no field named `aa` --> $DIR/suggest-private-fields.rs:32:9 | -32 | aa: 20, +LL | aa: 20, | ^^ field does not exist - did you mean `a`? error[E0560]: struct `A` has no field named `bb` --> $DIR/suggest-private-fields.rs:34:9 | -34 | bb: 20, +LL | bb: 20, | ^^ field does not exist - did you mean `b`? error: aborting due to 4 previous errors diff --git a/src/test/ui/ui-testing-optout.stderr b/src/test/ui/ui-testing-optout.stderr index c9960f999b3..1c13da57b0d 100644 --- a/src/test/ui/ui-testing-optout.stderr +++ b/src/test/ui/ui-testing-optout.stderr @@ -18,3 +18,4 @@ error[E0412]: cannot find type `F` in this scope error: aborting due to 3 previous errors +If you want more information on this error, try using "rustc --explain E0412" diff --git a/src/test/ui/union/union-fields-2.stderr b/src/test/ui/union/union-fields-2.stderr index 324fdc7345d..d902ad1629c 100644 --- a/src/test/ui/union/union-fields-2.stderr +++ b/src/test/ui/union/union-fields-2.stderr @@ -13,7 +13,7 @@ LL | let u = U { a: 0, b: 1 }; //~ ERROR union expressions should have exact error[E0560]: union `U` has no field named `c` --> $DIR/union-fields-2.rs:20:29 | -20 | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field +LL | let u = U { a: 0, b: 1, c: 2 }; //~ ERROR union expressions should have exactly one field | ^ `U` does not have this field | = note: available fields are: `a`, `b` diff --git a/src/test/ui/union/union-suggest-field.stderr b/src/test/ui/union/union-suggest-field.stderr index 9162dd1920f..f2ff38bd0c7 100644 --- a/src/test/ui/union/union-suggest-field.stderr +++ b/src/test/ui/union/union-suggest-field.stderr @@ -1,7 +1,7 @@ error[E0560]: union `U` has no field named `principle` --> $DIR/union-suggest-field.rs:20:17 | -20 | let u = U { principle: 0 }; +LL | let u = U { principle: 0 }; | ^^^^^^^^^ field does not exist - did you mean `principal`? error[E0609]: no field `principial` on type `U` diff --git a/src/test/ui/unsafe-block-without-braces.stderr b/src/test/ui/unsafe-block-without-braces.stderr index fc6ddba3823..e6d2403ac4c 100644 --- a/src/test/ui/unsafe-block-without-braces.stderr +++ b/src/test/ui/unsafe-block-without-braces.stderr @@ -1,9 +1,9 @@ error: expected one of `extern`, `fn`, or `{`, found `std` --> $DIR/unsafe-block-without-braces.rs:13:9 | -12 | unsafe //{ +LL | unsafe //{ | - expected one of `extern`, `fn`, or `{` here -13 | std::mem::transmute::(1.0); +LL | std::mem::transmute::(1.0); | ^^^ unexpected token error: aborting due to previous error