fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.3 KiB52 linesraw
1note: External requirements
2  --> $DIR/propagate-from-trait-match.rs:32:36
3   |
4LL |       establish_relationships(value, |value| {
5   |  ____________________________________^
6LL | |
7LL | |
8LL | |         // This function call requires that
9...  |
10LL | |         require(value);
11LL | |     });
12   | |_____^
13   |
14   = note: defining type: supply::<'_#1r, T>::{{closure}}#0 with closure substs [
15               i32,
16               extern "rust-call" fn((T,)),
17           ]
18   = note: number of external vids: 2
19   = note: where T: '_#1r
20
21note: No external requirements
22  --> $DIR/propagate-from-trait-match.rs:28:1
23   |
24LL | / fn supply<'a, T>(value: T)
25LL | | where
26LL | |     T: Trait<'a>,
27LL | | {
28...  |
29LL | |     });
30LL | | }
31   | |_^
32   |
33   = note: defining type: supply::<'_#1r, T>
34
35error[E0309]: the parameter type `T` may not live long enough
36  --> $DIR/propagate-from-trait-match.rs:32:36
37   |
38LL |       establish_relationships(value, |value| {
39   |  ____________________________________^
40LL | |
41LL | |
42LL | |         // This function call requires that
43...  |
44LL | |         require(value);
45LL | |     });
46   | |_____^
47   |
48   = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
49
50error: aborting due to previous error
51
52For more information about this error, try `rustc --explain E0309`.