Skip to content

rustc_const_unstable attribute ignored in const promotion #50901

Closed
@oli-obk

Description

@oli-obk
let x: &'static _ = &std::time::Duration::from_millis(42).subsec_millis();

works on nightly but not on beta, because the subsec_millis function wasn't unstably const fn when beta was split off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.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