2017-12-04 12:04:38 -06:00
|
|
|
warning: not reporting region error due to -Znll
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:45:9
|
|
|
|
|
|
|
|
|
45 | require(&x, &y)
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
warning: not reporting region error due to -Znll
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:79:9
|
|
|
|
|
|
|
|
|
79 | require(&x, &y)
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
note: External requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26
|
|
|
|
|
|
|
|
|
38 | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
2017-12-19 10:12:56 -06:00
|
|
|
39 | | //~^ ERROR the parameter type `T` may not live long enough
|
2017-12-04 12:04:38 -06:00
|
|
|
40 | | //
|
|
|
|
41 | | // See `correct_region`, which explains the point of this
|
|
|
|
... |
|
|
|
|
46 | | //~^ WARNING not reporting region error due to -Znll
|
|
|
|
47 | | })
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#1r ()>, T))
|
|
|
|
]
|
|
|
|
= note: number of external vids: 2
|
|
|
|
= note: where T: '_#1r
|
|
|
|
|
2017-12-19 10:12:56 -06:00
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
2017-12-04 12:04:38 -06:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:38:26
|
|
|
|
|
|
|
|
|
38 | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
2017-12-19 10:12:56 -06:00
|
|
|
39 | | //~^ ERROR the parameter type `T` may not live long enough
|
2017-12-04 12:04:38 -06:00
|
|
|
40 | | //
|
|
|
|
41 | | // See `correct_region`, which explains the point of this
|
|
|
|
... |
|
|
|
|
46 | | //~^ WARNING not reporting region error due to -Znll
|
|
|
|
47 | | })
|
|
|
|
| |_____^
|
2017-12-19 10:12:56 -06:00
|
|
|
|
|
2017-10-16 14:07:26 -05:00
|
|
|
= help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), 'a))`...
|
2017-12-04 12:04:38 -06:00
|
|
|
|
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:37:1
|
|
|
|
|
|
|
|
|
37 | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
|
|
|
|
38 | | with_signature(a, b, |x, y| {
|
2017-12-19 10:12:56 -06:00
|
|
|
39 | | //~^ ERROR the parameter type `T` may not live long enough
|
2017-12-04 12:04:38 -06:00
|
|
|
40 | | //
|
|
|
|
... |
|
|
|
|
47 | | })
|
|
|
|
48 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]) with substs [
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:55:26
|
|
|
|
|
|
|
|
|
55 | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
|
|
|
56 | | // Key point of this test:
|
|
|
|
57 | | //
|
|
|
|
58 | | // The *closure* is being type-checked with all of its free
|
|
|
|
... |
|
|
|
|
67 | | require(&x, &y)
|
|
|
|
68 | | })
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:19 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
|
|
|
|
]
|
|
|
|
= note: number of external vids: 3
|
|
|
|
= note: where T: '_#2r
|
|
|
|
|
2017-12-04 12:04:38 -06:00
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:51:1
|
|
|
|
|
|
|
|
|
51 | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
|
|
|
|
52 | | where
|
|
|
|
53 | | T: 'a,
|
|
|
|
54 | | {
|
|
|
|
... |
|
|
|
|
68 | | })
|
|
|
|
69 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26
|
|
|
|
|
|
|
|
|
76 | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
|
|
|
77 | | //~^ ERROR the parameter type `T` may not live long enough
|
|
|
|
78 | | // See `correct_region`
|
|
|
|
79 | | require(&x, &y)
|
|
|
|
80 | | //~^ WARNING not reporting region error due to -Znll
|
|
|
|
81 | | })
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
|
|
|
|
]
|
|
|
|
= note: number of external vids: 3
|
|
|
|
= note: where T: '_#2r
|
|
|
|
|
2017-12-19 10:12:56 -06:00
|
|
|
error[E0309]: the parameter type `T` may not live long enough
|
2017-12-04 12:04:38 -06:00
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:76:26
|
|
|
|
|
|
|
|
|
76 | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
2017-12-19 10:12:56 -06:00
|
|
|
77 | | //~^ ERROR the parameter type `T` may not live long enough
|
2017-12-04 12:04:38 -06:00
|
|
|
78 | | // See `correct_region`
|
|
|
|
79 | | require(&x, &y)
|
|
|
|
80 | | //~^ WARNING not reporting region error due to -Znll
|
|
|
|
81 | | })
|
|
|
|
| |_____^
|
2017-12-19 10:12:56 -06:00
|
|
|
|
|
2017-10-16 14:07:26 -05:00
|
|
|
= help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`...
|
2017-12-04 12:04:38 -06:00
|
|
|
|
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:72:1
|
|
|
|
|
|
|
|
|
72 | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
|
|
|
|
73 | | where
|
|
|
|
74 | | T: 'b,
|
|
|
|
75 | | {
|
|
|
|
... |
|
|
|
|
81 | | })
|
|
|
|
82 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
2018-02-22 17:46:02 -06:00
|
|
|
note: External requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:90:26
|
|
|
|
|
|
|
|
|
90 | with_signature(a, b, |x, y| {
|
|
|
|
| __________________________^
|
|
|
|
91 | | // See `correct_region`
|
|
|
|
92 | | require(&x, &y)
|
|
|
|
93 | | })
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T,
|
|
|
|
i32,
|
|
|
|
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
|
|
|
|
]
|
|
|
|
= note: number of external vids: 4
|
|
|
|
= note: where T: '_#3r
|
|
|
|
|
2017-12-04 12:04:38 -06:00
|
|
|
note: No external requirements
|
|
|
|
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:85:1
|
|
|
|
|
|
|
|
|
85 | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
|
|
|
|
86 | | where
|
|
|
|
87 | | T: 'b,
|
|
|
|
88 | | 'b: 'a,
|
|
|
|
... |
|
|
|
|
93 | | })
|
|
|
|
94 | | }
|
|
|
|
| |_^
|
|
|
|
|
|
|
|
|
= note: defining type: DefId(0/0:9 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[0]) with substs [
|
|
|
|
'_#1r,
|
|
|
|
'_#2r,
|
|
|
|
T
|
|
|
|
]
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-02-19 14:40:25 -06:00
|
|
|
If you want more information on this error, try using "rustc --explain E0309"
|