diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-25 02:01:39 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-26 20:24:42 +0300 |
| commit | 7ba5fd168a20cbead2afb800e638159e11bb79da (patch) | |
| tree | 285649d5d4c3e8366d319df727c7b858db69db50 /src/test/ui/span | |
| parent | 99b1054d9f4442fd5cc535d5ad90f3542791a547 (diff) | |
| download | rust-7ba5fd168a20cbead2afb800e638159e11bb79da.tar.gz rust-7ba5fd168a20cbead2afb800e638159e11bb79da.zip | |
Update UI tests
Diffstat (limited to 'src/test/ui/span')
28 files changed, 36 insertions, 36 deletions
diff --git a/src/test/ui/span/E0072.stderr b/src/test/ui/span/E0072.stderr index de0d29f6432..1c03cfe0e9e 100644 --- a/src/test/ui/span/E0072.stderr +++ b/src/test/ui/span/E0072.stderr @@ -3,7 +3,7 @@ error[E0072]: recursive type `ListNode` has infinite size | LL | struct ListNode { //~ ERROR has infinite size | ^^^^^^^^^^^^^^^ recursive type has infinite size -12 | head: u8, +LL | head: u8, LL | tail: Option<ListNode>, | ---------------------- recursive without indirection | diff --git a/src/test/ui/span/E0204.stderr b/src/test/ui/span/E0204.stderr index 88eb36c1e4c..aa21c6762e7 100644 --- a/src/test/ui/span/E0204.stderr +++ b/src/test/ui/span/E0204.stderr @@ -12,7 +12,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type | LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ -18 | struct Foo2<'a> { +LL | struct Foo2<'a> { LL | ty: &'a mut bool, | ---------------- this field does not implement `Copy` @@ -30,7 +30,7 @@ error[E0204]: the trait `Copy` may not be implemented for this type | LL | #[derive(Copy)] //~ ERROR may not be implemented for this type | ^^^^ -30 | enum EFoo2<'a> { +LL | enum EFoo2<'a> { LL | Bar(&'a mut bool), | ------------- this field does not implement `Copy` 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 5eb00f24e36..a06b7097ee3 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 @@ -5,7 +5,7 @@ LL | f(Box::new(|| { | - ^^ second mutable borrow occurs here | | | first mutable borrow occurs here -23 | //~^ ERROR: cannot borrow `f` as mutable more than once +LL | //~^ ERROR: cannot borrow `f` as mutable more than once LL | f((Box::new(|| {}))) | - borrow occurs due to use of `f` in closure LL | })); @@ -40,7 +40,7 @@ error[E0507]: cannot move out of captured outer variable in an `FnMut` closure | LL | let mut f = |g: Box<FnMut(isize)>, b: isize| {}; | ----- captured outer variable -62 | f(Box::new(|a| { +LL | f(Box::new(|a| { LL | foo(f); | ^ cannot move out of captured outer variable in an `FnMut` closure 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 fb2427b687f..8111f80690a 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 @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn b(x: &Foo) { | ---- use `&mut Foo` here to make mutable -26 | x.f(); +LL | x.f(); LL | x.h(); //~ ERROR cannot borrow | ^ cannot borrow as mutable diff --git a/src/test/ui/span/borrowck-object-mutability.stderr b/src/test/ui/span/borrowck-object-mutability.stderr index 039184e05de..2f1a6c63141 100644 --- a/src/test/ui/span/borrowck-object-mutability.stderr +++ b/src/test/ui/span/borrowck-object-mutability.stderr @@ -3,7 +3,7 @@ error[E0596]: cannot borrow immutable borrowed content `*x` as mutable | LL | fn borrowed_receiver(x: &Foo) { | ---- use `&mut Foo` here to make mutable -18 | x.borrowed(); +LL | x.borrowed(); LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable @@ -12,7 +12,7 @@ error[E0596]: cannot borrow immutable `Box` content `*x` as mutable | LL | fn owned_receiver(x: Box<Foo>) { | - consider changing this to `mut x` -28 | x.borrowed(); +LL | x.borrowed(); LL | x.borrowed_mut(); //~ ERROR cannot borrow | ^ cannot borrow as mutable diff --git a/src/test/ui/span/borrowck-ref-into-rvalue.stderr b/src/test/ui/span/borrowck-ref-into-rvalue.stderr index a5af38f40fd..cf423c278e1 100644 --- a/src/test/ui/span/borrowck-ref-into-rvalue.stderr +++ b/src/test/ui/span/borrowck-ref-into-rvalue.stderr @@ -6,7 +6,7 @@ LL | Some(ref m) => { ... LL | } | - borrowed value dropped here while still borrowed -20 | println!("{}", *msg); +LL | println!("{}", *msg); LL | } | - borrowed value needs to live until here | diff --git a/src/test/ui/span/dropck_arr_cycle_checked.stderr b/src/test/ui/span/dropck_arr_cycle_checked.stderr index 01250a0a701..5e6512c06bf 100644 --- a/src/test/ui/span/dropck_arr_cycle_checked.stderr +++ b/src/test/ui/span/dropck_arr_cycle_checked.stderr @@ -58,7 +58,7 @@ error[E0597]: `b2` does not live long enough | LL | b3.a[1].v.set(Some(&b2)); | ^^ borrowed value does not live long enough -114| //~^ ERROR `b2` does not live long enough +LL | //~^ ERROR `b2` does not live long enough LL | } | - `b2` dropped here while still borrowed | 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 872c75374f8..cf507df4e81 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.stderr @@ -14,7 +14,7 @@ error[E0597]: `d1` does not live long enough | LL | d2.p.set(Some(&d1)); | ^^ borrowed value does not live long enough -49 | //~^ ERROR `d1` does not live long enough +LL | //~^ ERROR `d1` does not live long enough LL | } | - `d1` dropped here while still borrowed | diff --git a/src/test/ui/span/dropck_vec_cycle_checked.stderr b/src/test/ui/span/dropck_vec_cycle_checked.stderr index 34c7e89333a..f4ab3293543 100644 --- a/src/test/ui/span/dropck_vec_cycle_checked.stderr +++ b/src/test/ui/span/dropck_vec_cycle_checked.stderr @@ -58,7 +58,7 @@ error[E0597]: `c2` does not live long enough | LL | c3.v[1].v.set(Some(&c2)); | ^^ borrowed value does not live long enough -121| //~^ ERROR `c2` does not live long enough +LL | //~^ ERROR `c2` does not live long enough LL | } | - `c2` dropped here while still borrowed | diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index 92b6ee4b9c8..6a4ec73b27a 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -32,7 +32,7 @@ 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); +LL | | println!("{}", theTwo); LL | | } | |_^ diff --git a/src/test/ui/span/issue-25199.stderr b/src/test/ui/span/issue-25199.stderr index f8f36b721cb..fe2df9ce711 100644 --- a/src/test/ui/span/issue-25199.stderr +++ b/src/test/ui/span/issue-25199.stderr @@ -14,7 +14,7 @@ error[E0597]: `container` does not live long enough | LL | container.store(test); | ^^^^^^^^^ borrowed value does not live long enough -84 | //~^ ERROR `container` does not live long enough +LL | //~^ ERROR `container` does not live long enough LL | } | - `container` dropped here while still borrowed | diff --git a/src/test/ui/span/issue-35987.stderr b/src/test/ui/span/issue-35987.stderr index ccbff4fe485..596f2d76da6 100644 --- a/src/test/ui/span/issue-35987.stderr +++ b/src/test/ui/span/issue-35987.stderr @@ -5,7 +5,7 @@ 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 | -13 | use std::ops::Add; +LL | use std::ops::Add; | error[E0601]: main function not found diff --git a/src/test/ui/span/issue-36537.stderr b/src/test/ui/span/issue-36537.stderr index 28c89096775..058e83ba4fd 100644 --- a/src/test/ui/span/issue-36537.stderr +++ b/src/test/ui/span/issue-36537.stderr @@ -3,7 +3,7 @@ error[E0597]: `a` does not live long enough | LL | p = &a; | ^ borrowed value does not live long enough -15 | //~^ ERROR `a` does not live long enough +LL | //~^ ERROR `a` does not live long enough LL | } | - `a` dropped here while still borrowed | diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index eda10bda886..9811d115c80 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -5,7 +5,7 @@ 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 | -12 | let x = "Hello ".to_owned() + "World!"; +LL | let x = "Hello ".to_owned() + "World!"; | ^^^^^^^^^^^^^^^^^^^ error[E0369]: binary operation `+` cannot be applied to type `World` diff --git a/src/test/ui/span/issue28498-reject-ex1.stderr b/src/test/ui/span/issue28498-reject-ex1.stderr index 24aec450700..adbbd676615 100644 --- a/src/test/ui/span/issue28498-reject-ex1.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.stderr @@ -14,7 +14,7 @@ error[E0597]: `foo.data` does not live long enough | 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 +LL | //~^ ERROR `foo.data` does not live long enough LL | } | - `foo.data` dropped here while still borrowed | diff --git a/src/test/ui/span/lint-unused-unsafe.stderr b/src/test/ui/span/lint-unused-unsafe.stderr index 2554dec59cf..f85ca4ef00f 100644 --- a/src/test/ui/span/lint-unused-unsafe.stderr +++ b/src/test/ui/span/lint-unused-unsafe.stderr @@ -59,7 +59,7 @@ error: unnecessary `unsafe` block | LL | unsafe fn bad7() { | ---------------- because it's nested under this `unsafe` fn -39 | unsafe { //~ ERROR: unnecessary `unsafe` block +LL | unsafe { //~ ERROR: unnecessary `unsafe` block LL | unsafe { //~ ERROR: unnecessary `unsafe` block | ^^^^^^ unnecessary `unsafe` block diff --git a/src/test/ui/span/missing-unit-argument.stderr b/src/test/ui/span/missing-unit-argument.stderr index 87f5aa514ce..a7417b006ad 100644 --- a/src/test/ui/span/missing-unit-argument.stderr +++ b/src/test/ui/span/missing-unit-argument.stderr @@ -5,7 +5,7 @@ LL | let _: Result<(), String> = Ok(); //~ ERROR this function takes | ^^^^ help: expected the unit value `()`; create it with empty parentheses | -21 | let _: Result<(), String> = Ok(()); //~ ERROR this function takes +LL | let _: Result<(), String> = Ok(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 2 parameters but 0 parameters were supplied @@ -36,7 +36,7 @@ LL | bar(); //~ ERROR this function takes | ^^^^^ help: expected the unit value `()`; create it with empty parentheses | -24 | bar(()); //~ ERROR this function takes +LL | bar(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied @@ -49,7 +49,7 @@ LL | S.baz(); //~ ERROR this function takes | ^^^ help: expected the unit value `()`; create it with empty parentheses | -25 | S.baz(()); //~ ERROR this function takes +LL | S.baz(()); //~ ERROR this function takes | ^^ error[E0061]: this function takes 1 parameter but 0 parameters were supplied @@ -62,7 +62,7 @@ LL | S.generic::<()>(); //~ ERROR this function takes | ^^^^^^^ help: expected the unit value `()`; create it with empty parentheses | -26 | S.generic::<()>(()); //~ ERROR this function takes +LL | S.generic::<()>(()); //~ ERROR this function takes | ^^ error: aborting due to 6 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 8066ef501d2..15694106fe8 100644 --- a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr +++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr @@ -5,7 +5,7 @@ LL | p = &*b; | ^ borrowed value does not live long enough LL | } | - `b` dropped here while still borrowed -20 | //~^^ ERROR `b` does not live long enough +LL | //~^^ ERROR `b` does not live long enough LL | } | - borrowed value needs to live until here diff --git a/src/test/ui/span/pub-struct-field.stderr b/src/test/ui/span/pub-struct-field.stderr index 5fb1c4cf41c..40819e2e8ba 100644 --- a/src/test/ui/span/pub-struct-field.stderr +++ b/src/test/ui/span/pub-struct-field.stderr @@ -11,7 +11,7 @@ error[E0124]: field `bar` is already declared | LL | bar: u8, | ------- `bar` first declared here -16 | pub bar: u8, //~ ERROR is already declared +LL | pub bar: u8, //~ ERROR is already declared LL | pub(crate) bar: u8, //~ ERROR is already declared | ^^^^^^^^^^^^^^^^^^ field already declared 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 1ba31a7e9d7..9e8c4000d06 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 @@ -3,7 +3,7 @@ error[E0597]: `tmp0` does not live long enough | LL | let tmp1 = &tmp0; | ^^^^ borrowed value does not live long enough -34 | repeater3(tmp1) +LL | repeater3(tmp1) LL | }; | -- borrowed value needs to live until here | | 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 778b4c9f4c7..1bc8e996d01 100644 --- a/src/test/ui/span/regions-escape-loop-via-variable.stderr +++ b/src/test/ui/span/regions-escape-loop-via-variable.stderr @@ -5,7 +5,7 @@ LL | p = &x; | ^ borrowed value does not live long enough LL | } | - `x` dropped here while still borrowed -23 | //~^^ ERROR `x` does not live long enough +LL | //~^^ ERROR `x` does not live long enough LL | } | - borrowed value needs to live until here 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 34db3095d72..2cb8df235b4 100644 --- a/src/test/ui/span/regions-escape-loop-via-vec.stderr +++ b/src/test/ui/span/regions-escape-loop-via-vec.stderr @@ -22,7 +22,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed | 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 LL | let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed | ^^^^^ use of borrowed `x` 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 749ccf65783..42240509a9e 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 @@ -6,7 +6,7 @@ LL | y = borrow(&*x); ... LL | } | - `*x` dropped here while still borrowed -30 | assert!(*y != 0); +LL | assert!(*y != 0); LL | } | - borrowed value needs to live until here 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 5c3e38db2a3..ed6363a2e33 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 @@ -25,7 +25,7 @@ error[E0597]: `x` does not live long enough | LL | let _ = tx.send(&x); | ^ borrowed value does not live long enough -42 | (tx, rx) +LL | (tx, rx) LL | }; | - `x` dropped here while still borrowed ... 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 3fcb145579d..ffaccf010a9 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 @@ -5,7 +5,7 @@ LL | *lock.lock().unwrap() = &z; | ^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -28 | //~^^ ERROR `z` does not live long enough +LL | //~^^ ERROR `z` does not live long enough LL | } | - borrowed value needs to live until here @@ -24,7 +24,7 @@ LL | *lock.write().unwrap() = &z; | ^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -41 | //~^^ ERROR `z` does not live long enough +LL | //~^^ ERROR `z` does not live long enough LL | } | - borrowed value needs to live until here @@ -43,7 +43,7 @@ LL | tx.send(&z).unwrap(); | ^ borrowed value does not live long enough LL | } | - `z` dropped here while still borrowed -56 | //~^^ ERROR `z` does not live long enough +LL | //~^^ ERROR `z` does not live long enough LL | } | - borrowed value needs to live until here diff --git a/src/test/ui/span/slice-borrow.stderr b/src/test/ui/span/slice-borrow.stderr index 67c432a823a..3cc791a0580 100644 --- a/src/test/ui/span/slice-borrow.stderr +++ b/src/test/ui/span/slice-borrow.stderr @@ -3,7 +3,7 @@ error[E0597]: borrowed value does not live long enough | LL | let x: &[isize] = &vec![1, 2, 3, 4, 5]; | ^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough -17 | y = &x[1..]; +LL | y = &x[1..]; LL | } | - temporary value dropped here while still borrowed LL | } 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 1c5ff7c8bc3..de234344d84 100644 --- a/src/test/ui/span/unused-warning-point-at-signature.stderr +++ b/src/test/ui/span/unused-warning-point-at-signature.stderr @@ -30,7 +30,7 @@ LL | / fn //~ WARN function is never used LL | | func_complete_span() LL | | -> usize LL | | { -37 | | 3 +LL | | 3 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 5a8751b4626..f9a94290603 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 @@ -14,7 +14,7 @@ error[E0597]: `c1` does not live long enough | LL | c2.v[0].v.set(Some(&c1)); | ^^ borrowed value does not live long enough -130| //~^ ERROR `c1` does not live long enough +LL | //~^ ERROR `c1` does not live long enough LL | } | - `c1` dropped here while still borrowed | |
