fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0309]: the parameter type `T` may not live long enough 2 --> $DIR/min-choice-reject-ambiguous.rs:17:5 3 | 4LL | type_test::<'_, T>() // This should pass if we pick 'b. 5 | ^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds 6 | 7help: consider adding an explicit lifetime bound... 8 | 9LL | T: 'b + 'a, 10 | ++++ 11 12error[E0309]: the parameter type `T` may not live long enough 13 --> $DIR/min-choice-reject-ambiguous.rs:28:5 14 | 15LL | type_test::<'_, T>() // This should pass if we pick 'c. 16 | ^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds 17 | 18help: consider adding an explicit lifetime bound... 19 | 20LL | T: 'c + 'a, 21 | ++++ 22 23error[E0700]: hidden type for `impl Cap<'b> + Cap<'c>` captures lifetime that does not appear in bounds 24 --> $DIR/min-choice-reject-ambiguous.rs:39:5 25 | 26LL | fn test_ambiguous<'a, 'b, 'c>(s: &'a u8) -> impl Cap<'b> + Cap<'c> 27 | -- ---------------------- opaque type defined here 28 | | 29 | hidden type `&'a u8` captures the lifetime `'a` as defined here 30... 31LL | s 32 | ^ 33 | 34help: to declare that `impl Cap<'b> + Cap<'c>` captures `'a`, you can add an explicit `'a` lifetime bound 35 | 36LL | fn test_ambiguous<'a, 'b, 'c>(s: &'a u8) -> impl Cap<'b> + Cap<'c> + 'a 37 | ++++ 38 39error: aborting due to 3 previous errors 40 41Some errors have detailed explanations: E0309, E0700. 42For more information about an error, try `rustc --explain E0309`.