mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Set debug_assertions and miri cfgs as config defaults, allowing them to be overwritten
This commit is contained in:
parent
8989dcffd6
commit
0485a85ee2
6 changed files with 35 additions and 14 deletions
|
@ -1454,8 +1454,14 @@ fn sysroot_to_crate_graph(
|
|||
None,
|
||||
rustc_cfg,
|
||||
&CfgOverrides {
|
||||
global: CfgDiff::new(vec![CfgAtom::Flag("debug_assertions".into())], vec![])
|
||||
.unwrap(),
|
||||
global: CfgDiff::new(
|
||||
vec![
|
||||
CfgAtom::Flag("debug_assertions".into()),
|
||||
CfgAtom::Flag("miri".into()),
|
||||
],
|
||||
vec![],
|
||||
)
|
||||
.unwrap(),
|
||||
..Default::default()
|
||||
},
|
||||
&WorkspaceBuildScripts::default(),
|
||||
|
@ -1519,6 +1525,7 @@ fn sysroot_to_crate_graph(
|
|||
let mut cfg_options = CfgOptions::default();
|
||||
cfg_options.extend(rustc_cfg);
|
||||
cfg_options.insert_atom("debug_assertions".into());
|
||||
cfg_options.insert_atom("miri".into());
|
||||
cfg_options
|
||||
});
|
||||
let sysroot_crates: FxHashMap<SysrootCrate, CrateId> = stitched
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue