1
Fork 0

delay bug in RPITIT refinement checking with resolution errors

This commit is contained in:
Rémy Rakic 2024-06-25 19:55:06 +00:00
parent d929a42a66
commit 6402909f42
3 changed files with 43 additions and 4 deletions

View file

@ -0,0 +1,23 @@
// This is a non-regression test for issue #126670 where RPITIT refinement checking encountered
// errors during resolution and ICEd.
//@ edition: 2018
pub trait Mirror {
type Assoc;
}
impl<T: ?Sized> Mirror for () {
//~^ ERROR the type parameter `T` is not constrained
type Assoc = T;
}
pub trait First {
async fn first() -> <() as Mirror>::Assoc;
//~^ ERROR type annotations needed
}
impl First for () {
async fn first() {}
}
fn main() {}