diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2020-05-26 17:20:08 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2020-05-30 10:22:26 -0700 |
| commit | 731ea85f215f03fc33a92147d6cc51a01dee589f (patch) | |
| tree | e17520c5a38a3477fd223f93945fbb8e6d610f88 /src/test/ui | |
| parent | 65f492be121ee9901d8c4305629cf4f2ad88f6d8 (diff) | |
review comment: tweak wording and account for span overlap
Diffstat (limited to 'src/test/ui')
10 files changed, 20 insertions, 21 deletions
diff --git a/src/test/ui/async-await/issues/issue-62097.stderr b/src/test/ui/async-await/issues/issue-62097.stderr index cd141b82e41..161b2565c3d 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: cannot infer an appropriate lifetime LL | pub async fn run_dummy_fn(&self) { | ^^^^^ ...but this borrow... LL | foo(|| self.bar()).await; - | --- this evaluates to the `'static` lifetime... + | --- this is `'static`... | note: ...can't outlive the lifetime `'_` as defined on the method body at 12:31 --> $DIR/issue-62097.rs:12:31 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 42667d6ca1a..9d068d70bd4 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 @@ -4,7 +4,7 @@ error: cannot infer an appropriate lifetime LL | fn elided(x: &i32) -> impl Copy { x } | --------- ^ ...but this borrow... | | - | this evaluates to the `'static` lifetime... + | this is `'static`... | note: ...can't outlive the anonymous lifetime #1 defined on the function body at 3:1 --> $DIR/must_outlive_least_region_or_bound.rs:3:1 @@ -22,7 +22,7 @@ error: cannot infer an appropriate lifetime LL | fn explicit<'a>(x: &'a i32) -> impl Copy { x } | --------- ^ ...but this borrow... | | - | this evaluates to the `'static` lifetime... + | this is `'static`... | note: ...can't outlive the lifetime `'a` as defined on the function body at 6:13 --> $DIR/must_outlive_least_region_or_bound.rs:6:13 @@ -40,7 +40,7 @@ error: cannot infer an appropriate lifetime LL | fn with_bound<'a>(x: &'a i32) -> impl LifetimeTrait<'a> + 'static { x } | -------------------------------- ^ ...but this borrow... | | - | this evaluates to the `'static` lifetime... + | this is `'static`... | note: ...can't outlive the lifetime `'a` as defined on the function body at 12:15 --> $DIR/must_outlive_least_region_or_bound.rs:12:15 diff --git a/src/test/ui/impl-trait/static-return-lifetime-infered.stderr b/src/test/ui/impl-trait/static-return-lifetime-infered.stderr index 963de2d448d..645c7e1e195 100644 --- a/src/test/ui/impl-trait/static-return-lifetime-infered.stderr +++ b/src/test/ui/impl-trait/static-return-lifetime-infered.stderr @@ -2,7 +2,7 @@ error: cannot infer an appropriate lifetime --> $DIR/static-return-lifetime-infered.rs:7:16 | LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> { - | ----------------------- this evaluates to the `'static` lifetime... + | ----------------------- this is `'static`... LL | self.x.iter().map(|a| a.0) | ------ ^^^^ | | @@ -24,7 +24,7 @@ error: cannot infer an appropriate lifetime --> $DIR/static-return-lifetime-infered.rs:11:16 | LL | fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> { - | ----------------------- this evaluates to the `'static` lifetime... + | ----------------------- this is `'static`... LL | self.x.iter().map(|a| a.0) | ------ ^^^^ | | diff --git a/src/test/ui/issues/issue-16922.stderr b/src/test/ui/issues/issue-16922.stderr index 8bcfe979ce1..20a6b287429 100644 --- a/src/test/ui/issues/issue-16922.stderr +++ b/src/test/ui/issues/issue-16922.stderr @@ -5,7 +5,7 @@ LL | Box::new(value) as Box<dyn Any> | ---------^^^^^- | | | | | ...but this borrow... - | this evaluates to the `'static` lifetime... + | this is `'static`... | note: ...can't outlive the anonymous lifetime #1 defined on the function body at 3:1 --> $DIR/issue-16922.rs:3:1 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 7981d082c80..465409c6398 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 @@ -2,10 +2,7 @@ error: cannot infer an appropriate lifetime --> $DIR/object-lifetime-default-from-box-error.rs:18:5 | LL | ss.r - | ^^^^ - | | - | this evaluates to the `'static` lifetime... - | ...but this borrow... + | ^^^^ this needs to be `'static` but the borrow... | note: ...can't outlive the anonymous lifetime #2 defined on the function body at 14:1 --> $DIR/object-lifetime-default-from-box-error.rs:14:1 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 8048b79b015..5a414c477a6 100644 --- a/src/test/ui/regions/region-object-lifetime-in-coercion.stderr +++ b/src/test/ui/regions/region-object-lifetime-in-coercion.stderr @@ -21,7 +21,7 @@ LL | Box::new(v) | ---------^- | | | | | ...but this borrow... - | this evaluates to the `'static` lifetime... + | this is `'static`... | note: ...can't outlive the anonymous lifetime #1 defined on the function body at 17:1 --> $DIR/region-object-lifetime-in-coercion.rs:17:1 diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr index fcde3bb5ca6..21775539cea 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr @@ -2,7 +2,7 @@ error: cannot infer an appropriate lifetime --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:16 | LL | async fn f(self: Pin<&Self>) -> impl Clone { self } - | ^^^^ ---------- this evaluates to the `'static` lifetime... + | ^^^^ ---------- this is `'static`... | | | ...but this borrow... | diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr index c89ee27aa8c..e931cec8a2a 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait.stderr @@ -4,7 +4,7 @@ error: cannot infer an appropriate lifetime LL | fn f(self: Pin<&Self>) -> impl Clone { self } | ---------- ^^^^ ...but this borrow... | | - | this evaluates to the `'static` lifetime... + | this is `'static`... | note: ...can't outlive the anonymous lifetime #1 defined on the method body at 6:5 --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait.rs:6:5 diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr index 5a2530bdcbb..d6d2a0c4d2b 100644 --- a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr +++ b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.stderr @@ -10,7 +10,7 @@ error: cannot infer an appropriate lifetime --> $DIR/missing-lifetimes-in-signature.rs:19:5 | LL | fn foo<G, T>(g: G, dest: &mut T) -> impl FnOnce() - | ------------- this evaluates to the `'static` lifetime... + | ------------- this is `'static`... ... LL | / move || { LL | | *dest = g.get(); @@ -55,7 +55,7 @@ note: ...so that the type `[closure@$DIR/missing-lifetimes-in-signature.rs:30:5: | LL | fn bar<G, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ | ^^^^^^^^^^^^^^^^^^ -help: consider introducing an explicit lifetime bound to unify the type parameter and the output +help: consider introducing an explicit lifetime bound | LL | fn bar<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a | ^^^^^ ^^^^ @@ -82,7 +82,7 @@ note: ...so that the type `[closure@$DIR/missing-lifetimes-in-signature.rs:52:5: | LL | fn qux<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ | ^^^^^^^^^^^^^^^^^^ -help: consider introducing an explicit lifetime bound to unify the type parameter and the output +help: consider introducing an explicit lifetime bound | LL | fn qux<'b, 'a, G: 'b + 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'b | ^^^ ^^^^^^^ ^^^^ diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr index 65714d16a81..bcbdec4f306 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.stderr @@ -2,11 +2,13 @@ error: cannot infer an appropriate lifetime --> $DIR/dyn-trait-underscore.rs:8:20 | LL | Box::new(items.iter()) - | ---------------^^^^--- - | | | - | | ...but this borrow... - | this evaluates to the `'static` lifetime... + | ---------------^^^^--- this is `'static`... | +note: ...but this borrow... + --> $DIR/dyn-trait-underscore.rs:8:14 + | +LL | Box::new(items.iter()) + | ^^^^^ note: ...can't outlive the anonymous lifetime #1 defined on the function body at 6:1 --> $DIR/dyn-trait-underscore.rs:6:1 | |
