-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure test_type_match doesn't ICE with late-bound types
- Loading branch information
1 parent
53709ae
commit c13d5f1
Showing
3 changed files
with
27 additions
and
1 deletion.
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
14 changes: 14 additions & 0 deletions
14
tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.rs
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// edition:2021 | ||
// check-pass | ||
|
||
// Checks that test_type_match code doesn't ICE when predicates have late-bound types | ||
|
||
#![feature(non_lifetime_binders)] | ||
//~^ WARN is incomplete and may not be safe to use | ||
|
||
async fn walk2<'a, T: 'a>(_: T) | ||
where | ||
for<F> F: 'a, | ||
{} | ||
|
||
fn main() {} |
11 changes: 11 additions & 0 deletions
11
tests/ui/traits/non_lifetime_binders/type-match-with-late-bound.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/type-match-with-late-bound.rs:6:12 | ||
| | ||
LL | #![feature(non_lifetime_binders)] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|