Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify leak-check to track only outgoing edges from placeholders
Also, update the affected tests. This seems strictly better but it is actually more permissive than I initially intended. In particular it accepts this ``` forall<'a, 'b> { exists<'intersection> { 'a: 'intersection, 'b: 'intersection, } } ``` and I'm not sure I want to accept that. It implies that we have a `'empty` in the new universe intoduced by the `forall`.
- Loading branch information
1 parent
1a4e2b6
commit bcc0a9c
Showing
30 changed files
with
219 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/hr-subtype.rs:39:26 | ||
error: fatal error triggered by #[rustc_error] | ||
--> $DIR/hr-subtype.rs:96:1 | ||
| | ||
LL | gimme::<$t1>(None::<$t2>); | ||
| ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a | ||
... | ||
LL | / check! { bound_a_b_vs_bound_a: (for<'a,'b> fn(&'a u32, &'b u32), | ||
LL | | for<'a> fn(&'a u32, &'a u32)) } | ||
| |__________________________________________________________________- in this macro invocation | ||
| | ||
= note: expected enum `std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32)>` | ||
found enum `std::option::Option<for<'a> fn(&'a u32, &'a u32)>` | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
LL | / fn main() { | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | | ||
LL | | } | ||
| |_^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/hr-subtype.rs:39:26 | ||
error: fatal error triggered by #[rustc_error] | ||
--> $DIR/hr-subtype.rs:96:1 | ||
| | ||
LL | gimme::<$t1>(None::<$t2>); | ||
| ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a | ||
... | ||
LL | / check! { bound_co_a_b_vs_bound_co_a: (for<'a,'b> fn(Co<'a>, Co<'b>), | ||
LL | | for<'a> fn(Co<'a>, Co<'a>)) } | ||
| |______________________________________________________________________- in this macro invocation | ||
| | ||
= note: expected enum `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>)>` | ||
found enum `std::option::Option<for<'a> fn(Co<'a>, Co<'a>)>` | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
LL | / fn main() { | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | | ||
LL | | } | ||
| |_^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
23 changes: 10 additions & 13 deletions
23
src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/hr-subtype.rs:39:26 | ||
error: fatal error triggered by #[rustc_error] | ||
--> $DIR/hr-subtype.rs:96:1 | ||
| | ||
LL | gimme::<$t1>(None::<$t2>); | ||
| ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a | ||
... | ||
LL | / check! { bound_co_a_co_b_ret_contra_a: (for<'a,'b> fn(Co<'a>, Co<'b>) -> Contra<'a>, | ||
LL | | for<'a> fn(Co<'a>, Co<'a>) -> Contra<'a>) } | ||
| |______________________________________________________________________________________- in this macro invocation | ||
| | ||
= note: expected enum `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>) -> Contra<'a>>` | ||
found enum `std::option::Option<for<'a> fn(Co<'a>, Co<'a>) -> Contra<'a>>` | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
LL | / fn main() { | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | | ||
LL | | } | ||
| |_^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
4 changes: 2 additions & 2 deletions
4
src/test/ui/hr-subtype/hr-subtype.bound_co_a_vs_bound_co_b.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 10 additions & 13 deletions
23
src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/hr-subtype.rs:39:26 | ||
error: fatal error triggered by #[rustc_error] | ||
--> $DIR/hr-subtype.rs:96:1 | ||
| | ||
LL | gimme::<$t1>(None::<$t2>); | ||
| ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a | ||
... | ||
LL | / check! { bound_contra_a_contra_b_ret_co_a: (for<'a,'b> fn(Contra<'a>, Contra<'b>) -> Co<'a>, | ||
LL | | for<'a> fn(Contra<'a>, Contra<'a>) -> Co<'a>) } | ||
| |______________________________________________________________________________________________- in this macro invocation | ||
| | ||
= note: expected enum `std::option::Option<for<'a, 'b> fn(Contra<'a>, Contra<'b>) -> Co<'a>>` | ||
found enum `std::option::Option<for<'a> fn(Contra<'a>, Contra<'a>) -> Co<'a>>` | ||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | ||
LL | / fn main() { | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | | ||
LL | | } | ||
| |_^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
4 changes: 2 additions & 2 deletions
4
src/test/ui/hr-subtype/hr-subtype.bound_inv_a_vs_bound_inv_b.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
src/test/ui/hrtb/hrtb-exists-forall-trait-contravariant.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
error[E0277]: the trait bound `(): Trait<for<'b> fn(&'b u32)>` is not satisfied | ||
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:11 | ||
error: implementation of `Trait` is not general enough | ||
--> $DIR/hrtb-exists-forall-trait-contravariant.rs:34:5 | ||
| | ||
LL | fn foo<T>() | ||
| --- required by a bound in this | ||
LL | where | ||
LL | T: Trait<for<'b> fn(&'b u32)>, | ||
| -------------------------- required by this bound in `foo` | ||
LL | trait Trait<T> {} | ||
| ----------------- trait `Trait` defined here | ||
... | ||
LL | foo::<()>(); | ||
| ^^ the trait `Trait<for<'b> fn(&'b u32)>` is not implemented for `()` | ||
| ^^^^^^^^^ implementation of `Trait` is not general enough | ||
| | ||
= help: the following implementations were found: | ||
<() as Trait<fn(&'a u32)>> | ||
= note: `()` must implement `Trait<for<'b> fn(&'b u32)>` | ||
= note: ...but `()` actually implements `Trait<fn(&'0 u32)>`, for some specific lifetime `'0` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
Oops, something went wrong.