Skip to content

Commit 582f1a6

Browse files
authored
Merge pull request rust-lang#18395 from Wilfred/missing_cfg_for_core
fix: Add missing cfg flags for `core` crate
2 parents 5b0821f + c93514b commit 582f1a6

File tree

1 file changed

+4
-3
lines changed
  • src/tools/rust-analyzer/crates/project-model/src

1 file changed

+4
-3
lines changed

src/tools/rust-analyzer/crates/project-model/src/rustc_cfg.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ pub(crate) fn get(
2424
config: RustcCfgConfig<'_>,
2525
) -> Vec<CfgAtom> {
2626
let _p = tracing::info_span!("rustc_cfg::get").entered();
27-
let mut res: Vec<_> = Vec::with_capacity(6 * 2 + 1);
27+
let mut res: Vec<_> = Vec::with_capacity(7 * 2 + 1);
2828

2929
// Some nightly-only cfgs, which are required for stdlib
3030
res.push(CfgAtom::Flag(Symbol::intern("target_thread_local")));
31-
for ty in ["8", "16", "32", "64", "cas", "ptr"] {
32-
for key in ["target_has_atomic", "target_has_atomic_load_store"] {
31+
for key in ["target_has_atomic", "target_has_atomic_load_store"] {
32+
for ty in ["8", "16", "32", "64", "cas", "ptr"] {
3333
res.push(CfgAtom::KeyValue { key: Symbol::intern(key), value: Symbol::intern(ty) });
3434
}
35+
res.push(CfgAtom::Flag(Symbol::intern(key)));
3536
}
3637

3738
let rustc_cfgs = get_rust_cfgs(target, extra_env, config);

0 commit comments

Comments
 (0)