diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-23 03:42:32 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-26 20:24:02 +0300 |
| commit | fa2d9fc4b9e578d95fbf65613d1bf732fbdfb0d4 (patch) | |
| tree | 1eb1a49b4750e2704d3d724fb4a12ea4e2237eff /src/test/ui/span | |
| parent | cdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e (diff) | |
| download | rust-fa2d9fc4b9e578d95fbf65613d1bf732fbdfb0d4.tar.gz rust-fa2d9fc4b9e578d95fbf65613d1bf732fbdfb0d4.zip | |
Update UI tests
Diffstat (limited to 'src/test/ui/span')
90 files changed, 511 insertions, 511 deletions
diff --git a/src/test/ui/span/E0046.stderr b/src/test/ui/span/E0046.stderr index 02f2a8cfc6c..047a9115caf 100644 --- a/src/test/ui/span/E0046.stderr +++ b/src/test/ui/span/E0046.stderr @@ -1,10 +1,10 @@ error[E0046]: not all trait items implemented, missing: `foo` --> $DIR/E0046.rs:17:1 | -12 | fn foo(); +LL | fn foo(); | --------- `foo` from trait ... -17 | impl Foo for Bar {} +LL | impl Foo for Bar {} | ^^^^^^^^^^^^^^^^ missing `foo` in implementation error: aborting due to previous error diff --git a/src/test/ui/span/E0057.stderr b/src/test/ui/span/E0057.stderr index f0c40578ddb..0d6cd77de07 100644 --- a/src/test/ui/span/E0057.stderr +++ b/src/test/ui/span/E0057.stderr @@ -1,13 +1,13 @@ error[E0057]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/E0057.rs:13:13 | -13 | let a = f(); //~ ERROR E0057 +LL | let a = f(); //~ ERROR E0057 | ^^^ expected 1 parameter error[E0057]: this function takes 1 parameter but 2 parameters were supplied --> $DIR/E0057.rs:15:13 | -15 | let c = f(2, 3); //~ ERROR E0057 +LL | let c = f(2, 3); //~ ERROR E0057 | ^^^^^^^ expected 1 parameter error: aborting due to 2 previous errors diff --git a/src/test/ui/span/E0072.stderr b/src/test/ui/span/E0072.stderr index 22319e6552e..de0d29f6432 100644 --- a/src/test/ui/span/E0072.stderr +++ b/src/test/ui/span/E0072.stderr @@ -1,10 +1,10 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/E0072.rs:11:1 | -11 | struct ListNode { //~ ERROR has infinite size +LL | struct ListNode { //~ ERROR has infinite size | ^^^^^^^^^^^^^^^ recursive type has infinite size 12 | head: u8, -13 | tail: Option<ListNode>, +LL | tail: Option<ListNode>, | ---------------------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable diff --git a/src/test/ui/span/E0204.stderr b/src/test/ui/span/E0204.stderr index 0c0d431f38f..88eb36c1e4c 100644 --- a/src/test/ui/span/E0204.stderr +++ b/src/test/ui/span/E0204.stderr @@ -1,37 +1,37 @@ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:15:6 | -12 | foo: Vec<u32>, +LL | foo: Vec<u32>, | ------------- this field does not implement `Copy` ... -15 | impl Copy for Foo { } //~ ERROR may not be implemented for this type +LL | impl Copy for Foo { } //~ ERROR may not be implemented for this type | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:17:10 | -17 | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ 18 | struct Foo2<'a> { -19 | ty: &'a mut bool, +LL | ty: &'a mut bool, | ---------------- this field does not implement `Copy` error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:27:6 | -23 | Bar { x: Vec<u32> }, +LL | Bar { x: Vec<u32> }, | ----------- this field does not implement `Copy` ... -27 | impl Copy for EFoo { } //~ ERROR may not be implemented for this type +LL | impl Copy for EFoo { } //~ ERROR may not be implemented for this type | ^^^^ error[E0204]: the trait `Copy` may not be implemented for this type --> $DIR/E0204.rs:29:10 | -29 | #[derive(Copy)] //~ ERROR may not be implemented for this type +LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ 30 | enum EFoo2<'a> { -31 | Bar(&'a mut bool), +LL | Bar(&'a mut bool), | ------------- this field does not implement `Copy` error: aborting due to 4 previous errors diff --git a/src/test/ui/span/E0493.stderr b/src/test/ui/span/E0493.stderr index c8bdd04394e..74a85c0164e 100644 --- a/src/test/ui/span/E0493.stderr +++ b/src/test/ui/span/E0493.stderr @@ -1,7 +1,7 @@ error[E0493]: destructors cannot be evaluated at compile-time --> $DIR/E0493.rs:27:17 | -27 | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; +LL | const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constants cannot evaluate destructors error: aborting due to previous error diff --git a/src/test/ui/span/E0535.stderr b/src/test/ui/span/E0535.stderr index e271a8018bc..309696eebc4 100644 --- a/src/test/ui/span/E0535.stderr +++ b/src/test/ui/span/E0535.stderr @@ -1,7 +1,7 @@ error[E0535]: invalid argument --> $DIR/E0535.rs:11:10 | -11 | #[inline(unknown)] //~ ERROR E0535 +LL | #[inline(unknown)] //~ ERROR E0535 | ^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0536.stderr b/src/test/ui/span/E0536.stderr index 9903896fd77..ff8f4543874 100644 --- a/src/test/ui/span/E0536.stderr +++ b/src/test/ui/span/E0536.stderr @@ -1,7 +1,7 @@ error[E0536]: expected 1 cfg-pattern --> $DIR/E0536.rs:11:7 | -11 | #[cfg(not())] //~ ERROR E0536 +LL | #[cfg(not())] //~ ERROR E0536 | ^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/E0537.stderr b/src/test/ui/span/E0537.stderr index f08e7a7357b..88e74b1cce5 100644 --- a/src/test/ui/span/E0537.stderr +++ b/src/test/ui/span/E0537.stderr @@ -1,7 +1,7 @@ error[E0537]: invalid predicate `unknown` --> $DIR/E0537.rs:11:7 | -11 | #[cfg(unknown())] //~ ERROR E0537 +LL | #[cfg(unknown())] //~ ERROR E0537 | ^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr index 3230766af8a..901a1af94bc 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr @@ -1,86 +1,86 @@ error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:63:24 | -62 | fn deref_mut_field1(x: Own<Point>) { +LL | fn deref_mut_field1(x: Own<Point>) { | - consider changing this to `mut x` -63 | let __isize = &mut x.y; //~ ERROR cannot borrow +LL | let __isize = &mut x.y; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:75:10 | -74 | fn deref_extend_mut_field1(x: &Own<Point>) -> &mut isize { +LL | fn deref_extend_mut_field1(x: &Own<Point>) -> &mut isize { | ----------- use `&mut Own<Point>` here to make mutable -75 | &mut x.y //~ ERROR cannot borrow +LL | &mut x.y //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:88:19 | -87 | let _x = &mut x.x; +LL | let _x = &mut x.x; | - first mutable borrow occurs here -88 | let _y = &mut x.y; //~ ERROR cannot borrow +LL | let _y = &mut x.y; //~ ERROR cannot borrow | ^ second mutable borrow occurs here -89 | } +LL | } | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:98:5 | -97 | fn assign_field1<'a>(x: Own<Point>) { +LL | fn assign_field1<'a>(x: Own<Point>) { | - consider changing this to `mut x` -98 | x.y = 3; //~ ERROR cannot borrow +LL | x.y = 3; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5 - | -101 | fn assign_field2<'a>(x: &'a Own<Point>) { - | -------------- use `&'a mut Own<Point>` here to make mutable -102 | x.y = 3; //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:102:5 + | +LL | fn assign_field2<'a>(x: &'a Own<Point>) { + | -------------- use `&'a mut Own<Point>` here to make mutable +LL | x.y = 3; //~ ERROR cannot borrow + | ^ cannot borrow as mutable error[E0499]: cannot borrow `*x` as mutable more than once at a time - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:111:5 - | -110 | let _p: &mut Point = &mut **x; - | -- first mutable borrow occurs here -111 | x.y = 3; //~ ERROR cannot borrow - | ^ second mutable borrow occurs here -112 | } - | - first borrow ends here + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:111:5 + | +LL | let _p: &mut Point = &mut **x; + | -- first mutable borrow occurs here +LL | x.y = 3; //~ ERROR cannot borrow + | ^ second mutable borrow occurs here +LL | } + | - first borrow ends here error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 - | -118 | fn deref_mut_method1(x: Own<Point>) { - | - consider changing this to `mut x` -119 | x.set(0, 0); //~ ERROR cannot borrow - | ^ cannot borrow mutably + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:119:5 + | +LL | fn deref_mut_method1(x: Own<Point>) { + | - consider changing this to `mut x` +LL | x.set(0, 0); //~ ERROR cannot borrow + | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5 - | -130 | fn deref_extend_mut_method1(x: &Own<Point>) -> &mut isize { - | ----------- use `&mut Own<Point>` here to make mutable -131 | x.y_mut() //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:131:5 + | +LL | fn deref_extend_mut_method1(x: &Own<Point>) -> &mut isize { + | ----------- use `&mut Own<Point>` here to make mutable +LL | x.y_mut() //~ ERROR cannot borrow + | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6 - | -138 | fn assign_method1<'a>(x: Own<Point>) { - | - consider changing this to `mut x` -139 | *x.y_mut() = 3; //~ ERROR cannot borrow - | ^ cannot borrow mutably + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:139:6 + | +LL | fn assign_method1<'a>(x: Own<Point>) { + | - consider changing this to `mut x` +LL | *x.y_mut() = 3; //~ ERROR cannot borrow + | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable - --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6 - | -142 | fn assign_method2<'a>(x: &'a Own<Point>) { - | -------------- use `&'a mut Own<Point>` here to make mutable -143 | *x.y_mut() = 3; //~ ERROR cannot borrow - | ^ cannot borrow as mutable + --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:143:6 + | +LL | fn assign_method2<'a>(x: &'a Own<Point>) { + | -------------- use `&'a mut Own<Point>` here to make mutable +LL | *x.y_mut() = 3; //~ ERROR cannot borrow + | ^ cannot borrow as mutable error: aborting due to 10 previous errors diff --git a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr index 031d0e1e92d..948d6d175de 100644 --- a/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr +++ b/src/test/ui/span/borrowck-borrow-overloaded-deref-mut.stderr @@ -1,33 +1,33 @@ error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:39:25 | -38 | fn deref_mut1(x: Own<isize>) { +LL | fn deref_mut1(x: Own<isize>) { | - consider changing this to `mut x` -39 | let __isize = &mut *x; //~ ERROR cannot borrow +LL | let __isize = &mut *x; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:51:11 | -50 | fn deref_extend_mut1<'a>(x: &'a Own<isize>) -> &'a mut isize { +LL | fn deref_extend_mut1<'a>(x: &'a Own<isize>) -> &'a mut isize { | -------------- use `&'a mut Own<isize>` here to make mutable -51 | &mut **x //~ ERROR cannot borrow +LL | &mut **x //~ ERROR cannot borrow | ^^ cannot borrow as mutable error[E0596]: cannot borrow immutable argument `x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:59:6 | -58 | fn assign1<'a>(x: Own<isize>) { +LL | fn assign1<'a>(x: Own<isize>) { | - consider changing this to `mut x` -59 | *x = 3; //~ ERROR cannot borrow +LL | *x = 3; //~ ERROR cannot borrow | ^ cannot borrow mutably error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:63:6 | -62 | fn assign2<'a>(x: &'a Own<isize>) { +LL | fn assign2<'a>(x: &'a Own<isize>) { | -------------- use `&'a mut Own<isize>` here to make mutable -63 | **x = 3; //~ ERROR cannot borrow +LL | **x = 3; //~ ERROR cannot borrow | ^^ cannot borrow as mutable error: aborting due to 4 previous errors diff --git a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr index adbe560f633..5eb00f24e36 100644 --- a/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr +++ b/src/test/ui/span/borrowck-call-is-borrow-issue-12224.stderr @@ -1,47 +1,47 @@ error[E0499]: cannot borrow `f` as mutable more than once at a time --> $DIR/borrowck-call-is-borrow-issue-12224.rs:22:16 | -22 | f(Box::new(|| { +LL | f(Box::new(|| { | - ^^ second mutable borrow occurs here | | | first mutable borrow occurs here 23 | //~^ ERROR: cannot borrow `f` as mutable more than once -24 | f((Box::new(|| {}))) +LL | f((Box::new(|| {}))) | - borrow occurs due to use of `f` in closure -25 | })); +LL | })); | - first borrow ends here error[E0596]: cannot borrow immutable borrowed content `*f` as mutable --> $DIR/borrowck-call-is-borrow-issue-12224.rs:35:5 | -34 | fn test2<F>(f: &F) where F: FnMut() { +LL | fn test2<F>(f: &F) where F: FnMut() { | -- use `&mut F` here to make mutable -35 | (*f)(); +LL | (*f)(); | ^^^^ cannot borrow as mutable error[E0596]: cannot borrow `Box` content `*f.f` of immutable binding as mutable --> $DIR/borrowck-call-is-borrow-issue-12224.rs:44:5 | -43 | fn test4(f: &Test) { +LL | fn test4(f: &Test) { | ----- use `&mut Test` here to make mutable -44 | f.f.call_mut(()) +LL | f.f.call_mut(()) | ^^^ cannot borrow as mutable error[E0504]: cannot move `f` into closure because it is borrowed --> $DIR/borrowck-call-is-borrow-issue-12224.rs:63:13 | -62 | f(Box::new(|a| { +LL | f(Box::new(|a| { | - borrow of `f` occurs here -63 | foo(f); +LL | foo(f); | ^ move into closure occurs here error[E0507]: cannot move out of captured outer variable in an `FnMut` closure --> $DIR/borrowck-call-is-borrow-issue-12224.rs:63:13 | -61 | let mut f = |g: Box<FnMut(isize)>, b: isize| {}; +LL | let mut f = |g: Box<FnMut(isize)>, b: isize| {}; | ----- captured outer variable 62 | f(Box::new(|a| { -63 | foo(f); +LL | foo(f); | ^ cannot move out of captured outer variable in an `FnMut` closure error: aborting due to 5 previous errors diff --git a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr index 6a4e030bc39..fb2427b687f 100644 --- a/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr +++ b/src/test/ui/span/borrowck-call-method-from-mut-aliasable.stderr @@ -1,10 +1,10 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-call-method-from-mut-aliasable.rs:27:5 | -25 | fn b(x: &Foo) { +LL | fn b(x: &Foo) { | ---- use `&mut Foo` here to make mutable 26 | x.f(); -27 | x.h(); //~ ERROR cannot borrow +LL | x.h(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-fn-in-const-b.stderr b/src/test/ui/span/borrowck-fn-in-const-b.stderr index 749725bee56..1d4af884b23 100644 --- a/src/test/ui/span/borrowck-fn-in-const-b.stderr +++ b/src/test/ui/span/borrowck-fn-in-const-b.stderr @@ -1,9 +1,9 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-fn-in-const-b.rs:17:9 | -16 | fn broken(x: &Vec<String>) { +LL | fn broken(x: &Vec<String>) { | ------------ use `&mut Vec<String>` here to make mutable -17 | x.push(format!("this is broken")); +LL | x.push(format!("this is broken")); | ^ cannot borrow as mutable error: aborting due to previous error diff --git a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr index fa33899816c..6de2eecb61b 100644 --- a/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr +++ b/src/test/ui/span/borrowck-let-suggestion-suffixes.stderr @@ -1,10 +1,10 @@ error[E0597]: `young[..]` does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:21:14 | -21 | v2.push(&young[0]); // statement 4 +LL | v2.push(&young[0]); // statement 4 | ^^^^^^^^ borrowed value does not live long enough ... -56 | } +LL | } | - `young[..]` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,12 +12,12 @@ error[E0597]: `young[..]` does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:28:14 | -28 | v3.push(&id('x')); // statement 6 +LL | v3.push(&id('x')); // statement 6 | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -56 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime @@ -25,12 +25,12 @@ error[E0597]: borrowed value does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:38:18 | -38 | v4.push(&id('y')); +LL | v4.push(&id('y')); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -44 | } // (statement 7) +LL | } // (statement 7) | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime @@ -38,12 +38,12 @@ error[E0597]: borrowed value does not live long enough error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-let-suggestion-suffixes.rs:49:14 | -49 | v5.push(&id('z')); +LL | v5.push(&id('z')); | ^^^^^^^ - temporary value dropped here while still borrowed | | | temporary value does not live long enough ... -56 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index 1a510a5defc..039184e05de 100644 --- a/src/test/ui/span/borrowck-object-mutability.stderr +++ b/src/test/ui/span/borrowck-object-mutability.stderr @@ -1,19 +1,19 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable --> $DIR/borrowck-object-mutability.rs:19:5 | -17 | fn borrowed_receiver(x: &Foo) { +LL | fn borrowed_receiver(x: &Foo) { | ---- use `&mut Foo` here to make mutable 18 | x.borrowed(); -19 | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable `Box` content `*x` as mutable --> $DIR/borrowck-object-mutability.rs:29:5 | -27 | fn owned_receiver(x: Box<Foo>) { +LL | fn owned_receiver(x: Box<Foo>) { | - consider changing this to `mut x` 28 | x.borrowed(); -29 | x.borrowed_mut(); //~ ERROR cannot borrow +LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable error: aborting due to 2 previous errors diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.stderr index a91cb2def15..a5af38f40fd 100644 --- a/src/test/ui/span/borrowck-ref-into-rvalue.stderr +++ b/src/test/ui/span/borrowck-ref-into-rvalue.stderr @@ -1,13 +1,13 @@ error[E0597]: borrowed value does not live long enough --> $DIR/borrowck-ref-into-rvalue.rs:14:14 | -14 | Some(ref m) => { +LL | Some(ref m) => { | ^^^^^ borrowed value does not live long enough ... -19 | } +LL | } | - borrowed value dropped here while still borrowed 20 | println!("{}", *msg); -21 | } +LL | } | - borrowed value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index 396bbe4793c..251f33b63fe 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:17:20 | -17 | let x: usize = String::new(); +LL | let x: usize = String::new(); | ^^^^^^^^^^^^^ expected usize, found struct `std::string::String` | = note: expected type `usize` @@ -10,7 +10,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:19:19 | -19 | let x: &str = String::new(); +LL | let x: &str = String::new(); | ^^^^^^^^^^^^^ | | | expected &str, found struct `std::string::String` @@ -22,7 +22,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:22:10 | -22 | test(&y); +LL | test(&y); | ^^ types differ in mutability | = note: expected type `&mut std::string::String` @@ -31,7 +31,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:24:11 | -24 | test2(&y); +LL | test2(&y); | ^^ types differ in mutability | = note: expected type `&mut i32` @@ -40,7 +40,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:27:9 | -27 | f = box f; +LL | f = box f; | ^^^^^ | | | cyclic type of infinite size @@ -49,7 +49,7 @@ error[E0308]: mismatched types error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:31:9 | -31 | s = format!("foo"); +LL | s = format!("foo"); | ^^^^^^^^^^^^^^ | | | expected mutable reference, found struct `std::string::String` diff --git a/src/test/ui/span/destructor-restrictions.stderr b/src/test/ui/span/destructor-restrictions.stderr index e9fede39b91..15ddfb35240 100644 --- a/src/test/ui/span/destructor-restrictions.stderr +++ b/src/test/ui/span/destructor-restrictions.stderr @@ -1,9 +1,9 @@ error[E0597]: `*a` does not live long enough --> $DIR/destructor-restrictions.rs:18:10 | -18 | *a.borrow() + 1 +LL | *a.borrow() + 1 | ^ borrowed value does not live long enough -19 | }; //~^ ERROR `*a` does not live long enough +LL | }; //~^ ERROR `*a` does not live long enough | -- borrowed value needs to live until here | | | `*a` dropped here while still borrowed diff --git a/src/test/ui/span/dropck-object-cycle.stderr b/src/test/ui/span/dropck-object-cycle.stderr index 39f8bd9f9e2..2a426ca3a29 100644 --- a/src/test/ui/span/dropck-object-cycle.stderr +++ b/src/test/ui/span/dropck-object-cycle.stderr @@ -1,10 +1,10 @@ error[E0597]: `*m` does not live long enough --> $DIR/dropck-object-cycle.rs:37:32 | -37 | assert_eq!(object_invoke1(&*m), (4,5)); +LL | assert_eq!(object_invoke1(&*m), (4,5)); | ^^ borrowed value does not live long enough ... -57 | } +LL | } | - `*m` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_arr_cycle_checked.stderr b/src/test/ui/span/dropck_arr_cycle_checked.stderr index 412cc6f35f0..01250a0a701 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.stderr +++ b/src/test/ui/span/dropck_arr_cycle_checked.stderr @@ -1,68 +1,68 @@ error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:103:25 - | -103 | b1.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:103:25 + | +LL | b1.a[0].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:105:25 - | -105 | b1.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:105:25 + | +LL | b1.a[1].v.set(Some(&b3)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:107:25 - | -107 | b2.a[0].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:107:25 + | +LL | b2.a[0].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b3` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:109:25 - | -109 | b2.a[1].v.set(Some(&b3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:109:25 + | +LL | b2.a[1].v.set(Some(&b3)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b1` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:111:25 - | -111 | b3.a[0].v.set(Some(&b1)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_arr_cycle_checked.rs:111:25 + | +LL | b3.a[0].v.set(Some(&b1)); + | ^^ borrowed value does not live long enough ... -115 | } - | - `b1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `b1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `b2` does not live long enough - --> $DIR/dropck_arr_cycle_checked.rs:113:25 - | -113 | b3.a[1].v.set(Some(&b2)); - | ^^ borrowed value does not live long enough -114 | //~^ ERROR `b2` does not live long enough -115 | } - | - `b2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/dropck_arr_cycle_checked.rs:113:25 + | +LL | b3.a[1].v.set(Some(&b2)); + | ^^ borrowed value does not live long enough +114| //~^ ERROR `b2` does not live long enough +LL | } + | - `b2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 6 previous errors diff --git a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr index e6ea657b2e9..872c75374f8 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr @@ -1,10 +1,10 @@ error[E0597]: `d2` does not live long enough --> $DIR/dropck_direct_cycle_with_drop.rs:46:20 | -46 | d1.p.set(Some(&d2)); +LL | d1.p.set(Some(&d2)); | ^^ borrowed value does not live long enough ... -50 | } +LL | } | - `d2` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `d2` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/dropck_direct_cycle_with_drop.rs:48:20 | -48 | d2.p.set(Some(&d1)); +LL | d2.p.set(Some(&d1)); | ^^ borrowed value does not live long enough 49 | //~^ ERROR `d1` does not live long enough -50 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_misc_variants.stderr b/src/test/ui/span/dropck_misc_variants.stderr index d1c91430cf8..42469018e94 100644 --- a/src/test/ui/span/dropck_misc_variants.stderr +++ b/src/test/ui/span/dropck_misc_variants.stderr @@ -1,9 +1,9 @@ error[E0597]: `bomb` does not live long enough --> $DIR/dropck_misc_variants.rs:33:37 | -33 | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); +LL | _w = Wrap::<&[&str]>(NoisyDrop(&bomb)); | ^^^^ borrowed value does not live long enough -34 | } +LL | } | - `bomb` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,10 +11,10 @@ error[E0597]: `bomb` does not live long enough error[E0597]: `v` does not live long enough --> $DIR/dropck_misc_variants.rs:41:28 | -41 | let u = NoisyDrop(&v); +LL | let u = NoisyDrop(&v); | ^ borrowed value does not live long enough ... -45 | } +LL | } | - `v` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/dropck_vec_cycle_checked.stderr b/src/test/ui/span/dropck_vec_cycle_checked.stderr index 1171d3972bf..34c7e89333a 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.stderr +++ b/src/test/ui/span/dropck_vec_cycle_checked.stderr @@ -1,68 +1,68 @@ error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:110:25 - | -110 | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:110:25 + | +LL | c1.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:112:25 - | -112 | c1.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:112:25 + | +LL | c1.v[1].v.set(Some(&c3)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:114:25 - | -114 | c2.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:114:25 + | +LL | c2.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c3` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:116:25 - | -116 | c2.v[1].v.set(Some(&c3)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:116:25 + | +LL | c2.v[1].v.set(Some(&c3)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c3` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c3` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c1` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:118:25 - | -118 | c3.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough + --> $DIR/dropck_vec_cycle_checked.rs:118:25 + | +LL | c3.v[0].v.set(Some(&c1)); + | ^^ borrowed value does not live long enough ... -122 | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c2` does not live long enough - --> $DIR/dropck_vec_cycle_checked.rs:120:25 - | -120 | c3.v[1].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough -121 | //~^ ERROR `c2` does not live long enough -122 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/dropck_vec_cycle_checked.rs:120:25 + | +LL | c3.v[1].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough +121| //~^ ERROR `c2` does not live long enough +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 6 previous errors diff --git a/src/test/ui/span/gated-features-attr-spans.stderr b/src/test/ui/span/gated-features-attr-spans.stderr index f99dafed27a..87ad9312fa4 100644 --- a/src/test/ui/span/gated-features-attr-spans.stderr +++ b/src/test/ui/span/gated-features-attr-spans.stderr @@ -1,7 +1,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) --> $DIR/gated-features-attr-spans.rs:20:1 | -20 | #[repr(simd)] //~ ERROR are experimental +LL | #[repr(simd)] //~ ERROR are experimental | ^^^^^^^^^^^^^ | = help: add #![feature(repr_simd)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: SIMD types are experimental and possibly buggy (see issue #27731) warning: `#[must_use]` on methods is experimental (see issue #43302) --> $DIR/gated-features-attr-spans.rs:27:5 | -27 | #[must_use] fn summon_weapon(&self) -> Weapon { self.weapon } +LL | #[must_use] fn summon_weapon(&self) -> Weapon { self.weapon } | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable @@ -17,7 +17,7 @@ warning: `#[must_use]` on methods is experimental (see issue #43302) warning: `#[must_use]` on functions is experimental (see issue #43302) --> $DIR/gated-features-attr-spans.rs:31:1 | -31 | #[must_use] //~ WARN is experimental +LL | #[must_use] //~ WARN is experimental | ^^^^^^^^^^^ | = help: add #![feature(fn_must_use)] to the crate attributes to enable diff --git a/src/test/ui/span/impl-parsing.stderr b/src/test/ui/span/impl-parsing.stderr index 912638446b9..3cfcf7b7683 100644 --- a/src/test/ui/span/impl-parsing.stderr +++ b/src/test/ui/span/impl-parsing.stderr @@ -1,31 +1,31 @@ error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:16:11 | -16 | impl Trait Type {} //~ ERROR missing `for` in a trait impl +LL | impl Trait Type {} //~ ERROR missing `for` in a trait impl | ^ error: missing `for` in a trait impl --> $DIR/impl-parsing.rs:17:11 | -17 | impl Trait .. {} //~ ERROR missing `for` in a trait impl +LL | impl Trait .. {} //~ ERROR missing `for` in a trait impl | ^ error: expected a trait, found type --> $DIR/impl-parsing.rs:18:6 | -18 | impl ?Sized for Type {} //~ ERROR expected a trait, found type +LL | impl ?Sized for Type {} //~ ERROR expected a trait, found type | ^^^^^^ error: expected a trait, found type --> $DIR/impl-parsing.rs:19:6 | -19 | impl ?Sized for .. {} //~ ERROR expected a trait, found type +LL | impl ?Sized for .. {} //~ ERROR expected a trait, found type | ^^^^^^ error: expected `impl`, found `FAIL` --> $DIR/impl-parsing.rs:21:16 | -21 | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL` +LL | default unsafe FAIL //~ ERROR expected `impl`, found `FAIL` | ^^^^ expected `impl` here error: aborting due to 5 previous errors diff --git a/src/test/ui/span/impl-wrong-item-for-trait.stderr b/src/test/ui/span/impl-wrong-item-for-trait.stderr index 95114577dc3..ec5cfebedf9 100644 --- a/src/test/ui/span/impl-wrong-item-for-trait.stderr +++ b/src/test/ui/span/impl-wrong-item-for-trait.stderr @@ -1,67 +1,67 @@ error[E0437]: type `bar` is not a member of trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:41:5 | -41 | type bar = u64; +LL | type bar = u64; | ^^^^^^^^^^^^^^^ not a member of trait `Foo` error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:23:5 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- item in trait ... -23 | const bar: u64 = 1; +LL | const bar: u64 = 1; | ^^^^^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `bar` --> $DIR/impl-wrong-item-for-trait.rs:21:1 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- `bar` from trait ... -21 | impl Foo for FooConstForMethod { +LL | impl Foo for FooConstForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation error[E0324]: item `MY_CONST` is an associated method, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:33:5 | -16 | const MY_CONST: u32; +LL | const MY_CONST: u32; | -------------------- item in trait ... -33 | fn MY_CONST() {} +LL | fn MY_CONST() {} | ^^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `MY_CONST` --> $DIR/impl-wrong-item-for-trait.rs:30:1 | -16 | const MY_CONST: u32; +LL | const MY_CONST: u32; | -------------------- `MY_CONST` from trait ... -30 | impl Foo for FooMethodForConst { +LL | impl Foo for FooMethodForConst { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `MY_CONST` in implementation error[E0325]: item `bar` is an associated type, which doesn't match its trait `Foo` --> $DIR/impl-wrong-item-for-trait.rs:41:5 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- item in trait ... -41 | type bar = u64; +LL | type bar = u64; | ^^^^^^^^^^^^^^^ does not match trait error[E0046]: not all trait items implemented, missing: `bar` --> $DIR/impl-wrong-item-for-trait.rs:39:1 | -15 | fn bar(&self); +LL | fn bar(&self); | -------------- `bar` from trait ... -39 | impl Foo for FooTypeForMethod { +LL | impl Foo for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `bar` in implementation error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/impl-wrong-item-for-trait.rs:47:1 | -47 | impl Debug for FooTypeForMethod { +LL | impl Debug for FooTypeForMethod { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` diff --git a/src/test/ui/span/import-ty-params.stderr b/src/test/ui/span/import-ty-params.stderr index e2c3e34c471..7e2c2d382fd 100644 --- a/src/test/ui/span/import-ty-params.stderr +++ b/src/test/ui/span/import-ty-params.stderr @@ -1,13 +1,13 @@ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:24:15 | -24 | import! { a::b::c::S<u8> } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S<u8> } //~ ERROR unexpected generic arguments in path | ^^^^^^^^^^^^^^ error: unexpected generic arguments in path --> $DIR/import-ty-params.rs:27:15 | -27 | import! { a::b::c::S<> } //~ ERROR unexpected generic arguments in path +LL | import! { a::b::c::S<> } //~ ERROR unexpected generic arguments in path | ^^^^^^^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-11925.stderr b/src/test/ui/span/issue-11925.stderr index 9e5d5acb862..1185dc6a0cc 100644 --- a/src/test/ui/span/issue-11925.stderr +++ b/src/test/ui/span/issue-11925.stderr @@ -1,13 +1,13 @@ error[E0597]: `x` does not live long enough --> $DIR/issue-11925.rs:18:36 | -18 | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough +LL | let f = to_fn_once(move|| &x); //~ ERROR does not live long enough | ^ | | | borrowed value does not live long enough | `x` dropped here while still borrowed ... -23 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/issue-15480.stderr b/src/test/ui/span/issue-15480.stderr index 35a7390cf5c..c3298a4a0b5 100644 --- a/src/test/ui/span/issue-15480.stderr +++ b/src/test/ui/span/issue-15480.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/issue-15480.rs:15:10 | -15 | &id(3) +LL | &id(3) | ^^^^^ temporary value does not live long enough -16 | ]; +LL | ]; | - temporary value dropped here while still borrowed ... -22 | } +LL | } | - temporary value needs to live until here | = note: consider using a `let` binding to increase its lifetime diff --git a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr index 71a83fe3cc9..ec5c7e637f4 100644 --- a/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr +++ b/src/test/ui/span/issue-23338-locals-die-before-temps-of-body.stderr @@ -1,9 +1,9 @@ error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:20:5 | -20 | y.borrow().clone() +LL | y.borrow().clone() | ^ borrowed value does not live long enough -21 | } +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `y` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/issue-23338-locals-die-before-temps-of-body.rs:27:9 | -27 | y.borrow().clone() +LL | y.borrow().clone() | ^ borrowed value does not live long enough -28 | }; +LL | }; | -- borrowed value needs to live until here | | | `y` dropped here while still borrowed diff --git a/src/test/ui/span/issue-23729.stderr b/src/test/ui/span/issue-23729.stderr index 6d112864b03..d80e3352ee4 100644 --- a/src/test/ui/span/issue-23729.stderr +++ b/src/test/ui/span/issue-23729.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Item` --> $DIR/issue-23729.rs:20:9 | -20 | impl Iterator for Recurrence { +LL | impl Iterator for Recurrence { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Item` in implementation | = note: `Item` from trait: `type Item;` diff --git a/src/test/ui/span/issue-23827.stderr b/src/test/ui/span/issue-23827.stderr index 7f58fe45e62..a94debd575c 100644 --- a/src/test/ui/span/issue-23827.stderr +++ b/src/test/ui/span/issue-23827.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Output` --> $DIR/issue-23827.rs:36:1 | -36 | impl<C: Component> FnOnce<(C,)> for Prototype { +LL | impl<C: Component> FnOnce<(C,)> for Prototype { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `Output` in implementation | = note: `Output` from trait: `type Output;` diff --git a/src/test/ui/span/issue-24356.stderr b/src/test/ui/span/issue-24356.stderr index c529b258cb4..17a25821fd4 100644 --- a/src/test/ui/span/issue-24356.stderr +++ b/src/test/ui/span/issue-24356.stderr @@ -1,7 +1,7 @@ error[E0046]: not all trait items implemented, missing: `Target` --> $DIR/issue-24356.rs:30:9 | -30 | impl Deref for Thing { +LL | impl Deref for Thing { | ^^^^^^^^^^^^^^^^^^^^ missing `Target` in implementation | = note: `Target` from trait: `type Target;` diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index 31728dbf08d..92b6ee4b9c8 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -1,20 +1,20 @@ warning: unused variable: `theOtherTwo` --> $DIR/issue-24690.rs:23:9 | -23 | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ help: consider using `_theOtherTwo` instead | note: lint level defined here --> $DIR/issue-24690.rs:18:9 | -18 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_variables)] implied by #[warn(unused)] warning: variable `theTwo` should have a snake case name such as `the_two` --> $DIR/issue-24690.rs:22:9 | -22 | let theTwo = 2; //~ WARN should have a snake case name +LL | let theTwo = 2; //~ WARN should have a snake case name | ^^^^^^ | = note: #[warn(non_snake_case)] on by default @@ -22,17 +22,17 @@ warning: variable `theTwo` should have a snake case name such as `the_two` warning: variable `theOtherTwo` should have a snake case name such as `the_other_two` --> $DIR/issue-24690.rs:23:9 | -23 | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | let theOtherTwo = 2; //~ WARN should have a snake case name | ^^^^^^^^^^^ error: compilation successful --> $DIR/issue-24690.rs:21:1 | -21 | / fn main() { //~ ERROR compilation successful -22 | | let theTwo = 2; //~ WARN should have a snake case name -23 | | let theOtherTwo = 2; //~ WARN should have a snake case name -24 | | //~^ WARN unused variable +LL | / fn main() { //~ ERROR compilation successful +LL | | let theTwo = 2; //~ WARN should have a snake case name +LL | | let theOtherTwo = 2; //~ WARN should have a snake case name +LL | | //~^ WARN unused variable 25 | | println!("{}", theTwo); -26 | | } +LL | | } | |_^ diff --git a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr index 3c6371aa968..284c07edf03 100644 --- a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr +++ b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr @@ -1,10 +1,10 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:38:19 | -38 | _d = D_Child(&d1); +LL | _d = D_Child(&d1); | ^^ borrowed value does not live long enough ... -43 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr index fcec340a70e..e0e10ff672a 100644 --- a/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr +++ b/src/test/ui/span/issue-24805-dropck-trait-has-items.stderr @@ -1,9 +1,9 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:47:27 | -47 | _d = D_HasSelfMethod(&d1); +LL | _d = D_HasSelfMethod(&d1); | ^^ borrowed value does not live long enough -48 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `d1` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:53:34 | -53 | _d = D_HasMethodWithSelfArg(&d1); +LL | _d = D_HasMethodWithSelfArg(&d1); | ^^ borrowed value does not live long enough -54 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -21,9 +21,9 @@ error[E0597]: `d1` does not live long enough error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:59:21 | -59 | _d = D_HasType(&d1); +LL | _d = D_HasType(&d1); | ^^ borrowed value does not live long enough -60 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr index b10f5d7da1f..31ad51400a2 100644 --- a/src/test/ui/span/issue-24895-copy-clone-dropck.stderr +++ b/src/test/ui/span/issue-24895-copy-clone-dropck.stderr @@ -1,9 +1,9 @@ error[E0597]: `d1` does not live long enough --> $DIR/issue-24895-copy-clone-dropck.rs:37:15 | -37 | d2 = D(S(&d1, "inner"), "d2"); +LL | d2 = D(S(&d1, "inner"), "d2"); | ^^ borrowed value does not live long enough -38 | } +LL | } | - `d1` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-25199.stderr b/src/test/ui/span/issue-25199.stderr index 0a768468c51..f8f36b721cb 100644 --- a/src/test/ui/span/issue-25199.stderr +++ b/src/test/ui/span/issue-25199.stderr @@ -1,10 +1,10 @@ error[E0597]: `container` does not live long enough --> $DIR/issue-25199.rs:80:28 | -80 | let test = Test{test: &container}; +LL | let test = Test{test: &container}; | ^^^^^^^^^ borrowed value does not live long enough ... -85 | } +LL | } | - `container` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `container` does not live long enough error[E0597]: `container` does not live long enough --> $DIR/issue-25199.rs:83:5 | -83 | container.store(test); +LL | container.store(test); | ^^^^^^^^^ borrowed value does not live long enough 84 | //~^ ERROR `container` does not live long enough -85 | } +LL | } | - `container` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-26656.stderr b/src/test/ui/span/issue-26656.stderr index a1124e6e8ed..e15af193bec 100644 --- a/src/test/ui/span/issue-26656.stderr +++ b/src/test/ui/span/issue-26656.stderr @@ -1,9 +1,9 @@ error[E0597]: `ticking` does not live long enough --> $DIR/issue-26656.rs:50:36 | -50 | zook.button = B::BigRedButton(&ticking); +LL | zook.button = B::BigRedButton(&ticking); | ^^^^^^^ borrowed value does not live long enough -51 | } +LL | } | - `ticking` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-27522.stderr b/src/test/ui/span/issue-27522.stderr index 4c816e047de..b171fde0f0f 100644 --- a/src/test/ui/span/issue-27522.stderr +++ b/src/test/ui/span/issue-27522.stderr @@ -1,7 +1,7 @@ error[E0307]: invalid `self` type: &SomeType --> $DIR/issue-27522.rs:16:22 | -16 | fn handler(self: &SomeType); //~ ERROR invalid `self` type +LL | fn handler(self: &SomeType); //~ ERROR invalid `self` type | ^^^^^^^^^ | = note: type must be `Self` or a type that dereferences to it` diff --git a/src/test/ui/span/issue-29106.stderr b/src/test/ui/span/issue-29106.stderr index 3d3aab1166c..3d7bd2232e4 100644 --- a/src/test/ui/span/issue-29106.stderr +++ b/src/test/ui/span/issue-29106.stderr @@ -1,9 +1,9 @@ error[E0597]: `x` does not live long enough --> $DIR/issue-29106.rs:26:27 | -26 | y = Arc::new(Foo(&x)); +LL | y = Arc::new(Foo(&x)); | ^ borrowed value does not live long enough -27 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -11,9 +11,9 @@ error[E0597]: `x` does not live long enough error[E0597]: `x` does not live long enough --> $DIR/issue-29106.rs:33:26 | -33 | y = Rc::new(Foo(&x)); +LL | y = Rc::new(Foo(&x)); | ^ borrowed value does not live long enough -34 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-29595.stderr b/src/test/ui/span/issue-29595.stderr index 61c46f1a4b9..026d2ba41c7 100644 --- a/src/test/ui/span/issue-29595.stderr +++ b/src/test/ui/span/issue-29595.stderr @@ -1,13 +1,13 @@ error[E0277]: the trait bound `u8: Tr` is not satisfied --> $DIR/issue-29595.rs:17:17 | -17 | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied +LL | let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied | ^^^^^ the trait `Tr` is not implemented for `u8` | note: required by `Tr::C` --> $DIR/issue-29595.rs:13:5 | -13 | const C: Self; +LL | const C: Self; | ^^^^^^^^^^^^^^ error: aborting due to previous error diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr index 48d697e7731..fc79b79877a 100644 --- a/src/test/ui/span/issue-33884.stderr +++ b/src/test/ui/span/issue-33884.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/issue-33884.rs:18:22 | -18 | stream.write_fmt(format!("message received")) +LL | stream.write_fmt(format!("message received")) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String` | = note: expected type `std::fmt::Arguments<'_>` diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index eb2b1b84201..bf2de0f1125 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -1,34 +1,34 @@ error: expected one of `:` or `@`, found `<` --> $DIR/issue-34264.rs:11:14 | -11 | fn foo(Option<i32>, String) {} //~ ERROR expected one of +LL | fn foo(Option<i32>, String) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `)` --> $DIR/issue-34264.rs:11:27 | -11 | fn foo(Option<i32>, String) {} //~ ERROR expected one of +LL | fn foo(Option<i32>, String) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error: expected one of `:` or `@`, found `,` --> $DIR/issue-34264.rs:13:9 | -13 | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} //~ ERROR expected one of | ^ expected one of `:` or `@` here error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:17:5 | -11 | fn foo(Option<i32>, String) {} //~ ERROR expected one of +LL | fn foo(Option<i32>, String) {} //~ ERROR expected one of | --------------------------- defined here ... -17 | foo(Some(42), 2, ""); //~ ERROR this function takes +LL | foo(Some(42), 2, ""); //~ ERROR this function takes | ^^^^^^^^^^^^^^^^^^^^ expected 2 parameters error[E0308]: mismatched types --> $DIR/issue-34264.rs:18:13 | -18 | bar("", ""); //~ ERROR mismatched types +LL | bar("", ""); //~ ERROR mismatched types | ^^ expected usize, found reference | = note: expected type `usize` @@ -37,10 +37,10 @@ error[E0308]: mismatched types error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> $DIR/issue-34264.rs:20:5 | -13 | fn bar(x, y: usize) {} //~ ERROR expected one of +LL | fn bar(x, y: usize) {} //~ ERROR expected one of | ------------------- defined here ... -20 | bar(1, 2, 3); //~ ERROR this function takes +LL | bar(1, 2, 3); //~ ERROR this function takes | ^^^^^^^^^^^^ expected 2 parameters error: aborting due to 6 previous errors diff --git a/src/test/ui/span/issue-35987.stderr b/src/test/ui/span/issue-35987.stderr index 5b09342456e..ccbff4fe485 100644 --- a/src/test/ui/span/issue-35987.stderr +++ b/src/test/ui/span/issue-35987.stderr @@ -1,7 +1,7 @@ error[E0404]: expected trait, found type parameter `Add` --> $DIR/issue-35987.rs:15:21 | -15 | impl<T: Clone, Add> Add for Foo<T> { +LL | impl<T: Clone, Add> Add for Foo<T> { | ^^^ not a trait help: possible better candidate is found in another module, you can import it into scope | diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr index 8a9375a32e5..69dd330838d 100644 --- a/src/test/ui/span/issue-36530.stderr +++ b/src/test/ui/span/issue-36530.stderr @@ -1,7 +1,7 @@ error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:11:1 | -11 | #[foo] //~ ERROR is currently unknown to the compiler +LL | #[foo] //~ ERROR is currently unknown to the compiler | ^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable @@ -9,7 +9,7 @@ error[E0658]: The attribute `foo` is currently unknown to the compiler and may h error[E0658]: The attribute `foo` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) --> $DIR/issue-36530.rs:13:5 | -13 | #![foo] //~ ERROR is currently unknown to the compiler +LL | #![foo] //~ ERROR is currently unknown to the compiler | ^^^^^^^ | = help: add #![feature(custom_attribute)] to the crate attributes to enable diff --git a/src/test/ui/span/issue-36537.stderr b/src/test/ui/span/issue-36537.stderr index 24cabe55d0d..28c89096775 100644 --- a/src/test/ui/span/issue-36537.stderr +++ b/src/test/ui/span/issue-36537.stderr @@ -1,10 +1,10 @@ error[E0597]: `a` does not live long enough --> $DIR/issue-36537.rs:14:10 | -14 | p = &a; +LL | p = &a; | ^ borrowed value does not live long enough 15 | //~^ ERROR `a` does not live long enough -16 | } +LL | } | - `a` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue-37767.stderr b/src/test/ui/span/issue-37767.stderr index eab278d607b..ad72a064971 100644 --- a/src/test/ui/span/issue-37767.stderr +++ b/src/test/ui/span/issue-37767.stderr @@ -1,57 +1,57 @@ error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:20:7 | -20 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `A` --> $DIR/issue-37767.rs:12:5 | -12 | fn foo(&mut self) {} +LL | fn foo(&mut self) {} | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `A::foo(&a)` instead note: candidate #2 is defined in the trait `B` --> $DIR/issue-37767.rs:16:5 | -16 | fn foo(&mut self) {} +LL | fn foo(&mut self) {} | ^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `B::foo(&a)` instead error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:32:7 | -32 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `C` --> $DIR/issue-37767.rs:24:5 | -24 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `C::foo(&a)` instead note: candidate #2 is defined in the trait `D` --> $DIR/issue-37767.rs:28:5 | -28 | fn foo(&self) {} +LL | fn foo(&self) {} | ^^^^^^^^^^^^^ = help: to disambiguate the method call, write `D::foo(&a)` instead error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:44:7 | -44 | a.foo() //~ ERROR multiple applicable items +LL | a.foo() //~ ERROR multiple applicable items | ^^^ multiple `foo` found | note: candidate #1 is defined in the trait `E` --> $DIR/issue-37767.rs:36:5 | -36 | fn foo(self) {} +LL | fn foo(self) {} | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `E::foo(a)` instead note: candidate #2 is defined in the trait `F` --> $DIR/issue-37767.rs:40:5 | -40 | fn foo(self) {} +LL | fn foo(self) {} | ^^^^^^^^^^^^ = help: to disambiguate the method call, write `F::foo(a)` instead diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index e841dfc5840..eda10bda886 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&str` --> $DIR/issue-39018.rs:12:13 | -12 | let x = "Hello " + "World!"; +LL | let x = "Hello " + "World!"; | ^^^^^^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings 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 | @@ -11,7 +11,7 @@ help: `to_owned()` can be used to create an owned `String` from a string referen error[E0369]: binary operation `+` cannot be applied to type `World` --> $DIR/issue-39018.rs:18:13 | -18 | let y = World::Hello + World::Goodbye; +LL | let y = World::Hello + World::Goodbye; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: an implementation of `std::ops::Add` might be missing for `World` diff --git a/src/test/ui/span/issue-39698.stderr b/src/test/ui/span/issue-39698.stderr index 888eb405a64..4222d40a12b 100644 --- a/src/test/ui/span/issue-39698.stderr +++ b/src/test/ui/span/issue-39698.stderr @@ -1,7 +1,7 @@ error[E0408]: variable `a` is not bound in all patterns --> $DIR/issue-39698.rs:20:23 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | - ^^^^^^^^^^^ ^^^^^^^^ - variable not in all patterns | | | | | | | pattern doesn't bind `a` @@ -11,7 +11,7 @@ error[E0408]: variable `a` is not bound in all patterns error[E0408]: variable `d` is not bound in all patterns --> $DIR/issue-39698.rs:20:37 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | - - ^^^^^^^^ ^^^^^^^^ pattern doesn't bind `d` | | | | | | | pattern doesn't bind `d` @@ -21,7 +21,7 @@ error[E0408]: variable `d` is not bound in all patterns error[E0408]: variable `b` is not bound in all patterns --> $DIR/issue-39698.rs:20:9 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | ^^^^^^^^^^^ - ^^^^^^^^ ^^^^^^^^ pattern doesn't bind `b` | | | | | | | pattern doesn't bind `b` @@ -31,7 +31,7 @@ error[E0408]: variable `b` is not bound in all patterns error[E0408]: variable `c` is not bound in all patterns --> $DIR/issue-39698.rs:20:9 | -20 | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } +LL | T::T1(a, d) | T::T2(d, b) | T::T3(c) | T::T4(a) => { println!("{:?}", a); } | ^^^^^^^^^^^ ^^^^^^^^^^^ - ^^^^^^^^ pattern doesn't bind `c` | | | | | | | variable not in all patterns diff --git a/src/test/ui/span/issue-40157.stderr b/src/test/ui/span/issue-40157.stderr index fa5036ae5a4..cc029ae84b6 100644 --- a/src/test/ui/span/issue-40157.stderr +++ b/src/test/ui/span/issue-40157.stderr @@ -1,7 +1,7 @@ error[E0597]: `foo` does not live long enough --> $DIR/issue-40157.rs:12:53 | -12 | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} +LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });} | -----------------------------------------------^^^---------------------- | | | | | | | `foo` dropped here while still borrowed diff --git a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr index 567d8f33ed6..508608bd202 100644 --- a/src/test/ui/span/issue-42234-unknown-receiver-type.stderr +++ b/src/test/ui/span/issue-42234-unknown-receiver-type.stderr @@ -1,16 +1,16 @@ error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:17:5 | -16 | let x: Option<_> = None; +LL | let x: Option<_> = None; | - consider giving `x` a type -17 | x.unwrap().method_that_could_exist_on_some_type(); +LL | x.unwrap().method_that_could_exist_on_some_type(); | ^^^^^^^^^^ cannot infer type for `T` error[E0282]: type annotations needed --> $DIR/issue-42234-unknown-receiver-type.rs:22:5 | -22 | / data.iter() //~ ERROR 22:5: 23:20: type annotations needed -23 | | .sum::<_>() +LL | / data.iter() //~ ERROR 22:5: 23:20: type annotations needed +LL | | .sum::<_>() | |___________________^ cannot infer type for `_` error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-43927-non-ADT-derive.stderr b/src/test/ui/span/issue-43927-non-ADT-derive.stderr index a0485bed2f4..e3575c03ff2 100644 --- a/src/test/ui/span/issue-43927-non-ADT-derive.stderr +++ b/src/test/ui/span/issue-43927-non-ADT-derive.stderr @@ -1,7 +1,7 @@ error: `derive` may only be applied to structs, enums and unions --> $DIR/issue-43927-non-ADT-derive.rs:13:1 | -13 | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! +LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute! | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug, PartialEq, Eq)]` error: aborting due to previous error diff --git a/src/test/ui/span/issue-7575.stderr b/src/test/ui/span/issue-7575.stderr index df078c1330c..37e8200a308 100644 --- a/src/test/ui/span/issue-7575.stderr +++ b/src/test/ui/span/issue-7575.stderr @@ -1,7 +1,7 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope --> $DIR/issue-7575.rs:74:18 | -74 | u.f8(42) + u.f9(342) + m.fff(42) +LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -9,19 +9,19 @@ error[E0599]: no method named `f9` found for type `usize` in the current scope note: candidate #1 is defined in the trait `CtxtFn` --> $DIR/issue-7575.rs:16:5 | -16 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `CtxtFn::f9(u, 342)` instead note: candidate #2 is defined in the trait `OtherTrait` --> $DIR/issue-7575.rs:20:5 | -20 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `OtherTrait::f9(u, 342)` instead note: candidate #3 is defined in the trait `UnusedTrait` --> $DIR/issue-7575.rs:29:5 | -29 | fn f9(_: usize) -> usize; +LL | fn f9(_: usize) -> usize; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `UnusedTrait::f9(u, 342)` instead = help: items from traits can only be used if the trait is implemented and in scope @@ -33,10 +33,10 @@ note: candidate #3 is defined in the trait `UnusedTrait` error[E0599]: no method named `fff` found for type `Myisize` in the current scope --> $DIR/issue-7575.rs:74:30 | -48 | struct Myisize(isize); +LL | struct Myisize(isize); | ---------------------- method `fff` not found for this ... -74 | u.f8(42) + u.f9(342) + m.fff(42) +LL | u.f8(42) + u.f9(342) + m.fff(42) | ^^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -44,13 +44,13 @@ error[E0599]: no method named `fff` found for type `Myisize` in the current scop note: candidate #1 is defined in an impl for the type `Myisize` --> $DIR/issue-7575.rs:51:5 | -51 | fn fff(i: isize) -> isize { +LL | fn fff(i: isize) -> isize { | ^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0599]: no method named `is_str` found for type `T` in the current scope --> $DIR/issue-7575.rs:82:7 | -82 | t.is_str() +LL | t.is_str() | ^^^^^^ | = note: found the following associated functions; to be used as methods, functions must have a `self` parameter @@ -58,7 +58,7 @@ error[E0599]: no method named `is_str` found for type `T` in the current scope note: candidate #1 is defined in the trait `ManyImplTrait` --> $DIR/issue-7575.rs:57:5 | -57 | fn is_str() -> bool { +LL | fn is_str() -> bool { | ^^^^^^^^^^^^^^^^^^^ = help: to disambiguate the method call, write `ManyImplTrait::is_str(t)` instead = help: items from traits can only be used if the trait is implemented and in scope diff --git a/src/test/ui/span/issue28498-reject-ex1.stderr b/src/test/ui/span/issue28498-reject-ex1.stderr index 3504adc1602..24aec450700 100644 --- a/src/test/ui/span/issue28498-reject-ex1.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.stderr @@ -1,10 +1,10 @@ error[E0597]: `foo.data` does not live long enough --> $DIR/issue28498-reject-ex1.rs:44:29 | -44 | foo.data[0].1.set(Some(&foo.data[1])); +LL | foo.data[0].1.set(Some(&foo.data[1])); | ^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `foo.data` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `foo.data` does not live long enough error[E0597]: `foo.data` does not live long enough --> $DIR/issue28498-reject-ex1.rs:46:29 | -46 | foo.data[1].1.set(Some(&foo.data[0])); +LL | foo.data[1].1.set(Some(&foo.data[0])); | ^^^^^^^^ borrowed value does not live long enough 47 | //~^ ERROR `foo.data` does not live long enough -48 | } +LL | } | - `foo.data` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.stderr b/src/test/ui/span/issue28498-reject-lifetime-param.stderr index 5b4a1129d79..a701ff6eb3e 100644 --- a/src/test/ui/span/issue28498-reject-lifetime-param.stderr +++ b/src/test/ui/span/issue28498-reject-lifetime-param.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-lifetime-param.rs:42:20 | -42 | foo0 = Foo(0, &last_dropped); +LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-lifetime-param.rs:44:20 | -44 | foo1 = Foo(1, &first_dropped); +LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -48 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr index a7497a1de01..934863fa4da 100644 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.stderr +++ b/src/test/ui/span/issue28498-reject-passed-to-fn.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-passed-to-fn.rs:44:20 | -44 | foo0 = Foo(0, &last_dropped, Box::new(callback)); +LL | foo0 = Foo(0, &last_dropped, Box::new(callback)); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-passed-to-fn.rs:46:20 | -46 | foo1 = Foo(1, &first_dropped, Box::new(callback)); +LL | foo1 = Foo(1, &first_dropped, Box::new(callback)); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/issue28498-reject-trait-bound.stderr b/src/test/ui/span/issue28498-reject-trait-bound.stderr index 18512847238..4630022e9c4 100644 --- a/src/test/ui/span/issue28498-reject-trait-bound.stderr +++ b/src/test/ui/span/issue28498-reject-trait-bound.stderr @@ -1,10 +1,10 @@ error[E0597]: `last_dropped` does not live long enough --> $DIR/issue28498-reject-trait-bound.rs:44:20 | -44 | foo0 = Foo(0, &last_dropped); +LL | foo0 = Foo(0, &last_dropped); | ^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `last_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `last_dropped` does not live long enough error[E0597]: `first_dropped` does not live long enough --> $DIR/issue28498-reject-trait-bound.rs:46:20 | -46 | foo1 = Foo(1, &first_dropped); +LL | foo1 = Foo(1, &first_dropped); | ^^^^^^^^^^^^^ borrowed value does not live long enough ... -50 | } +LL | } | - `first_dropped` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/lint-unused-unsafe.stderr b/src/test/ui/span/lint-unused-unsafe.stderr index 8a8b104098e..2554dec59cf 100644 --- a/src/test/ui/span/lint-unused-unsafe.stderr +++ b/src/test/ui/span/lint-unused-unsafe.stderr @@ -1,25 +1,25 @@ error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:26:13 | -26 | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | fn bad1() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block | note: lint level defined here --> $DIR/lint-unused-unsafe.rs:14:9 | -14 | #![deny(unused_unsafe)] +LL | #![deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:27:13 | -27 | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad2() { unsafe { bad1() } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:28:20 | -28 | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad3() { unsafe {} } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -27,13 +27,13 @@ error: unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:29:13 | -29 | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block +LL | fn bad4() { unsafe { callback(||{}) } } //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:30:20 | -30 | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block +LL | unsafe fn bad5() { unsafe { unsf() } } //~ ERROR: unnecessary `unsafe` block | ---------------- ^^^^^^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn @@ -41,26 +41,26 @@ error: unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:33:9 | -32 | unsafe { // don't put the warning here +LL | unsafe { // don't put the warning here | ------ because it's nested under this `unsafe` block -33 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:39:5 | -38 | unsafe fn bad7() { +LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -39 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: unnecessary `unsafe` block --> $DIR/lint-unused-unsafe.rs:40:9 | -38 | unsafe fn bad7() { +LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn 39 | unsafe { //~ ERROR: unnecessary `unsafe` block -40 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block error: aborting due to 8 previous errors diff --git a/src/test/ui/span/macro-span-replacement.stderr b/src/test/ui/span/macro-span-replacement.stderr index 728cd12e2c6..bb59fa206df 100644 --- a/src/test/ui/span/macro-span-replacement.stderr +++ b/src/test/ui/span/macro-span-replacement.stderr @@ -1,16 +1,16 @@ warning: struct is never used: `S` --> $DIR/macro-span-replacement.rs:17:14 | -17 | $b $a; //~ WARN struct is never used +LL | $b $a; //~ WARN struct is never used | ^ ... -22 | m!(S struct); +LL | m!(S struct); | ------------- in this macro invocation | note: lint level defined here --> $DIR/macro-span-replacement.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] diff --git a/src/test/ui/span/macro-ty-params.stderr b/src/test/ui/span/macro-ty-params.stderr index 2ac132f708c..3988dec88d5 100644 --- a/src/test/ui/span/macro-ty-params.stderr +++ b/src/test/ui/span/macro-ty-params.stderr @@ -1,25 +1,25 @@ error: unexpected generic arguments in path --> $DIR/macro-ty-params.rs:20:8 | -20 | m!(MyTrait<>); //~ ERROR generic arguments in macro path +LL | m!(MyTrait<>); //~ ERROR generic arguments in macro path | ^^^^^^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:18:8 | -18 | foo::<T>!(); //~ ERROR generic arguments in macro path +LL | foo::<T>!(); //~ ERROR generic arguments in macro path | ^^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:19:8 | -19 | foo::<>!(); //~ ERROR generic arguments in macro path +LL | foo::<>!(); //~ ERROR generic arguments in macro path | ^^^^ error: generic arguments in macro path --> $DIR/macro-ty-params.rs:20:15 | -20 | m!(MyTrait<>); //~ ERROR generic arguments in macro path +LL | m!(MyTrait<>); //~ ERROR generic arguments in macro path | ^^ error: aborting due to 4 previous errors diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index 752087ffb92..87f5aa514ce 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -1,7 +1,7 @@ error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:21:33 | -21 | let _: Result<(), String> = Ok(); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(); //~ ERROR this function takes | ^^^^ help: expected the unit value `()`; create it with empty parentheses | @@ -11,28 +11,28 @@ help: expected the unit value `()`; create it with empty parentheses error[E0061]: this function takes 2 parameters but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:22:5 | -11 | fn foo(():(), ():()) {} +LL | fn foo(():(), ():()) {} | -------------------- defined here ... -22 | foo(); //~ ERROR this function takes +LL | foo(); //~ ERROR this function takes | ^^^^^ expected 2 parameters error[E0061]: this function takes 2 parameters but 1 parameter was supplied --> $DIR/missing-unit-argument.rs:23:5 | -11 | fn foo(():(), ():()) {} +LL | fn foo(():(), ():()) {} | -------------------- defined here ... -23 | foo(()); //~ ERROR this function takes +LL | foo(()); //~ ERROR this function takes | ^^^^^^^ expected 2 parameters error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:24:5 | -12 | fn bar(():()) {} +LL | fn bar(():()) {} | ------------- defined here ... -24 | bar(); //~ ERROR this function takes +LL | bar(); //~ ERROR this function takes | ^^^^^ help: expected the unit value `()`; create it with empty parentheses | @@ -42,10 +42,10 @@ help: expected the unit value `()`; create it with empty parentheses error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:25:7 | -16 | fn baz(self, (): ()) { } +LL | fn baz(self, (): ()) { } | -------------------- defined here ... -25 | S.baz(); //~ ERROR this function takes +LL | S.baz(); //~ ERROR this function takes | ^^^ help: expected the unit value `()`; create it with empty parentheses | @@ -55,10 +55,10 @@ help: expected the unit value `()`; create it with empty parentheses error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> $DIR/missing-unit-argument.rs:26:7 | -17 | fn generic<T>(self, _: T) { } +LL | fn generic<T>(self, _: T) { } | ------------------------- defined here ... -26 | S.generic::<()>(); //~ ERROR this function takes +LL | S.generic::<()>(); //~ ERROR this function takes | ^^^^^^^ help: expected the unit value `()`; create it with empty parentheses | diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr index f8f17404cf2..497224b7b53 100644 --- a/src/test/ui/span/move-closure.stderr +++ b/src/test/ui/span/move-closure.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types --> $DIR/move-closure.rs:15:17 | -15 | let x: () = move || (); //~ ERROR mismatched types +LL | let x: () = move || (); //~ ERROR mismatched types | ^^^^^^^^^^ expected (), found closure | = note: expected type `()` diff --git a/src/test/ui/span/multiline-span-E0072.stderr b/src/test/ui/span/multiline-span-E0072.stderr index 314c52e59d3..42ec3764fff 100644 --- a/src/test/ui/span/multiline-span-E0072.stderr +++ b/src/test/ui/span/multiline-span-E0072.stderr @@ -1,13 +1,13 @@ error[E0072]: recursive type `ListNode` has infinite size --> $DIR/multiline-span-E0072.rs:12:1 | -12 | / struct //~ ERROR has infinite size -13 | | ListNode -14 | | { -15 | | head: u8, -16 | | tail: Option<ListNode>, +LL | / struct //~ ERROR has infinite size +LL | | ListNode +LL | | { +LL | | head: u8, +LL | | tail: Option<ListNode>, | | ---------------------- recursive without indirection -17 | | } +LL | | } | |_^ recursive type has infinite size | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ListNode` representable diff --git a/src/test/ui/span/multiline-span-simple.stderr b/src/test/ui/span/multiline-span-simple.stderr index b1e48069fed..e3bb8349f8a 100644 --- a/src/test/ui/span/multiline-span-simple.stderr +++ b/src/test/ui/span/multiline-span-simple.stderr @@ -1,7 +1,7 @@ error[E0277]: cannot add `()` to `u32` --> $DIR/multiline-span-simple.rs:23:18 | -23 | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` +LL | foo(1 as u32 + //~ ERROR cannot add `()` to `u32` | ^ no implementation for `u32 + ()` | = help: the trait `std::ops::Add<()>` is not implemented for `u32` diff --git a/src/test/ui/span/multispan-import-lint.stderr b/src/test/ui/span/multispan-import-lint.stderr index e2c1d9cdc79..da22b217b82 100644 --- a/src/test/ui/span/multispan-import-lint.stderr +++ b/src/test/ui/span/multispan-import-lint.stderr @@ -1,13 +1,13 @@ warning: unused imports: `Eq`, `Ord`, `PartialEq`, `PartialOrd` --> $DIR/multispan-import-lint.rs:15:16 | -15 | use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd}; +LL | use std::cmp::{Eq, Ord, min, PartialEq, PartialOrd}; | ^^ ^^^ ^^^^^^^^^ ^^^^^^^^^^ | note: lint level defined here --> $DIR/multispan-import-lint.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(unused_imports)] implied by #[warn(unused)] diff --git a/src/test/ui/span/mut-arg-hint.stderr b/src/test/ui/span/mut-arg-hint.stderr index e79ca70f3d2..73a63aabe67 100644 --- a/src/test/ui/span/mut-arg-hint.stderr +++ b/src/test/ui/span/mut-arg-hint.stderr @@ -1,25 +1,25 @@ error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:13:9 | -12 | fn foo(mut a: &String) { +LL | fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -13 | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("bar"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:18:5 | -17 | pub fn foo<'a>(mut a: &'a String) { +LL | pub fn foo<'a>(mut a: &'a String) { | ---------- use `&'a mut String` here to make mutable -18 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error[E0596]: cannot borrow immutable borrowed content `*a` as mutable --> $DIR/mut-arg-hint.rs:25:9 | -24 | pub fn foo(mut a: &String) { +LL | pub fn foo(mut a: &String) { | ------- use `&mut String` here to make mutable -25 | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content +LL | a.push_str("foo"); //~ ERROR cannot borrow immutable borrowed content | ^ cannot borrow as mutable error: aborting due to 3 previous errors diff --git a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr index c08d15cd570..8066ef501d2 100644 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr +++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr @@ -1,12 +1,12 @@ error[E0597]: `b` does not live long enough --> $DIR/mut-ptr-cant-outlive-ref.rs:18:15 | -18 | p = &*b; +LL | p = &*b; | ^ borrowed value does not live long enough -19 | } +LL | } | - `b` dropped here while still borrowed 20 | //~^^ ERROR `b` does not live long enough -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/non-existing-module-import.stderr b/src/test/ui/span/non-existing-module-import.stderr index 2b45d92724c..ed9ae1f21b4 100644 --- a/src/test/ui/span/non-existing-module-import.stderr +++ b/src/test/ui/span/non-existing-module-import.stderr @@ -1,7 +1,7 @@ error[E0432]: unresolved import `std::bar` --> $DIR/non-existing-module-import.rs:11:10 | -11 | use std::bar::{foo1, foo2}; //~ ERROR unresolved import +LL | use std::bar::{foo1, foo2}; //~ ERROR unresolved import | ^^^ Could not find `bar` in `std` error: aborting due to previous error diff --git a/src/test/ui/span/pub-struct-field.stderr b/src/test/ui/span/pub-struct-field.stderr index fe19259a140..5fb1c4cf41c 100644 --- a/src/test/ui/span/pub-struct-field.stderr +++ b/src/test/ui/span/pub-struct-field.stderr @@ -1,18 +1,18 @@ error[E0124]: field `bar` is already declared --> $DIR/pub-struct-field.rs:16:5 | -15 | bar: u8, +LL | bar: u8, | ------- `bar` first declared here -16 | pub bar: u8, //~ ERROR is already declared +LL | pub bar: u8, //~ ERROR is already declared | ^^^^^^^^^^^ field already declared error[E0124]: field `bar` is already declared --> $DIR/pub-struct-field.rs:17:5 | -15 | bar: u8, +LL | bar: u8, | ------- `bar` first declared here 16 | pub bar: u8, //~ ERROR is already declared -17 | pub(crate) bar: u8, //~ ERROR is already declared +LL | pub(crate) bar: u8, //~ ERROR is already declared | ^^^^^^^^^^^^^^^^^^ field already declared error: aborting due to 2 previous errors diff --git a/src/test/ui/span/range-2.stderr b/src/test/ui/span/range-2.stderr index e580022dfcb..6378e55f803 100644 --- a/src/test/ui/span/range-2.stderr +++ b/src/test/ui/span/range-2.stderr @@ -1,23 +1,23 @@ error[E0597]: `a` does not live long enough --> $DIR/range-2.rs:17:10 | -17 | &a..&b +LL | &a..&b | ^ borrowed value does not live long enough -18 | }; +LL | }; | - `a` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error[E0597]: `b` does not live long enough --> $DIR/range-2.rs:17:14 | -17 | &a..&b +LL | &a..&b | ^ borrowed value does not live long enough -18 | }; +LL | }; | - `b` dropped here while still borrowed ... -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/span/recursive-type-field.stderr b/src/test/ui/span/recursive-type-field.stderr index 6b8f6530233..7ac63d3ca6e 100644 --- a/src/test/ui/span/recursive-type-field.stderr +++ b/src/test/ui/span/recursive-type-field.stderr @@ -1,9 +1,9 @@ error[E0072]: recursive type `Foo` has infinite size --> $DIR/recursive-type-field.rs:13:1 | -13 | struct Foo<'a> { //~ ERROR recursive type +LL | struct Foo<'a> { //~ ERROR recursive type | ^^^^^^^^^^^^^^ recursive type has infinite size -14 | bar: Bar<'a>, +LL | bar: Bar<'a>, | ------------ recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Foo` representable @@ -11,18 +11,18 @@ error[E0072]: recursive type `Foo` has infinite size error[E0072]: recursive type `Bar` has infinite size --> $DIR/recursive-type-field.rs:18:1 | -18 | struct Bar<'a> { //~ ERROR recursive type +LL | struct Bar<'a> { //~ ERROR recursive type | ^^^^^^^^^^^^^^ recursive type has infinite size -19 | y: (Foo<'a>, Foo<'a>), +LL | y: (Foo<'a>, Foo<'a>), | --------------------- recursive without indirection -20 | z: Option<Bar<'a>>, +LL | z: Option<Bar<'a>>, | ------------------ recursive without indirection ... -23 | d: [Bar<'a>; 1], +LL | d: [Bar<'a>; 1], | --------------- recursive without indirection -24 | e: Foo<'a>, +LL | e: Foo<'a>, | ---------- recursive without indirection -25 | x: Bar<'a>, +LL | x: Bar<'a>, | ---------- recursive without indirection | = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `Bar` representable diff --git a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr index c437fd1b48a..c9e8a6d8f56 100644 --- a/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr +++ b/src/test/ui/span/regionck-unboxed-closure-lifetimes.stderr @@ -1,12 +1,12 @@ error[E0597]: `c` does not live long enough --> $DIR/regionck-unboxed-closure-lifetimes.rs:17:22 | -17 | let c_ref = &c; +LL | let c_ref = &c; | ^ borrowed value does not live long enough ... -20 | } +LL | } | - `c` dropped here while still borrowed -21 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr index 19290139efc..785a4718253 100644 --- a/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr +++ b/src/test/ui/span/regions-close-over-borrowed-ref-in-obj.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/regions-close-over-borrowed-ref-in-obj.rs:22:27 | -22 | let ss: &isize = &id(1); +LL | let ss: &isize = &id(1); | ^^^^^ temporary value does not live long enough ... -25 | } +LL | } | - temporary value dropped here while still borrowed -26 | } +LL | } | - temporary value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-close-over-type-parameter-2.stderr b/src/test/ui/span/regions-close-over-type-parameter-2.stderr index f4a7ed61928..1ba31a7e9d7 100644 --- a/src/test/ui/span/regions-close-over-type-parameter-2.stderr +++ b/src/test/ui/span/regions-close-over-type-parameter-2.stderr @@ -1,10 +1,10 @@ error[E0597]: `tmp0` does not live long enough --> $DIR/regions-close-over-type-parameter-2.rs:33:21 | -33 | let tmp1 = &tmp0; +LL | let tmp1 = &tmp0; | ^^^^ borrowed value does not live long enough 34 | repeater3(tmp1) -35 | }; +LL | }; | -- borrowed value needs to live until here | | | `tmp0` dropped here while still borrowed diff --git a/src/test/ui/span/regions-escape-loop-via-variable.stderr b/src/test/ui/span/regions-escape-loop-via-variable.stderr index 780276d770e..778b4c9f4c7 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.stderr @@ -1,12 +1,12 @@ error[E0597]: `x` does not live long enough --> $DIR/regions-escape-loop-via-variable.rs:21:14 | -21 | p = &x; +LL | p = &x; | ^ borrowed value does not live long enough -22 | } +LL | } | - `x` dropped here while still borrowed 23 | //~^^ ERROR `x` does not live long enough -24 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/regions-escape-loop-via-vec.stderr b/src/test/ui/span/regions-escape-loop-via-vec.stderr index 71fc4c24ebd..34db3095d72 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.stderr @@ -1,38 +1,38 @@ error[E0597]: `z` does not live long enough --> $DIR/regions-escape-loop-via-vec.rs:17:22 | -17 | _y.push(&mut z); +LL | _y.push(&mut z); | ^ borrowed value does not live long enough ... -20 | } +LL | } | - `z` dropped here while still borrowed -21 | } +LL | } | - borrowed value needs to live until here error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:15:11 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here -15 | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed +LL | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed | ^ use of borrowed `x` error[E0503]: cannot use `x` because it was mutably borrowed --> $DIR/regions-escape-loop-via-vec.rs:16:13 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here 15 | while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed -16 | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed +LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed | ^^^^^ use of borrowed `x` error[E0506]: cannot assign to `x` because it is borrowed --> $DIR/regions-escape-loop-via-vec.rs:19:9 | -14 | let mut _y = vec![&mut x]; +LL | let mut _y = vec![&mut x]; | - borrow of `x` occurs here ... -19 | x += 1; //~ ERROR cannot assign +LL | x += 1; //~ ERROR cannot assign | ^^^^^^ assignment to borrowed `x` occurs here error: aborting due to 4 previous errors diff --git a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr index 10b6c05b5f4..749ccf65783 100644 --- a/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr +++ b/src/test/ui/span/regions-infer-borrow-scope-within-loop.stderr @@ -1,13 +1,13 @@ error[E0597]: `*x` does not live long enough --> $DIR/regions-infer-borrow-scope-within-loop.rs:24:21 | -24 | y = borrow(&*x); +LL | y = borrow(&*x); | ^^ borrowed value does not live long enough ... -29 | } +LL | } | - `*x` dropped here while still borrowed 30 | assert!(*y != 0); -31 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error diff --git a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr index 5d8e4ff86ee..462c01d849b 100644 --- a/src/test/ui/span/send-is-not-static-ensures-scoping.stderr +++ b/src/test/ui/span/send-is-not-static-ensures-scoping.stderr @@ -1,27 +1,27 @@ error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-ensures-scoping.rs:26:18 | -26 | let y = &x; +LL | let y = &x; | ^ borrowed value does not live long enough ... -33 | }; +LL | }; | - `x` dropped here while still borrowed ... -36 | } +LL | } | - borrowed value needs to live until here error[E0597]: `y` does not live long enough --> $DIR/send-is-not-static-ensures-scoping.rs:30:22 | -29 | scoped(|| { +LL | scoped(|| { | -- capture occurs here -30 | let _z = y; +LL | let _z = y; | ^ borrowed value does not live long enough ... -33 | }; +LL | }; | - borrowed value only lives until here ... -36 | } +LL | } | - borrowed value needs to live until here error: aborting due to 2 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync-2.stderr b/src/test/ui/span/send-is-not-static-std-sync-2.stderr index 2d7e4667a40..5c3e38db2a3 100644 --- a/src/test/ui/span/send-is-not-static-std-sync-2.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync-2.stderr @@ -1,35 +1,35 @@ error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:21:21 | -21 | Mutex::new(&x) +LL | Mutex::new(&x) | ^ borrowed value does not live long enough -22 | }; +LL | }; | - `x` dropped here while still borrowed ... -26 | } +LL | } | - borrowed value needs to live until here error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:31:22 | -31 | RwLock::new(&x) +LL | RwLock::new(&x) | ^ borrowed value does not live long enough -32 | }; +LL | }; | - `x` dropped here while still borrowed ... -35 | } +LL | } | - borrowed value needs to live until here error[E0597]: `x` does not live long enough --> $DIR/send-is-not-static-std-sync-2.rs:41:26 | -41 | let _ = tx.send(&x); +LL | let _ = tx.send(&x); | ^ borrowed value does not live long enough 42 | (tx, rx) -43 | }; +LL | }; | - `x` dropped here while still borrowed ... -47 | } +LL | } | - borrowed value needs to live until here error: aborting due to 3 previous errors diff --git a/src/test/ui/span/send-is-not-static-std-sync.stderr b/src/test/ui/span/send-is-not-static-std-sync.stderr index 66e2abba710..3fcb145579d 100644 --- a/src/test/ui/span/send-is-not-static-std-sync.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync.stderr @@ -1,58 +1,58 @@ error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:26:34 | -26 | *lock.lock().unwrap() = &z; +LL | *lock.lock().unwrap() = &z; | ^ borrowed value does not live long enough -27 | } +LL | } | - `z` dropped here while still borrowed 28 | //~^^ ERROR `z` does not live long enough -29 | } +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:23:10 | -22 | *lock.lock().unwrap() = &*y; +LL | *lock.lock().unwrap() = &*y; | -- borrow of `*y` occurs here -23 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:39:35 | -39 | *lock.write().unwrap() = &z; +LL | *lock.write().unwrap() = &z; | ^ borrowed value does not live long enough -40 | } +LL | } | - `z` dropped here while still borrowed 41 | //~^^ ERROR `z` does not live long enough -42 | } +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:36:10 | -35 | *lock.write().unwrap() = &*y; +LL | *lock.write().unwrap() = &*y; | -- borrow of `*y` occurs here -36 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error[E0597]: `z` does not live long enough --> $DIR/send-is-not-static-std-sync.rs:54:18 | -54 | tx.send(&z).unwrap(); +LL | tx.send(&z).unwrap(); | ^ borrowed value does not live long enough -55 | } +LL | } | - `z` dropped here while still borrowed 56 | //~^^ ERROR `z` does not live long enough -57 | } +LL | } | - borrowed value needs to live until here error[E0505]: cannot move out of `y` because it is borrowed --> $DIR/send-is-not-static-std-sync.rs:51:10 | -50 | tx.send(&*y); +LL | tx.send(&*y); | -- borrow of `*y` occurs here -51 | drop(y); //~ ERROR cannot move out +LL | drop(y); //~ ERROR cannot move out | ^ move out of `y` occurs here error: aborting due to 6 previous errors diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index 6f6a187a075..67c432a823a 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -1,12 +1,12 @@ error[E0597]: borrowed value does not live long enough --> $DIR/slice-borrow.rs:16:28 | -16 | let x: &[isize] = &vec![1, 2, 3, 4, 5]; +LL | let x: &[isize] = &vec![1, 2, 3, 4, 5]; | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough 17 | y = &x[1..]; -18 | } +LL | } | - temporary value dropped here while still borrowed -19 | } +LL | } | - temporary value needs to live until here | = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) diff --git a/src/test/ui/span/suggestion-non-ascii.stderr b/src/test/ui/span/suggestion-non-ascii.stderr index 02c0b73c0c7..331d18fad54 100644 --- a/src/test/ui/span/suggestion-non-ascii.stderr +++ b/src/test/ui/span/suggestion-non-ascii.stderr @@ -1,7 +1,7 @@ error[E0608]: cannot index into a value of type `({integer},)` --> $DIR/suggestion-non-ascii.rs:14:21 | -14 | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type +LL | println!("☃{}", tup[0]); //~ ERROR cannot index into a value of type | ^^^^^^ help: to access tuple elements, use: `tup.0` error: aborting due to previous error diff --git a/src/test/ui/span/type-binding.stderr b/src/test/ui/span/type-binding.stderr index 984504071ac..407897bfcfe 100644 --- a/src/test/ui/span/type-binding.stderr +++ b/src/test/ui/span/type-binding.stderr @@ -1,7 +1,7 @@ error[E0220]: associated type `Trget` not found for `std::ops::Deref` --> $DIR/type-binding.rs:16:20 | -16 | fn homura<T: Deref<Trget = i32>>(_: T) {} +LL | fn homura<T: Deref<Trget = i32>>(_: T) {} | ^^^^^^^^^^^ associated type `Trget` not found error: aborting due to previous error diff --git a/src/test/ui/span/typo-suggestion.stderr b/src/test/ui/span/typo-suggestion.stderr index 31247bddbc8..01056597013 100644 --- a/src/test/ui/span/typo-suggestion.stderr +++ b/src/test/ui/span/typo-suggestion.stderr @@ -1,13 +1,13 @@ error[E0425]: cannot find value `bar` in this scope --> $DIR/typo-suggestion.rs:15:26 | -15 | println!("Hello {}", bar); //~ ERROR cannot find value +LL | println!("Hello {}", bar); //~ ERROR cannot find value | ^^^ not found in this scope error[E0425]: cannot find value `fob` in this scope --> $DIR/typo-suggestion.rs:18:26 | -18 | println!("Hello {}", fob); //~ ERROR cannot find value +LL | println!("Hello {}", fob); //~ ERROR cannot find value | ^^^ did you mean `foo`? error: aborting due to 2 previous errors diff --git a/src/test/ui/span/unused-warning-point-at-signature.stderr b/src/test/ui/span/unused-warning-point-at-signature.stderr index ed36bd17801..1c5ff7c8bc3 100644 --- a/src/test/ui/span/unused-warning-point-at-signature.stderr +++ b/src/test/ui/span/unused-warning-point-at-signature.stderr @@ -1,36 +1,36 @@ warning: enum is never used: `Enum` --> $DIR/unused-warning-point-at-signature.rs:15:1 | -15 | enum Enum { //~ WARN enum is never used +LL | enum Enum { //~ WARN enum is never used | ^^^^^^^^^ | note: lint level defined here --> $DIR/unused-warning-point-at-signature.rs:13:9 | -13 | #![warn(unused)] +LL | #![warn(unused)] | ^^^^^^ = note: #[warn(dead_code)] implied by #[warn(unused)] warning: struct is never used: `Struct` --> $DIR/unused-warning-point-at-signature.rs:22:1 | -22 | struct Struct { //~ WARN struct is never used +LL | struct Struct { //~ WARN struct is never used | ^^^^^^^^^^^^^ warning: function is never used: `func` --> $DIR/unused-warning-point-at-signature.rs:29:1 | -29 | fn func() -> usize { //~ WARN function is never used +LL | fn func() -> usize { //~ WARN function is never used | ^^^^^^^^^^^^^^^^^^ warning: function is never used: `func_complete_span` --> $DIR/unused-warning-point-at-signature.rs:33:1 | -33 | / fn //~ WARN function is never used -34 | | func_complete_span() -35 | | -> usize -36 | | { +LL | / fn //~ WARN function is never used +LL | | func_complete_span() +LL | | -> usize +LL | | { 37 | | 3 -38 | | } +LL | | } | |_^ diff --git a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr index 26417e94b8b..5a8751b4626 100644 --- a/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr +++ b/src/test/ui/span/vec-must-not-hide-type-from-dropck.stderr @@ -1,24 +1,24 @@ error[E0597]: `c2` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25 - | -127 | c1.v[0].v.set(Some(&c2)); - | ^^ borrowed value does not live long enough + --> $DIR/vec-must-not-hide-type-from-dropck.rs:127:25 + | +LL | c1.v[0].v.set(Some(&c2)); + | ^^ borrowed value does not live long enough ... -131 | } - | - `c2` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created +LL | } + | - `c2` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error[E0597]: `c1` does not live long enough - --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:25 - | -129 | c2.v[0].v.set(Some(&c1)); - | ^^ borrowed value does not live long enough -130 | //~^ ERROR `c1` does not live long enough -131 | } - | - `c1` dropped here while still borrowed - | - = note: values in a scope are dropped in the opposite order they are created + --> $DIR/vec-must-not-hide-type-from-dropck.rs:129:25 + | +LL | c2.v[0].v.set(Some(&c1)); + | ^^ borrowed value does not live long enough +130| //~^ ERROR `c1` does not live long enough +LL | } + | - `c1` dropped here while still borrowed + | + = note: values in a scope are dropped in the opposite order they are created error: aborting due to 2 previous errors diff --git a/src/test/ui/span/vec_refs_data_with_early_death.stderr b/src/test/ui/span/vec_refs_data_with_early_death.stderr index 8402826a0bc..cdf0cd6de5c 100644 --- a/src/test/ui/span/vec_refs_data_with_early_death.stderr +++ b/src/test/ui/span/vec_refs_data_with_early_death.stderr @@ -1,10 +1,10 @@ error[E0597]: `x` does not live long enough --> $DIR/vec_refs_data_with_early_death.rs:27:13 | -27 | v.push(&x); +LL | v.push(&x); | ^ borrowed value does not live long enough ... -33 | } +LL | } | - `x` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created @@ -12,10 +12,10 @@ error[E0597]: `x` does not live long enough error[E0597]: `y` does not live long enough --> $DIR/vec_refs_data_with_early_death.rs:29:13 | -29 | v.push(&y); +LL | v.push(&y); | ^ borrowed value does not live long enough ... -33 | } +LL | } | - `y` dropped here while still borrowed | = note: values in a scope are dropped in the opposite order they are created diff --git a/src/test/ui/span/visibility-ty-params.stderr b/src/test/ui/span/visibility-ty-params.stderr index 8460f81af83..7719bd48c85 100644 --- a/src/test/ui/span/visibility-ty-params.stderr +++ b/src/test/ui/span/visibility-ty-params.stderr @@ -1,13 +1,13 @@ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:16:5 | -16 | m!{ S<u8> } //~ ERROR unexpected generic arguments in path +LL | m!{ S<u8> } //~ ERROR unexpected generic arguments in path | ^^^^^ error: unexpected generic arguments in path --> $DIR/visibility-ty-params.rs:19:9 | -19 | m!{ m<> } //~ ERROR unexpected generic arguments in path +LL | m!{ m<> } //~ ERROR unexpected generic arguments in path | ^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/span/wf-method-late-bound-regions.stderr b/src/test/ui/span/wf-method-late-bound-regions.stderr index a0fe9d1ae18..30b1086bbd7 100644 --- a/src/test/ui/span/wf-method-late-bound-regions.stderr +++ b/src/test/ui/span/wf-method-late-bound-regions.stderr @@ -1,12 +1,12 @@ error[E0597]: `pointer` does not live long enough --> $DIR/wf-method-late-bound-regions.rs:30:19 | -30 | f2.xmute(&pointer) +LL | f2.xmute(&pointer) | ^^^^^^^ borrowed value does not live long enough -31 | }; +LL | }; | - `pointer` dropped here while still borrowed ... -34 | } +LL | } | - borrowed value needs to live until here error: aborting due to previous error |
