about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr7
-rw-r--r--src/test/ui/generator/generator-region-requirements.stderr2
-rw-r--r--src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr12
-rw-r--r--src/test/ui/issues/issue-46983.stderr2
-rw-r--r--src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr2
-rw-r--r--src/test/ui/regions/regions-static-bound.stderr4
6 files changed, 20 insertions, 9 deletions
diff --git a/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr
index d761abdfc6a..af1f908a808 100644
--- a/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr
+++ b/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr
@@ -8,13 +8,18 @@ LL |       bar(|| {
 LL | |
 LL | |         let _ = x;
 LL | |     })
-   | |_____^ ...is captured here...
+   | |_____^ ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
    |
 LL |     bar(|| {
    |     ^^^
+note: `'static` lifetime requirement introduced by this bound
+  --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:1:39
+   |
+LL | fn bar<F>(blk: F) where F: FnOnce() + 'static {
+   |                                       ^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/generator/generator-region-requirements.stderr b/src/test/ui/generator/generator-region-requirements.stderr
index b6b9db22426..30d67050b90 100644
--- a/src/test/ui/generator/generator-region-requirements.stderr
+++ b/src/test/ui/generator/generator-region-requirements.stderr
@@ -5,7 +5,7 @@ LL | fn dangle(x: &mut i32) -> &'static mut i32 {
    |              -------- this data with an anonymous lifetime `'_`...
 ...
 LL |         x
-   |         ^ ...is captured here...
+   |         ^ ...is used here...
 ...
 LL |             GeneratorState::Complete(c) => return c,
    |                                                   - ...and is required to live as long as `'static` here
diff --git a/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr b/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr
index 1ffd205652f..32c5ccf1648 100644
--- a/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr
+++ b/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr
@@ -4,7 +4,9 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
 LL | fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
    |         ------------------------------- this data with an anonymous lifetime `'_`...
 LL |     x.m()
-   |     --^-- ...is captured and required to live as long as `'static` here
+   |     - ^
+   |     |
+   |     ...is used and required to live as long as `'static` here
 
 error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/projection-type-lifetime-mismatch.rs:22:7
@@ -12,7 +14,9 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
 LL | fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
    |                                       -- this data with an anonymous lifetime `'_`...
 LL |     x.m()
-   |     --^-- ...is captured and required to live as long as `'static` here
+   |     - ^
+   |     |
+   |     ...is used and required to live as long as `'static` here
 
 error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/projection-type-lifetime-mismatch.rs:27:7
@@ -20,7 +24,9 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
 LL | fn h(x: &()) -> &'static () {
    |         --- this data with an anonymous lifetime `'_`...
 LL |     x.m()
-   |     --^-- ...is captured and required to live as long as `'static` here
+   |     - ^
+   |     |
+   |     ...is used and required to live as long as `'static` here
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-46983.stderr b/src/test/ui/issues/issue-46983.stderr
index 77fb130f519..ed9f1884c42 100644
--- a/src/test/ui/issues/issue-46983.stderr
+++ b/src/test/ui/issues/issue-46983.stderr
@@ -4,7 +4,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
 LL | fn foo(x: &u32) -> &'static u32 {
    |           ---- this data with an anonymous lifetime `'_`...
 LL |     &*x
-   |     ^^^ ...is captured and required to live as long as `'static` here
+   |     ^^^ ...is used and required to live as long as `'static` here
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr b/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr
index 3f65d3af725..e06255e4ea3 100644
--- a/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr
+++ b/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr
@@ -4,7 +4,7 @@ error[E0759]: `foo` has an anonymous lifetime `'_` but it needs to satisfy a `'s
 LL | fn inner(mut foo: &[u8]) {
    |                   ----- this data with an anonymous lifetime `'_`...
 LL |     let refcell = RefCell::new(&mut foo);
-   |                                ^^^^^^^^ ...is captured here...
+   |                                ^^^^^^^^ ...is used here...
 ...
 LL |     read_thing(read);
    |                ---- ...and is required to live as long as `'static` here
diff --git a/src/test/ui/regions/regions-static-bound.stderr b/src/test/ui/regions/regions-static-bound.stderr
index 51fe16ca9da..b8e69e02609 100644
--- a/src/test/ui/regions/regions-static-bound.stderr
+++ b/src/test/ui/regions/regions-static-bound.stderr
@@ -17,7 +17,7 @@ error[E0759]: `u` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
 LL | fn error(u: &(), v: &()) {
    |             --- this data with an anonymous lifetime `'_`...
 LL |     static_id(&u);
-   |     ^^^^^^^^^ -- ...is captured here...
+   |     ^^^^^^^^^ -- ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/regions-static-bound.rs:10:5
@@ -32,7 +32,7 @@ LL | fn error(u: &(), v: &()) {
    |                     --- this data with an anonymous lifetime `'_`...
 LL |     static_id(&u);
 LL |     static_id_indirect(&v);
-   |     ^^^^^^^^^^^^^^^^^^ -- ...is captured here...
+   |     ^^^^^^^^^^^^^^^^^^ -- ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/regions-static-bound.rs:11:5