Make sure test_type_match doesn't ICE with late-bound types

This commit is contained in:
Michael Goulet 2023-02-18 04:09:51 +00:00
parent 53709aedba
commit c13d5f1aeb
3 changed files with 27 additions and 1 deletions

View file

@ -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() {}

View file

@ -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