Skip to content

return type sized check occurs in opaque defining env #150

@compiler-errors

Description

@compiler-errors

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

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions