]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/implied_bounds.stderr
Rollup merge of #106732 - durin42:dmitrig-arrayref-ctor, r=nikic
[rust.git] / tests / ui / type-alias-impl-trait / implied_bounds.stderr
1 error: lifetime may not live long enough
2   --> $DIR/implied_bounds.rs:17:9
3    |
4 LL | impl<'a> Convert<'a> for () {
5    |      -- lifetime `'a` defined here
6 ...
7 LL |     fn convert<'b, T: ?Sized>(_proof: &'b WithLifetime<'a>, x: &'a T) -> &'b T {
8    |                -- lifetime `'b` defined here
9 ...
10 LL |         x
11    |         ^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
12    |
13    = help: consider adding the following bound: `'a: 'b`
14
15 error: aborting due to previous error
16