Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/workspace.rs')
| -rw-r--r-- | crates/project-model/src/workspace.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/project-model/src/workspace.rs b/crates/project-model/src/workspace.rs index 85e000bc0b..a5e74763d7 100644 --- a/crates/project-model/src/workspace.rs +++ b/crates/project-model/src/workspace.rs @@ -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 |