mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Merge pull request #18395 from Wilfred/missing_cfg_for_core
fix: Add missing cfg flags for `core` crate
This commit is contained in:
commit
6342667ce1
1 changed files with 4 additions and 3 deletions
|
@ -24,14 +24,15 @@ pub(crate) fn get(
|
||||||
config: RustcCfgConfig<'_>,
|
config: RustcCfgConfig<'_>,
|
||||||
) -> Vec<CfgAtom> {
|
) -> Vec<CfgAtom> {
|
||||||
let _p = tracing::info_span!("rustc_cfg::get").entered();
|
let _p = tracing::info_span!("rustc_cfg::get").entered();
|
||||||
let mut res: Vec<_> = Vec::with_capacity(6 * 2 + 1);
|
let mut res: Vec<_> = Vec::with_capacity(7 * 2 + 1);
|
||||||
|
|
||||||
// Some nightly-only cfgs, which are required for stdlib
|
// Some nightly-only cfgs, which are required for stdlib
|
||||||
res.push(CfgAtom::Flag(Symbol::intern("target_thread_local")));
|
res.push(CfgAtom::Flag(Symbol::intern("target_thread_local")));
|
||||||
for ty in ["8", "16", "32", "64", "cas", "ptr"] {
|
for key in ["target_has_atomic", "target_has_atomic_load_store"] {
|
||||||
for key in ["target_has_atomic", "target_has_atomic_load_store"] {
|
for ty in ["8", "16", "32", "64", "cas", "ptr"] {
|
||||||
res.push(CfgAtom::KeyValue { key: Symbol::intern(key), value: Symbol::intern(ty) });
|
res.push(CfgAtom::KeyValue { key: Symbol::intern(key), value: Symbol::intern(ty) });
|
||||||
}
|
}
|
||||||
|
res.push(CfgAtom::Flag(Symbol::intern(key)));
|
||||||
}
|
}
|
||||||
|
|
||||||
let rustc_cfgs = get_rust_cfgs(target, extra_env, config);
|
let rustc_cfgs = get_rust_cfgs(target, extra_env, config);
|
||||||
|
|
Loading…
Reference in a new issue