Skip to content

return type sized check occurs in opaque defining env #150

Open
@compiler-errors

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions