Skip to content

Commit

Permalink
add ~ERROR annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Oct 16, 2018
1 parent 1008539 commit b70b4a6
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/ui/nll/user-annotations/method-ufcs-inherent-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ impl<'a> A<'a> {
fn foo<'a>() {
let v = 22;
let x = A::<'a>::new(&v, 22);
//~^ ERROR
}

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
|
LL | let x = A::<'a>::new(&v, 22);
| ^^ borrowed value does not live long enough
LL | //~^ ERROR
LL | }
| - `v` dropped here while still borrowed
|
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ impl<'a> A<'a> {
fn foo<'a>() {
let v = 22;
let x = A::<'a>::new::<&'a u32>(&v, &v);
//~^ ERROR
//~| ERROR
}

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
|
LL | let x = A::<'a>::new::<&'a u32>(&v, &v);
| ^^ borrowed value does not live long enough
...
LL | }
| - `v` dropped here while still borrowed
|
Expand All @@ -17,6 +18,7 @@ error[E0597]: `v` does not live long enough
|
LL | let x = A::<'a>::new::<&'a u32>(&v, &v);
| ^^ borrowed value does not live long enough
...
LL | }
| - `v` dropped here while still borrowed
|
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/nll/user-annotations/method-ufcs-inherent-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ impl<'a> A<'a> {
fn foo<'a>() {
let v = 22;
let x = <A<'a>>::new(&v, 22);
//~^ ERROR
}

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
|
LL | let x = <A<'a>>::new(&v, 22);
| ^^ borrowed value does not live long enough
LL | //~^ ERROR
LL | }
| - `v` dropped here while still borrowed
|
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ impl<'a> A<'a> {
fn foo<'a>() {
let v = 22;
let x = <A<'a>>::new::<&'a u32>(&v, &v);
//~^ ERROR
//~| ERROR
}

fn main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
|
LL | let x = <A<'a>>::new::<&'a u32>(&v, &v);
| ^^ borrowed value does not live long enough
...
LL | }
| - `v` dropped here while still borrowed
|
Expand All @@ -17,6 +18,7 @@ error[E0597]: `v` does not live long enough
|
LL | let x = <A<'a>>::new::<&'a u32>(&v, &v);
| ^^ borrowed value does not live long enough
...
LL | }
| - `v` dropped here while still borrowed
|
Expand Down

0 comments on commit b70b4a6

Please sign in to comment.