mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
4fa5fb684e
this prevents higher ranked goals from guiding selection
42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
error: lifetime may not live long enough
|
|
--> $DIR/issue-100690.rs:34:9
|
|
|
|
|
LL | impl<'a, T: 'a> Handle<'a, T, UIView<'a, T>, Result<(), io::Error>> for TUIHandle<T> {
|
|
| -- lifetime `'a` defined here
|
|
...
|
|
LL | real_dispatch(f)
|
|
| ^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
|
|
|
|
|
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
|
|
--> $DIR/issue-100690.rs:8:8
|
|
|
|
|
LL | F: FnOnce(&mut UIView<T>) -> Result<(), io::Error> + Send + 'static,
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/issue-100690.rs:34:9
|
|
|
|
|
LL | real_dispatch(f)
|
|
| ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: `F` must implement `FnOnce<(&mut UIView<'0, T>,)>`, for any lifetime `'0`...
|
|
= note: ...but it actually implements `FnOnce<(&mut UIView<'1, T>,)>`, for some specific lifetime `'1`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/issue-100690.rs:34:9
|
|
|
|
|
LL | real_dispatch(f)
|
|
| ^^^^^^^^^^^^^^^^ one type is more general than the other
|
|
|
|
|
= note: expected associated type `<F as FnOnce<(&mut UIView<'_, T>,)>>::Output`
|
|
found associated type `<F as FnOnce<(&mut UIView<'_, T>,)>>::Output`
|
|
note: the lifetime requirement is introduced here
|
|
--> $DIR/issue-100690.rs:8:34
|
|
|
|
|
LL | F: FnOnce(&mut UIView<T>) -> Result<(), io::Error> + Send + 'static,
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|