(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
(Since
cfg(version)'s support for nightly is under discussion, I decided to check howcfg(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.)This code (playground) should cleanly compile as
std::fmt::rt::v1is gated behind the inactivefmt_internalsfeature, andcfg(accessible)should ignore disabled gated features. Instead it errors out:cc #64797