Skip to content

Remove ParamEnv::reveal_all from codegen #75327

Open

Description

Instead of using ParamEnv::reveal_all, the ParamEnv should be tracked in the mono item - this is necessary to enable more complex forms of polymorphization in future.

something simple like trying layout_of(ty) on various types in the MIR body and ignoring generics in ty if it succeeds, should work, but the lack of a correct ParamEnv would make it fail later (especially if e.g. it's something like &T which only has a constant layout if T: Sized)

(source: eddyb in Zulip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    -ZpolymorphizeUnstable option: Polymorphization.A-codegenArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions