-warning: not reporting region error due to -Znll
- --> $DIR/projection-one-region-closure.rs:56:39
+note: external requirements
+ --> $DIR/projection-one-region-closure.rs:45:29
|
-56 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^
-
-warning: not reporting region error due to -Znll
- --> $DIR/projection-one-region-closure.rs:68:39
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^
|
-68 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^
+ = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
+ i32,
+ extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T)),
+ (),
+ ]
+ = note: late-bound region is '_#3r
+ = note: number of external vids: 4
+ = note: where T: '_#2r
+ = note: where '_#1r: '_#2r
-warning: not reporting region error due to -Znll
- --> $DIR/projection-one-region-closure.rs:90:39
+note: no external requirements
+ --> $DIR/projection-one-region-closure.rs:41:1
+ |
+LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
+LL | | where
+LL | | T: Anything<'b>,
+ | |____________________^
|
-90 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^
+ = note: defining type: no_relationships_late::<'_#1r, T>
-note: External requirements
- --> $DIR/projection-one-region-closure.rs:56:29
+error[E0309]: the parameter type `T` may not live long enough
+ --> $DIR/projection-one-region-closure.rs:45:39
|
-56 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
- = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[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
- = note: where '_#1r: '_#2r
+help: consider adding an explicit lifetime bound...
+ |
+LL | T: Anything<'b> + 'a,
+ | ++++
-note: External requirements
- --> $DIR/projection-one-region-closure.rs:68:29
+error: lifetime may not live long enough
+ --> $DIR/projection-one-region-closure.rs:45:39
|
-68 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
+ | -- -- lifetime `'b` defined here
+ | |
+ | lifetime `'a` defined here
+...
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
|
- = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[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
- = note: where '_#2r: '_#3r
+ = help: consider adding the following bound: `'b: 'a`
-note: External requirements
- --> $DIR/projection-one-region-closure.rs:90:29
+note: external requirements
+ --> $DIR/projection-one-region-closure.rs:56:29
|
-90 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^
|
- = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
- '_#1r,
- '_#2r,
- T,
+ = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32,
- extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
+ extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ (),
]
= note: number of external vids: 4
= note: where T: '_#3r
= note: where '_#2r: '_#3r
-note: External requirements
- --> $DIR/projection-one-region-closure.rs:103:29
- |
-103 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[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
- = note: where '_#2r: '_#3r
+note: no external requirements
+ --> $DIR/projection-one-region-closure.rs:51:1
+ |
+LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
+LL | | where
+LL | | T: Anything<'b>,
+LL | | 'a: 'a,
+ | |___________^
+ |
+ = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
error[E0309]: the parameter type `T` may not live long enough
- --> $DIR/projection-one-region-closure.rs:56:29
+ --> $DIR/projection-one-region-closure.rs:56:39
|
-56 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
- = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...
-
-error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
- --> $DIR/projection-one-region-closure.rs:56:20
+help: consider adding an explicit lifetime bound...
|
-56 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^
-
-note: No external requirements
- --> $DIR/projection-one-region-closure.rs:52:1
- |
-52 | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
-53 | | where
-54 | | T: Anything<'b>,
-55 | | {
-... |
-59 | | //~| ERROR does not outlive free region
-60 | | }
- | |_^
- |
- = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [
- '_#1r,
- T
- ]
+LL | T: Anything<'b> + 'a,
+ | ++++
-error[E0309]: the parameter type `T` may not live long enough
- --> $DIR/projection-one-region-closure.rs:68:29
+error: lifetime may not live long enough
+ --> $DIR/projection-one-region-closure.rs:56:39
|
-68 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
+ | -- -- lifetime `'b` defined here
+ | |
+ | lifetime `'a` defined here
+...
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`
|
- = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
+ = help: consider adding the following bound: `'b: 'a`
-error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
- --> $DIR/projection-one-region-closure.rs:68:20
+note: external requirements
+ --> $DIR/projection-one-region-closure.rs:70:29
|
-68 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^
-
-note: No external requirements
- --> $DIR/projection-one-region-closure.rs:63:1
- |
-63 | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
-64 | | where
-65 | | T: Anything<'b>,
-66 | | 'a: 'a,
-... |
-71 | | //~| ERROR does not outlive free region
-72 | | }
- | |_^
- |
- = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [
- '_#1r,
- '_#2r,
- T
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^
+ |
+ = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ i32,
+ extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ (),
]
+ = note: number of external vids: 4
+ = note: where <T as Anything<ReEarlyBound(1, 'b)>>::AssocType: '_#3r
-error[E0309]: the parameter type `T` may not live long enough
- --> $DIR/projection-one-region-closure.rs:90:29
+note: no external requirements
+ --> $DIR/projection-one-region-closure.rs:62:1
|
-90 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
+LL | | where
+LL | | T: Anything<'b>,
+LL | | T::AssocType: 'a,
+ | |_____________________^
|
- = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
+ = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
-error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
- --> $DIR/projection-one-region-closure.rs:90:20
+note: external requirements
+ --> $DIR/projection-one-region-closure.rs:80:29
|
-90 | with_signature(cell, t, |cell, t| require(cell, t));
- | ^^^^
-
-note: No external requirements
- --> $DIR/projection-one-region-closure.rs:75:1
- |
-75 | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
-76 | | where
-77 | | T: Anything<'b>,
-78 | | T::AssocType: 'a,
-... |
-93 | | //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
-94 | | }
- | |_^
- |
- = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [
- '_#1r,
- '_#2r,
- T
+LL | with_signature(cell, t, |cell, t| require(cell, t));
+ | ^^^^^^^^^
+ |
+ = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
+ i32,
+ extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T)),
+ (),
]
+ = note: number of external vids: 4
+ = note: where T: '_#3r
+ = note: where '_#2r: '_#3r
-note: No external requirements
- --> $DIR/projection-one-region-closure.rs:97:1
- |
-97 | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
-98 | | where
-99 | | T: Anything<'b>,
-100 | | T: 'a,
-... |
-103 | | with_signature(cell, t, |cell, t| require(cell, t));
-104 | | }
- | |_^
- |
- = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [
- '_#1r,
- '_#2r,
- T
- ]
+note: no external requirements
+ --> $DIR/projection-one-region-closure.rs:74:1
+ |
+LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
+LL | | where
+LL | | T: Anything<'b>,
+LL | | T: 'a,
+LL | | 'b: 'a,
+ | |___________^
+ |
+ = note: defining type: elements_outlive::<'_#1r, '_#2r, T>
-error: aborting due to 6 previous errors
+error: aborting due to 4 previous errors
+For more information about this error, try `rustc --explain E0309`.