Skip to content

Commit 40f161a

Browse files
committed
fix tests after rebase
1 parent da5b0cc commit 40f161a

6 files changed

+20
-9
lines changed

src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ LL | bar(|| {
88
LL | |
99
LL | | let _ = x;
1010
LL | | })
11-
| |_____^ ...is captured here...
11+
| |_____^ ...is used here...
1212
|
1313
note: ...and is required to live as long as `'static` here
1414
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
1515
|
1616
LL | bar(|| {
1717
| ^^^
18+
note: `'static` lifetime requirement introduced by this bound
19+
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:1:39
20+
|
21+
LL | fn bar<F>(blk: F) where F: FnOnce() + 'static {
22+
| ^^^^^^^
1823

1924
error: aborting due to previous error
2025

src/test/ui/generator/generator-region-requirements.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn dangle(x: &mut i32) -> &'static mut i32 {
55
| -------- this data with an anonymous lifetime `'_`...
66
...
77
LL | x
8-
| ^ ...is captured here...
8+
| ^ ...is used here...
99
...
1010
LL | GeneratorState::Complete(c) => return c,
1111
| - ...and is required to live as long as `'static` here

src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,29 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
44
LL | fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
55
| ------------------------------- this data with an anonymous lifetime `'_`...
66
LL | x.m()
7-
| --^-- ...is captured and required to live as long as `'static` here
7+
| - ^
8+
| |
9+
| ...is used and required to live as long as `'static` here
810

911
error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
1012
--> $DIR/projection-type-lifetime-mismatch.rs:22:7
1113
|
1214
LL | fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
1315
| -- this data with an anonymous lifetime `'_`...
1416
LL | x.m()
15-
| --^-- ...is captured and required to live as long as `'static` here
17+
| - ^
18+
| |
19+
| ...is used and required to live as long as `'static` here
1620

1721
error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
1822
--> $DIR/projection-type-lifetime-mismatch.rs:27:7
1923
|
2024
LL | fn h(x: &()) -> &'static () {
2125
| --- this data with an anonymous lifetime `'_`...
2226
LL | x.m()
23-
| --^-- ...is captured and required to live as long as `'static` here
27+
| - ^
28+
| |
29+
| ...is used and required to live as long as `'static` here
2430

2531
error: aborting due to 3 previous errors
2632

src/test/ui/issues/issue-46983.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
44
LL | fn foo(x: &u32) -> &'static u32 {
55
| ---- this data with an anonymous lifetime `'_`...
66
LL | &*x
7-
| ^^^ ...is captured and required to live as long as `'static` here
7+
| ^^^ ...is used and required to live as long as `'static` here
88

99
error: aborting due to previous error
1010

src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0759]: `foo` has an anonymous lifetime `'_` but it needs to satisfy a `'s
44
LL | fn inner(mut foo: &[u8]) {
55
| ----- this data with an anonymous lifetime `'_`...
66
LL | let refcell = RefCell::new(&mut foo);
7-
| ^^^^^^^^ ...is captured here...
7+
| ^^^^^^^^ ...is used here...
88
...
99
LL | read_thing(read);
1010
| ---- ...and is required to live as long as `'static` here

src/test/ui/regions/regions-static-bound.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ error[E0759]: `u` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
1717
LL | fn error(u: &(), v: &()) {
1818
| --- this data with an anonymous lifetime `'_`...
1919
LL | static_id(&u);
20-
| ^^^^^^^^^ -- ...is captured here...
20+
| ^^^^^^^^^ -- ...is used here...
2121
|
2222
note: ...and is required to live as long as `'static` here
2323
--> $DIR/regions-static-bound.rs:10:5
@@ -32,7 +32,7 @@ LL | fn error(u: &(), v: &()) {
3232
| --- this data with an anonymous lifetime `'_`...
3333
LL | static_id(&u);
3434
LL | static_id_indirect(&v);
35-
| ^^^^^^^^^^^^^^^^^^ -- ...is captured here...
35+
| ^^^^^^^^^^^^^^^^^^ -- ...is used here...
3636
|
3737
note: ...and is required to live as long as `'static` here
3838
--> $DIR/regions-static-bound.rs:11:5

0 commit comments

Comments
 (0)