rust/tests/ui/impl-trait/issues/issue-88236-2.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

93 lines
3.8 KiB
Plaintext
Raw Normal View History

error: higher kinded lifetime bounds on nested opaque types are not supported yet
--> $DIR/issue-88236-2.rs:15:61
|
LL | fn make_impl() -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {}
| ^^
|
note: lifetime declared here
--> $DIR/issue-88236-2.rs:15:28
|
LL | fn make_impl() -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {}
| ^^
error: higher kinded lifetime bounds on nested opaque types are not supported yet
--> $DIR/issue-88236-2.rs:18:80
|
LL | fn make_weird_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
| ^^
|
note: lifetime declared here
--> $DIR/issue-88236-2.rs:18:47
|
LL | fn make_weird_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
| ^^
error: higher kinded lifetime bounds on nested opaque types are not supported yet
--> $DIR/issue-88236-2.rs:25:78
|
LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
| ^^
|
note: lifetime declared here
--> $DIR/issue-88236-2.rs:25:45
|
LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
| ^^
error: implementation of `Hrtb` is not general enough
--> $DIR/issue-88236-2.rs:20:5
|
LL | &()
| ^^^ implementation of `Hrtb` is not general enough
|
= note: `Hrtb<'0>` would have to be implemented for the type `&()`, for any lifetime `'0`...
= note: ...but `Hrtb<'1>` is actually implemented for the type `&'1 ()`, for some specific lifetime `'1`
error: implementation of `Hrtb` is not general enough
--> $DIR/issue-88236-2.rs:20:5
|
LL | &()
| ^^^ implementation of `Hrtb` is not general enough
|
= note: `Hrtb<'a>` would have to be implemented for the type `&()`
= note: ...but `Hrtb<'0>` is actually implemented for the type `&'0 ()`, for some specific lifetime `'0`
error: lifetime may not live long enough
--> $DIR/issue-88236-2.rs:27:5
|
LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> {
| -- lifetime `'b` defined here
LL |
LL | x
| ^ returning this value requires that `'b` must outlive `'static`
|
help: to declare that `impl for<'a> Hrtb<'a, Assoc = impl Send + '_>` captures data from argument `x`, you can add an explicit `'b` lifetime bound
|
LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a> + 'b {
| ++++
help: to declare that `impl Send + 'a` captures data from argument `x`, you can add an explicit `'b` lifetime bound
|
LL | fn make_bad_impl<'b>(x: &'b ()) -> impl for<'a> Hrtb<'a, Assoc = impl Send + 'a + 'b> {
| ++++
error: implementation of `Hrtb` is not general enough
--> $DIR/issue-88236-2.rs:27:5
|
LL | x
| ^ implementation of `Hrtb` is not general enough
|
= note: `Hrtb<'0>` would have to be implemented for the type `&()`, for any lifetime `'0`...
= note: ...but `Hrtb<'1>` is actually implemented for the type `&'1 ()`, for some specific lifetime `'1`
error: implementation of `Hrtb` is not general enough
--> $DIR/issue-88236-2.rs:27:5
|
LL | x
| ^ implementation of `Hrtb` is not general enough
|
= note: `Hrtb<'a>` would have to be implemented for the type `&()`
= note: ...but `Hrtb<'0>` is actually implemented for the type `&'0 ()`, for some specific lifetime `'0`
error: aborting due to 8 previous errors