Skip to content

~const is allowed on structs (and other bad positions) within const fn. #132067

Open
@compiler-errors

Description

@compiler-errors

We now silently accept ~const Trait in illegal positions when they're nested in legal positions, because AST validation is not smart enough. I think it would be nice if we made validation more robust; perhaps moving it to ast lowering is the best thing to do.

Originally posted by @compiler-errors in #131985 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]`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