]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/suggestions/impl-on-dyn-trait-with-implicit-static-bound.stderr
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / suggestions / impl-on-dyn-trait-with-implicit-static-bound.stderr
index 2fb6c25fd17028a417650e3419660658a11fa900..55a1bbf18ab9fbfee2ad49631fbcf3dd7d0e07f7 100644 (file)
@@ -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
@@ -16,7 +16,7 @@ LL |         fn use_self<K>(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl<T> MyTrait<T> for dyn ObjectTrait<T> + '_ {
-   |                                               ^^^^
+   |                                               ++++
 
 error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:69:13
@@ -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
@@ -36,7 +36,7 @@ LL |         fn use_self(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl dyn ObjectTrait + '_ {
-   |                          ^^^^
+   |                          ++++
 
 error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:88:13
@@ -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
@@ -57,11 +57,11 @@ LL |     impl MyTrait for dyn ObjectTrait {}
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for dyn ObjectTrait + '_ {}
-   |                                      ^^^^
+   |                                      ++++
 help: to declare that the `impl Trait` captures data from argument `val`, you can add an explicit `'a` lifetime bound
    |
 LL |     fn use_it<'a>(val: &'a dyn ObjectTrait) -> impl OtherTrait<'a> + 'a {
-   |                                                                    ^^^^
+   |                                                                    ++++
 
 error[E0759]: `val` has lifetime `'a` but it needs to satisfy a `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:108:27
@@ -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
@@ -87,7 +87,7 @@ LL |     impl MyTrait for dyn ObjectTrait {}
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for dyn ObjectTrait + '_ {}
-   |                                      ^^^^
+   |                                      ++++
 
 error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:37:13
@@ -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
@@ -107,7 +107,7 @@ LL |         fn use_self(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for dyn ObjectTrait + '_ {
-   |                                      ^^^^
+   |                                      ++++
 
 error[E0772]: `val` has lifetime `'a` but calling `use_self` introduces an implicit `'static` lifetime requirement
   --> $DIR/impl-on-dyn-trait-with-implicit-static-bound.rs:54:13
@@ -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
@@ -127,7 +127,7 @@ LL |         fn use_self(&self) -> &() { panic!() }
 help: consider relaxing the implicit `'static` requirement
    |
 LL |     impl MyTrait for Box<dyn ObjectTrait + '_> {
-   |                                          ^^^^
+   |                                          ++++
 
 error: aborting due to 6 previous errors