about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2021-10-15 15:13:21 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2021-12-10 03:08:25 +0000
commit83ce1aad428d79ac455fa43b40e0e01b07fcf7cf (patch)
treee6eecfd26be39db8d1c57468d5c1103ceedfb8ba
parentff13ad710f7332079d4ea494f5b0bced68d41429 (diff)
downloadrust-83ce1aad428d79ac455fa43b40e0e01b07fcf7cf.tar.gz
rust-83ce1aad428d79ac455fa43b40e0e01b07fcf7cf.zip
Tweak wording
-rw-r--r--compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs6
-rw-r--r--src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr2
-rw-r--r--src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr2
-rw-r--r--src/test/ui/async-await/issues/issue-62097.stderr2
-rw-r--r--src/test/ui/async-await/issues/issue-72312.rs2
-rw-r--r--src/test/ui/async-await/issues/issue-72312.stderr2
-rw-r--r--src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr2
-rw-r--r--src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr24
-rw-r--r--src/test/ui/issues/issue-16922.stderr2
-rw-r--r--src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr2
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr2
-rw-r--r--src/test/ui/regions/region-object-lifetime-in-coercion.stderr6
-rw-r--r--src/test/ui/regions/regions-addr-of-self.stderr2
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-2.stderr2
-rw-r--r--src/test/ui/regions/regions-close-object-into-object-4.stderr2
-rw-r--r--src/test/ui/regions/regions-proc-bound-capture.stderr2
-rw-r--r--src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr2
-rw-r--r--src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr12
-rw-r--r--src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr8
-rw-r--r--src/test/ui/traits/trait-upcasting/type-checking-test-4.stderr14
-rw-r--r--src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr2
21 files changed, 50 insertions, 50 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs
index 80bdccd4f2c..1176f131107 100644
--- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs
+++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs
@@ -76,7 +76,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
                     err.span_label(
                         cause.span,
                         &format!(
-                            "...is captured and required to live as long as `'static` here \
+                            "...is used and required to live as long as `'static` here \
                              because of an implicit lifetime bound on the {}",
                             match ctxt.assoc_item.container {
                                 AssocItemContainer::TraitContainer(id) =>
@@ -158,7 +158,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
 
         // We try to make the output have fewer overlapping spans if possible.
         let require_msg = if spans.is_empty() {
-            "...is captured and required to live as long as `'static` here"
+            "...is used and required to live as long as `'static` here"
         } else {
             "...and is required to live as long as `'static` here"
         };
@@ -166,7 +166,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
             if sup_origin.span().overlaps(return_sp) { sup_origin.span() } else { return_sp };
 
         for span in &spans {
-            err.span_label(*span, "...is captured here...");
+            err.span_label(*span, "...is used here...");
         }
 
         if spans.iter().any(|sp| sp.overlaps(return_sp) || *sp > return_sp) {
diff --git a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr
index 6f63a2c5fc3..33f1e0f05b2 100644
--- a/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr
+++ b/src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.stderr
@@ -4,7 +4,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
 LL | fn baz<'a,'b>(x: &'a u32) -> &'static u32 {
    |                  ------- this data with lifetime `'a`...
 LL |    bar(foo, 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/associated-types/cache/project-fn-ret-invariant.transmute.stderr b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
index 628023ad471..609627aaa9e 100644
--- a/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
+++ b/src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.stderr
@@ -5,7 +5,7 @@ LL | fn baz<'a, 'b>(x: Type<'a>) -> Type<'static> {
    |                   -------- this data with lifetime `'a`...
 ...
 LL |     bar(foo, x)
-   |         ^^^  - ...is captured and required to live as long as `'static` here
+   |         ^^^  - ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/project-fn-ret-invariant.rs:45:37
diff --git a/src/test/ui/async-await/issues/issue-62097.stderr b/src/test/ui/async-await/issues/issue-62097.stderr
index 11fb7c86c3b..e23277543c6 100644
--- a/src/test/ui/async-await/issues/issue-62097.stderr
+++ b/src/test/ui/async-await/issues/issue-62097.stderr
@@ -4,7 +4,7 @@ error[E0759]: `self` has an anonymous lifetime `'_` but it needs to satisfy a `'
 LL |     pub async fn run_dummy_fn(&self) {
    |                               ^^^^^ this data with an anonymous lifetime `'_`...
 LL |         foo(|| self.bar()).await;
-   |         --- ...is captured and required to live as long as `'static` here
+   |         --- ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by this bound
   --> $DIR/issue-62097.rs:4:19
diff --git a/src/test/ui/async-await/issues/issue-72312.rs b/src/test/ui/async-await/issues/issue-72312.rs
index eb0cc7e6aec..eb7d12e290c 100644
--- a/src/test/ui/async-await/issues/issue-72312.rs
+++ b/src/test/ui/async-await/issues/issue-72312.rs
@@ -11,7 +11,7 @@ impl Problem {
         //~^ NOTE this data with an anonymous lifetime `'_`
         //~| NOTE in this expansion of desugaring of `async` block or function
         require_static(async move { //~ NOTE ...and is required to live as long as `'static` here
-            &self; //~ NOTE ...is captured here...
+            &self; //~ NOTE ...is used here...
         });
     }
 }
diff --git a/src/test/ui/async-await/issues/issue-72312.stderr b/src/test/ui/async-await/issues/issue-72312.stderr
index 7a72edd4e53..798f755765c 100644
--- a/src/test/ui/async-await/issues/issue-72312.stderr
+++ b/src/test/ui/async-await/issues/issue-72312.stderr
@@ -5,7 +5,7 @@ LL |     pub async fn start(&self) {
    |                        ^^^^^ this data with an anonymous lifetime `'_`...
 ...
 LL |             &self;
-   |             ----- ...is captured here...
+   |             ----- ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/issue-72312.rs:13:9
diff --git a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr
index b3bef677d19..2307572cc3f 100644
--- a/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr
+++ b/src/test/ui/impl-header-lifetime-elision/dyn-trait.stderr
@@ -4,7 +4,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
 LL | fn with_dyn_debug_static<'a>(x: Box<dyn Debug + 'a>) {
    |                                 ------------------- this data with lifetime `'a`...
 LL |     static_val(x);
-   |                ^ ...is captured here...
+   |                ^ ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/dyn-trait.rs:20:5
diff --git a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr
index bf1f93aebd5..de5d3b612c9 100644
--- a/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr
+++ b/src/test/ui/impl-trait/must_outlive_least_region_or_bound.stderr
@@ -28,7 +28,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
   --> $DIR/must_outlive_least_region_or_bound.rs:9:46
    |
 LL | fn elided2(x: &i32) -> impl Copy + 'static { x }
-   |               ----                           ^ ...is captured here...
+   |               ----                           ^ ...is used here...
    |               |
    |               this data with an anonymous lifetime `'_`...
    |
@@ -50,7 +50,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
   --> $DIR/must_outlive_least_region_or_bound.rs:11:55
    |
 LL | fn explicit2<'a>(x: &'a i32) -> impl Copy + 'static { x }
-   |                     -------                           ^ ...is captured here...
+   |                     -------                           ^ ...is used here...
    |                     |
    |                     this data with lifetime `'a`...
    |
@@ -80,7 +80,7 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
   --> $DIR/must_outlive_least_region_or_bound.rs:24:65
    |
 LL | fn elided5(x: &i32) -> (Box<dyn Debug>, impl Debug) { (Box::new(x), x) }
-   |               ---- this data with an anonymous lifetime `'_`... ^ ...is captured and required to live as long as `'static` here
+   |               ---- this data with an anonymous lifetime `'_`... ^ ...is used and required to live as long as `'static` here
    |
 help: to declare that the trait object captures data from argument `x`, you can add an explicit `'_` lifetime bound
    |
@@ -95,7 +95,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
   --> $DIR/must_outlive_least_region_or_bound.rs:29:69
    |
 LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x }
-   |                      ------- this data with lifetime `'a`...        ^ ...is captured here...
+   |                      ------- this data with lifetime `'a`...        ^ ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/must_outlive_least_region_or_bound.rs:29:34
@@ -136,12 +136,12 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
   --> $DIR/must_outlive_least_region_or_bound.rs:16:50
    |
 LL | fn elided3(x: &i32) -> Box<dyn Debug> { Box::new(x) }
-   |               ----                               ^ ...is captured and required to live as long as `'static` here
+   |               ----                               ^ ...is used and required to live as long as `'static` here
    |               |
    |               this data with an anonymous lifetime `'_`...
    |
 note: `'static` lifetime requirement introduced by the return type
-  --> $DIR/must_outlive_least_region_or_bound.rs:14:28
+  --> $DIR/must_outlive_least_region_or_bound.rs:16:28
    |
 LL | fn elided3(x: &i32) -> Box<dyn Debug> { Box::new(x) }
    |                            ^^^^^^^^^    ----------- because of this returned expression
@@ -156,12 +156,12 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
   --> $DIR/must_outlive_least_region_or_bound.rs:18:59
    |
 LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug> { Box::new(x) }
-   |                     -------                               ^ ...is captured and required to live as long as `'static` here
+   |                     -------                               ^ ...is used and required to live as long as `'static` here
    |                     |
    |                     this data with lifetime `'a`...
    |
 note: `'static` lifetime requirement introduced by the return type
-  --> $DIR/must_outlive_least_region_or_bound.rs:16:37
+  --> $DIR/must_outlive_least_region_or_bound.rs:18:37
    |
 LL | fn explicit3<'a>(x: &'a i32) -> Box<dyn Debug> { Box::new(x) }
    |                                     ^^^^^^^^^    ----------- because of this returned expression
@@ -176,12 +176,12 @@ error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
   --> $DIR/must_outlive_least_region_or_bound.rs:20:60
    |
 LL | fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
-   |               ----                                         ^ ...is captured and required to live as long as `'static` here
+   |               ----                                         ^ ...is used and required to live as long as `'static` here
    |               |
    |               this data with an anonymous lifetime `'_`...
    |
 note: `'static` lifetime requirement introduced by the return type
-  --> $DIR/must_outlive_least_region_or_bound.rs:18:40
+  --> $DIR/must_outlive_least_region_or_bound.rs:20:40
    |
 LL | fn elided4(x: &i32) -> Box<dyn Debug + 'static> { Box::new(x) }
    |                                        ^^^^^^^    ----------- because of this returned expression
@@ -200,10 +200,10 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
   --> $DIR/must_outlive_least_region_or_bound.rs:22:69
    |
 LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'static> { Box::new(x) }
-   |                     ------- this data with lifetime `'a`...         ^ ...is captured and required to live as long as `'static` here
+   |                     ------- this data with lifetime `'a`...         ^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
-  --> $DIR/must_outlive_least_region_or_bound.rs:20:49
+  --> $DIR/must_outlive_least_region_or_bound.rs:22:49
    |
 LL | fn explicit4<'a>(x: &'a i32) -> Box<dyn Debug + 'static> { Box::new(x) }
    |                                                 ^^^^^^^    ----------- because of this returned expression
diff --git a/src/test/ui/issues/issue-16922.stderr b/src/test/ui/issues/issue-16922.stderr
index ff7b3b67140..53405a660f8 100644
--- a/src/test/ui/issues/issue-16922.stderr
+++ b/src/test/ui/issues/issue-16922.stderr
@@ -4,7 +4,7 @@ error[E0759]: `value` has an anonymous lifetime `'_` but it needs to satisfy a `
 LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> {
    |                       -- this data with an anonymous lifetime `'_`...
 LL |     Box::new(value) as Box<dyn Any>
-   |              ^^^^^ ...is captured and required to live as long as `'static` here
+   |              ^^^^^ ...is used and required to live as long as `'static` here
    |
 help: to declare that the trait object captures data from argument `value`, you can add an explicit `'_` lifetime bound
    |
diff --git a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
index 1931934a211..4a6378b84f1 100644
--- a/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
+++ b/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.stderr
@@ -4,7 +4,7 @@ error[E0759]: `fn` parameter has lifetime `'a` but it needs to satisfy a `'stati
 LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
    |               ------- this data with lifetime `'a`...
 LL |     <Foo<'a>>::C
-   |     ^^^^^^^^^^^^ ...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/object-lifetime/object-lifetime-default-from-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr
index 0308ecf8f64..1708700f77a 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-box-error.stderr
@@ -5,7 +5,7 @@ LL | fn load(ss: &mut SomeStruct) -> Box<dyn SomeTrait> {
    |             --------------- this data with an anonymous lifetime `'_`...
 ...
 LL |     ss.r
-   |     ^^^^ ...is captured and required to live as long as `'static` here
+   |     ^^^^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/object-lifetime-default-from-box-error.rs:14:37
diff --git a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr
index 74683f1439a..d8932c067ac 100644
--- a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr
+++ b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr
@@ -4,7 +4,7 @@ error[E0759]: `v` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
 LL | fn a(v: &[u8]) -> Box<dyn Foo + 'static> {
    |         ----- this data with an anonymous lifetime `'_`...
 LL |     let x: Box<dyn Foo + 'static> = Box::new(v);
-   |                                              ^ ...is captured and required to live as long as `'static` here
+   |                                              ^ ...is used and required to live as long as `'static` here
    |
 help: consider changing the trait object's explicit `'static` bound to the lifetime of argument `v`
    |
@@ -21,7 +21,7 @@ error[E0759]: `v` has an anonymous lifetime `'_` but it needs to satisfy a `'sta
 LL | fn b(v: &[u8]) -> Box<dyn Foo + 'static> {
    |         ----- this data with an anonymous lifetime `'_`...
 LL |     Box::new(v)
-   |              ^ ...is captured and required to live as long as `'static` here
+   |              ^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/region-object-lifetime-in-coercion.rs:12:33
@@ -46,7 +46,7 @@ LL | fn c(v: &[u8]) -> Box<dyn Foo> {
    |         ----- this data with an anonymous lifetime `'_`...
 ...
 LL |     Box::new(v)
-   |              ^ ...is captured and required to live as long as `'static` here
+   |              ^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/region-object-lifetime-in-coercion.rs:16:23
diff --git a/src/test/ui/regions/regions-addr-of-self.stderr b/src/test/ui/regions/regions-addr-of-self.stderr
index 738691fd695..3453c6458f1 100644
--- a/src/test/ui/regions/regions-addr-of-self.stderr
+++ b/src/test/ui/regions/regions-addr-of-self.stderr
@@ -4,7 +4,7 @@ error[E0759]: `self` has an anonymous lifetime `'_` but it needs to satisfy a `'
 LL |     pub fn chase_cat(&mut self) {
    |                      --------- this data with an anonymous lifetime `'_`...
 LL |         let p: &'static mut usize = &mut self.cats_chased;
-   |                                     ^^^^^^^^^^^^^^^^^^^^^ ...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/regions/regions-close-object-into-object-2.stderr b/src/test/ui/regions/regions-close-object-into-object-2.stderr
index c914d91306c..4153f4f29bc 100644
--- a/src/test/ui/regions/regions-close-object-into-object-2.stderr
+++ b/src/test/ui/regions/regions-close-object-into-object-2.stderr
@@ -4,7 +4,7 @@ error[E0759]: `v` has lifetime `'a` but it needs to satisfy a `'static` lifetime
 LL | fn g<'a, T: 'static>(v: Box<dyn A<T> + 'a>) -> Box<dyn X + 'static> {
    |                         ------------------ this data with lifetime `'a`...
 LL |     Box::new(B(&*v)) as Box<dyn X>
-   |                ^^^ ...is captured and required to live as long as `'static` here
+   |                ^^^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/regions-close-object-into-object-2.rs:8:60
diff --git a/src/test/ui/regions/regions-close-object-into-object-4.stderr b/src/test/ui/regions/regions-close-object-into-object-4.stderr
index 1f68db023a9..2ea4b431b38 100644
--- a/src/test/ui/regions/regions-close-object-into-object-4.stderr
+++ b/src/test/ui/regions/regions-close-object-into-object-4.stderr
@@ -4,7 +4,7 @@ error[E0759]: `v` has lifetime `'a` but it needs to satisfy a `'static` lifetime
 LL | fn i<'a, T, U>(v: Box<dyn A<U>+'a>) -> Box<dyn X + 'static> {
    |                   ---------------- this data with lifetime `'a`...
 LL |     Box::new(B(&*v)) as Box<dyn X>
-   |                ^^^ ...is captured and required to live as long as `'static` here
+   |                ^^^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/regions-close-object-into-object-4.rs:8:52
diff --git a/src/test/ui/regions/regions-proc-bound-capture.stderr b/src/test/ui/regions/regions-proc-bound-capture.stderr
index 99657632035..2ebe874da93 100644
--- a/src/test/ui/regions/regions-proc-bound-capture.stderr
+++ b/src/test/ui/regions/regions-proc-bound-capture.stderr
@@ -5,7 +5,7 @@ LL | fn static_proc(x: &isize) -> Box<dyn FnMut() -> (isize) + 'static> {
    |                   ------ this data with an anonymous lifetime `'_`...
 LL |     // This is illegal, because the region bound on `proc` is 'static.
 LL |     Box::new(move || { *x })
-   |              ^^^^^^^^^^^^^^ ...is captured and required to live as long as `'static` here
+   |              ^^^^^^^^^^^^^^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/regions-proc-bound-capture.rs:7:59
diff --git a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr
index 2961d8d7eac..63d291ed7cd 100644
--- a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr
+++ b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.stderr
@@ -22,7 +22,7 @@ error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an impli
 LL |     fn use_it<'a>(val: Box<dyn ObjectTrait<Assoc = i32> + 'a>) -> &'a () {
    |                        -------------------------------------- this data with lifetime `'a`...
 LL |         val.use_self()
-   |             ^^^^^^^^ ...is captured and required to live as long as `'static` here
+   |             ^^^^^^^^ ...is used and required to live as long as `'static` here
    |
 note: the used `impl` has a `'static` requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound-needing-more-suggestions.rs:60:30
diff --git a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr
index 6d9f0811b27..55a1bbf18ab 100644
--- a/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr
+++ b/src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr
@@ -4,7 +4,7 @@ error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifeti
 LL |     fn use_it<'a, T>(val: &'a dyn ObjectTrait<T>) -> impl OtherTrait<'a> + 'a {
    |                           ---------------------- this data with lifetime `'a`...
 LL |         val.use_self::<T>()
-   |             ^^^^^^^^ ...is captured and required to live as long as `'static` here
+   |             ^^^^^^^^ ...is used and required to live as long as `'static` here
    |
 note: the used `impl` has a `'static` requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:14:32
@@ -24,7 +24,7 @@ error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an impli
 LL |     fn use_it<'a>(val: &'a dyn ObjectTrait) -> impl OtherTrait<'a> + 'a {
    |                        ------------------- this data with lifetime `'a`...
 LL |         val.use_self()
-   |             ^^^^^^^^ ...is captured and required to live as long as `'static` here because of an implicit lifetime bound on the inherent `impl`
+   |             ^^^^^^^^ ...is used and required to live as long as `'static` here because of an implicit lifetime bound on the inherent `impl`
    |
 note: the used `impl` has a `'static` requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:64:14
@@ -44,7 +44,7 @@ error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifeti
 LL |     fn use_it<'a>(val: &'a dyn ObjectTrait) -> impl OtherTrait<'a> {
    |                        ------------------- this data with lifetime `'a`...
 LL |         val.use_self()
-   |             ^^^^^^^^ ...is captured and required to live as long as `'static` here
+   |             ^^^^^^^^ ...is used and required to live as long as `'static` here
    |
 note: the used `impl` has a `'static` requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:85:26
@@ -69,7 +69,7 @@ error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifeti
 LL |     fn use_it<'a>(val: &'a dyn ObjectTrait) -> impl OtherTrait<'a> + 'a {
    |                        ------------------- this data with lifetime `'a`...
 LL |         MyTrait::use_self(val)
-   |                           ^^^ ...is captured here...
+   |                           ^^^ ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:108:9
@@ -95,7 +95,7 @@ error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an impli
 LL |     fn use_it<'a>(val: &'a dyn ObjectTrait) -> &'a () {
    |                        ------------------- this data with lifetime `'a`...
 LL |         val.use_self()
-   |             ^^^^^^^^ ...is captured and required to live as long as `'static` here
+   |             ^^^^^^^^ ...is used and required to live as long as `'static` here
    |
 note: the used `impl` has a `'static` requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:31:26
@@ -115,7 +115,7 @@ error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an impli
 LL |     fn use_it<'a>(val: &'a Box<dyn ObjectTrait + 'a>) -> &'a () {
    |                        ----------------------------- this data with lifetime `'a`...
 LL |         val.use_self()
-   |             ^^^^^^^^ ...is captured and required to live as long as `'static` here
+   |             ^^^^^^^^ ...is used and required to live as long as `'static` here
    |
 note: the used `impl` has a `'static` requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:48:30
diff --git a/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr b/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr
index 1ca22ebeef4..a5b50634c71 100644
--- a/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr
+++ b/src/test/ui/suggestions/lifetimes/trait-object-nested-in-impl-trait.stderr
@@ -7,7 +7,7 @@ LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> {
 LL |             remaining: self.0.iter(),
    |                        ------ ^^^^
    |                        |
-   |                        ...is captured here...
+   |                        ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/trait-object-nested-in-impl-trait.rs:27:23
@@ -32,7 +32,7 @@ LL |     fn iter(&self) -> impl Iterator<Item = Box<dyn Foo>> + '_ {
 LL |             remaining: self.0.iter(),
    |                        ------ ^^^^
    |                        |
-   |                        ...is captured here...
+   |                        ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/trait-object-nested-in-impl-trait.rs:38:23
@@ -53,7 +53,7 @@ LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> + 'a {
 LL |             remaining: self.0.iter(),
    |                        ------ ^^^^
    |                        |
-   |                        ...is captured here...
+   |                        ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/trait-object-nested-in-impl-trait.rs:49:30
@@ -74,7 +74,7 @@ LL |     fn iter<'a>(&'a self) -> impl Iterator<Item = Box<dyn Foo>> {
 LL |             remaining: self.0.iter(),
    |                        ------ ^^^^
    |                        |
-   |                        ...is captured here...
+   |                        ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/trait-object-nested-in-impl-trait.rs:60:30
diff --git a/src/test/ui/traits/trait-upcasting/type-checking-test-4.stderr b/src/test/ui/traits/trait-upcasting/type-checking-test-4.stderr
index 42230ddd695..d4bb9350b0b 100644
--- a/src/test/ui/traits/trait-upcasting/type-checking-test-4.stderr
+++ b/src/test/ui/traits/trait-upcasting/type-checking-test-4.stderr
@@ -36,10 +36,10 @@ LL | fn test_wrong3<'a>(x: &dyn Foo<'a>) -> Option<&'static u32> {
 LL |     let y = x as &dyn Bar<'_, '_>;
    |             -             ^^
    |             |
-   |             ...is captured here...
+   |             ...is used here...
 LL |
 LL |     y.get_b() // ERROR
-   |     - ...is captured here...
+   |     - ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/type-checking-test-4.rs:29:5
@@ -61,7 +61,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
 LL | fn test_wrong4<'a>(x: &dyn Foo<'a>) -> Option<&'static u32> {
    |                       ------------ this data with lifetime `'a`...
 LL |     <_ as Bar>::get_b(x) // ERROR
-   |     ^^^^^^^^^^^^^^^^^ ...is captured and required to live as long as `'static` here
+   |     ^^^^^^^^^^^^^^^^^ ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/type-checking-test-4.rs:32:48
@@ -77,7 +77,7 @@ error[E0759]: `x` has lifetime `'a` but it needs to satisfy a `'static` lifetime
 LL | fn test_wrong5<'a>(x: &dyn Foo<'a>) -> Option<&'static u32> {
    |                       ------------ this data with lifetime `'a`...
 LL |     <_ as Bar<'_, '_>>::get_b(x) // ERROR
-   |     ----------^^------------- ...is captured and required to live as long as `'static` here
+   |     ----------^^------------- ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/type-checking-test-4.rs:37:48
@@ -95,13 +95,13 @@ LL | fn test_wrong6<'a>(x: &dyn Foo<'a>) -> Option<&'static u32> {
 LL |     let y = x as &dyn Bar<'_, '_>;
    |             -             ^^
    |             |
-   |             ...is captured here...
+   |             ...is used here...
 LL |
 LL |     y.get_b(); // ERROR
-   |     - ...is captured here...
+   |     - ...is used here...
 LL |     let z = y;
 LL |     z.get_b() // ERROR
-   |     - ...is captured here...
+   |     - ...is used here...
    |
 note: ...and is required to live as long as `'static` here
   --> $DIR/type-checking-test-4.rs:47:5
diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr
index b8552c872c1..f4285a0f98e 100644
--- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr
+++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr
@@ -7,7 +7,7 @@ LL |     //                      ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to
 LL |     Box::new(items.iter())
    |              ----- ^^^^
    |              |
-   |              ...is captured and required to live as long as `'static` here
+   |              ...is used and required to live as long as `'static` here
    |
 note: `'static` lifetime requirement introduced by the return type
   --> $DIR/dyn-trait-underscore.rs:6:29