| error[E0271]: type mismatch resolving `<{integer} as Fun>::F<'_> == [u8]` |
| --> $DIR/issue-74684-2.rs:21:9 |
| | |
| LL | bug(Box::new(x)); |
| | --- ^^^^^^^^^^^ type mismatch resolving `<{integer} as Fun>::F<'_> == [u8]` |
| | | |
| | required by a bound introduced by this call |
| | |
| note: expected this to be `[u8]` |
| --> $DIR/issue-74684-2.rs:8:18 |
| | |
| LL | type F<'a> = i32; |
| | ^^^ |
| note: required by a bound in `bug` |
| --> $DIR/issue-74684-2.rs:11:28 |
| | |
| LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(t: Box<T>) -> &'static T::F<'a> { |
| | ^^^^^^^^^^^^ required by this bound in `bug` |
| |
| error[E0597]: `a` does not live long enough |
| --> $DIR/issue-74684-2.rs:13:25 |
| | |
| LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(t: Box<T>) -> &'static T::F<'a> { |
| | -- lifetime `'a` defined here |
| LL | let a = [0; 1]; |
| | - binding `a` declared here |
| LL | let x = T::identity(&a); |
| | ------------^^- |
| | | | |
| | | borrowed value does not live long enough |
| | argument requires that `a` is borrowed for `'a` |
| LL | todo!() |
| LL | } |
| | - `a` dropped here while still borrowed |
| |
| error: aborting due to 2 previous errors |
| |
| Some errors have detailed explanations: E0271, E0597. |
| For more information about an error, try `rustc --explain E0271`. |