Skip to content

Commit b70b4a6

Browse files
committed
add ~ERROR annotations
1 parent 1008539 commit b70b4a6

8 files changed

+12
-0
lines changed

src/test/ui/nll/user-annotations/method-ufcs-inherent-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ impl<'a> A<'a> {
1414
fn foo<'a>() {
1515
let v = 22;
1616
let x = A::<'a>::new(&v, 22);
17+
//~^ ERROR
1718
}
1819

1920
fn main() {}

src/test/ui/nll/user-annotations/method-ufcs-inherent-1.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
33
|
44
LL | let x = A::<'a>::new(&v, 22);
55
| ^^ borrowed value does not live long enough
6+
LL | //~^ ERROR
67
LL | }
78
| - `v` dropped here while still borrowed
89
|

src/test/ui/nll/user-annotations/method-ufcs-inherent-2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ impl<'a> A<'a> {
1414
fn foo<'a>() {
1515
let v = 22;
1616
let x = A::<'a>::new::<&'a u32>(&v, &v);
17+
//~^ ERROR
18+
//~| ERROR
1719
}
1820

1921
fn main() {}

src/test/ui/nll/user-annotations/method-ufcs-inherent-2.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
33
|
44
LL | let x = A::<'a>::new::<&'a u32>(&v, &v);
55
| ^^ borrowed value does not live long enough
6+
...
67
LL | }
78
| - `v` dropped here while still borrowed
89
|
@@ -17,6 +18,7 @@ error[E0597]: `v` does not live long enough
1718
|
1819
LL | let x = A::<'a>::new::<&'a u32>(&v, &v);
1920
| ^^ borrowed value does not live long enough
21+
...
2022
LL | }
2123
| - `v` dropped here while still borrowed
2224
|

src/test/ui/nll/user-annotations/method-ufcs-inherent-3.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ impl<'a> A<'a> {
1414
fn foo<'a>() {
1515
let v = 22;
1616
let x = <A<'a>>::new(&v, 22);
17+
//~^ ERROR
1718
}
1819

1920
fn main() {}

src/test/ui/nll/user-annotations/method-ufcs-inherent-3.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
33
|
44
LL | let x = <A<'a>>::new(&v, 22);
55
| ^^ borrowed value does not live long enough
6+
LL | //~^ ERROR
67
LL | }
78
| - `v` dropped here while still borrowed
89
|

src/test/ui/nll/user-annotations/method-ufcs-inherent-4.rs

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ impl<'a> A<'a> {
1515
fn foo<'a>() {
1616
let v = 22;
1717
let x = <A<'a>>::new::<&'a u32>(&v, &v);
18+
//~^ ERROR
19+
//~| ERROR
1820
}
1921

2022
fn main() {}

src/test/ui/nll/user-annotations/method-ufcs-inherent-4.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ error[E0597]: `v` does not live long enough
33
|
44
LL | let x = <A<'a>>::new::<&'a u32>(&v, &v);
55
| ^^ borrowed value does not live long enough
6+
...
67
LL | }
78
| - `v` dropped here while still borrowed
89
|
@@ -17,6 +18,7 @@ error[E0597]: `v` does not live long enough
1718
|
1819
LL | let x = <A<'a>>::new::<&'a u32>(&v, &v);
1920
| ^^ borrowed value does not live long enough
21+
...
2022
LL | }
2123
| - `v` dropped here while still borrowed
2224
|

0 commit comments

Comments
 (0)