]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
0d622654c528f01d57c71e04b8b89b1fe8de4f82
[rust.git] / src / test / ui / nll / closure-requirements / propagate-from-trait-match.stderr
1 note: External requirements
2   --> $DIR/propagate-from-trait-match.rs:32:36
3    |
4 LL |       establish_relationships(value, |value| {
5    |  ____________________________________^
6 LL | |
7 LL | |
8 LL | |         // This function call requires that
9 ...  |
10 LL | |         require(value);
11 LL | |     });
12    | |_____^
13    |
14    = note: defining type: DefId(0:14 ~ 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
23 note: No external requirements
24   --> $DIR/propagate-from-trait-match.rs:28:1
25    |
26 LL | / fn supply<'a, T>(value: T)
27 LL | | where
28 LL | |     T: Trait<'a>,
29 LL | | {
30 ...  |
31 LL | |     });
32 LL | | }
33    | |_^
34    |
35    = note: defining type: DefId(0:11 ~ propagate_from_trait_match[317d]::supply[0]) with substs [
36                '_#1r,
37                T,
38            ]
39
40 error[E0309]: the parameter type `T` may not live long enough
41   --> $DIR/propagate-from-trait-match.rs:32:36
42    |
43 LL |       establish_relationships(value, |value| {
44    |  ____________________________________^
45 LL | |
46 LL | |
47 LL | |         // This function call requires that
48 ...  |
49 LL | |         require(value);
50 LL | |     });
51    | |_____^
52    |
53    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
54
55 error: aborting due to previous error
56
57 For more information about this error, try `rustc --explain E0309`.