]>
Commit | Line | Data |
---|---|---|
064997fb | 1 | error[E0700]: hidden type for `impl Swap` captures lifetime that does not appear in bounds |
5e7ed085 | 2 | --> $DIR/hidden-lifetimes.rs:29:5 |
dc9dc135 XL |
3 | | |
4 | LL | fn hide_ref<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl Swap + 'a { | |
5e7ed085 FG |
5 | | -- hidden type `&'a mut &'b T` captures the lifetime `'b` as defined here |
6 | LL | x | |
7 | | ^ | |
dc9dc135 | 8 | | |
a2a8927a | 9 | help: to declare that the `impl Trait` captures `'b`, you can add an explicit `'b` lifetime bound |
dc9dc135 | 10 | | |
c295e0f8 XL |
11 | LL | fn hide_ref<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl Swap + 'a + 'b { |
12 | | ++++ | |
dc9dc135 | 13 | |
064997fb | 14 | error[E0700]: hidden type for `impl Swap` captures lifetime that does not appear in bounds |
5e7ed085 | 15 | --> $DIR/hidden-lifetimes.rs:46:5 |
dc9dc135 XL |
16 | | |
17 | LL | fn hide_rc_refcell<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a { | |
5e7ed085 FG |
18 | | -- hidden type `Rc<RefCell<&'b T>>` captures the lifetime `'b` as defined here |
19 | LL | x | |
20 | | ^ | |
dc9dc135 | 21 | | |
a2a8927a | 22 | help: to declare that the `impl Trait` captures `'b`, you can add an explicit `'b` lifetime bound |
dc9dc135 | 23 | | |
c295e0f8 XL |
24 | LL | fn hide_rc_refcell<'a, 'b: 'a, T: 'static>(x: Rc<RefCell<&'b T>>) -> impl Swap + 'a + 'b { |
25 | | ++++ | |
dc9dc135 XL |
26 | |
27 | error: aborting due to 2 previous errors | |
28 | ||
29 | For more information about this error, try `rustc --explain E0700`. |