rust/tests/ui/implied-bounds/issue-100690.stderr
lcnr 4fa5fb684e move leak check out of candidate evaluation
this prevents higher ranked goals from guiding selection
2024-04-03 22:32:46 +01:00

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`.