Skip to content

rustc_const_unstable should check constness #69630

Closed
@DutchGhost

Description

@DutchGhost

The rustc_const_unstable attribute currently does not check whether the function it is applied upon is indeed a const fn. I feel like it should check that.

I recently made the mistake of forgetting to mark the function const: #69617 (comment)

ping @oli-obk

Metadata

Metadata

Assignees

Labels

A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-stabilityArea: `#[stable]`, `#[unstable]` etc.C-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