Skip to content

cfg_accessible does not respect feature gating #72011

Open
@Nemo157

Description

@Nemo157

(Since cfg(version)'s support for nightly is under discussion, I decided to check how cfg(accessible)'s support was going. I realise it is far from done, but since it's possible to write a testcase for this now I thought it would be worth having an issue to make sure it's not forgotten.)

#![feature(cfg_accessible)]

#[cfg_accessible(std::fmt::rt::v1)]
const _: () = { use std::fmt::rt::v1; };

This code (playground) should cleanly compile as std::fmt::rt::v1 is gated behind the inactive fmt_internals feature, and cfg(accessible) should ignore disabled gated features. Instead it errors out:

error[E0658]: use of unstable library feature 'fmt_internals': internal to format_args!

cc #64797

Metadata

Metadata

Assignees

No one assigned

    Labels

    F-cfg_accessible`#![feature(cfg_accessible)]`T-langRelevant to the language team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions