fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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