delay bug in RPITIT refinement checking with resolution errors
This commit is contained in:
parent
d929a42a66
commit
6402909f42
3 changed files with 43 additions and 4 deletions
23
tests/ui/impl-trait/in-trait/refine-resolution-errors.rs
Normal file
23
tests/ui/impl-trait/in-trait/refine-resolution-errors.rs
Normal 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() {}
|
Loading…
Add table
Add a link
Reference in a new issue