return type sized check occurs in opaque defining env #150
Open
Description
tests/ui/generic-associated-types/issue-92033.rs
fn foo() -> impl ?Sized {
//~^ ERROR the size for values of type `impl ?Sized` cannot be known at compilation time
()
}
...passes in new solver because the sized check happens during typeck, and that allows us to reveal impl ?Sized: Sized
to (): Sized
. Not sure if that's desirable; if it's not, then we should probably move the return type sized check to wfcheck.
I think it's fine that this passes, tho.
Metadata
Assignees
Labels
No labels