689b791422
Before, if we had a projection like `<T as Foo<'0>>::Bar: 'x` and a where clause like `<T as Foo<'a>>::Bar: 'a`, we considered those to have nothing to do with one another. Therefore, we would use the "overconstrained" path of adding `T: 'x` and `'0: 'x` requirements. We now do a "fuzzy" match where we erase regions first and hence we see the env bound `'a`.
201 lines
6.9 KiB
Plaintext
201 lines
6.9 KiB
Plaintext
note: External requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:47:29
|
|
|
|
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [
|
|
'_#1r,
|
|
T,
|
|
i32,
|
|
extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
|
|
]
|
|
= note: late-bound region is '_#3r
|
|
= note: number of external vids: 4
|
|
= note: where '_#1r: '_#2r
|
|
|
|
note: No external requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:43:1
|
|
|
|
|
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|
LL | | where
|
|
LL | | T: Anything<'b>,
|
|
LL | | {
|
|
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
|
LL | | //~^ ERROR
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [
|
|
'_#1r,
|
|
T
|
|
]
|
|
|
|
error: unsatisfied lifetime constraints
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:47:29
|
|
|
|
|
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));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ closure body requires that `'b` must outlive `'a`
|
|
|
|
note: External requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:57:29
|
|
|
|
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_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 '_#2r: '_#3r
|
|
|
|
note: No external requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:52:1
|
|
|
|
|
LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|
LL | | where
|
|
LL | | T: Anything<'b>,
|
|
LL | | 'a: 'a,
|
|
... |
|
|
LL | | //~^ ERROR
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [
|
|
'_#1r,
|
|
'_#2r,
|
|
T
|
|
]
|
|
|
|
error: unsatisfied lifetime constraints
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:57:29
|
|
|
|
|
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));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ closure body requires that `'b` must outlive `'a`
|
|
|
|
note: External requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:77:29
|
|
|
|
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[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 as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r
|
|
|
|
note: No external requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:62:1
|
|
|
|
|
LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|
LL | | where
|
|
LL | | T: Anything<'b>,
|
|
LL | | T::AssocType: 'a,
|
|
... |
|
|
LL | | //~^ ERROR
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [
|
|
'_#1r,
|
|
'_#2r,
|
|
T
|
|
]
|
|
|
|
error[E0309]: the associated type `<T as Anything<'_#5r>>::AssocType` may not live long enough
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:77:29
|
|
|
|
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider adding an explicit lifetime bound `<T as Anything<'_#5r>>::AssocType: ReEarlyBound(0, 'a)`...
|
|
|
|
note: External requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:87:29
|
|
|
|
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_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 '_#2r: '_#3r
|
|
|
|
note: No external requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:82:1
|
|
|
|
|
LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|
LL | | where
|
|
LL | | T: Anything<'b>,
|
|
LL | | 'b: 'a,
|
|
LL | | {
|
|
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [
|
|
'_#1r,
|
|
'_#2r,
|
|
T
|
|
]
|
|
|
|
note: External requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:99:29
|
|
|
|
|
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_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 '_#1r: '_#2r
|
|
|
|
note: No external requirements
|
|
--> $DIR/projection-one-region-trait-bound-closure.rs:91:1
|
|
|
|
|
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
|
|
LL | | where
|
|
LL | | T: Anything<'a>,
|
|
LL | | {
|
|
... |
|
|
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
|
LL | | }
|
|
| |_^
|
|
|
|
|
= note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [
|
|
'_#1r,
|
|
T
|
|
]
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0309`.
|