mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Provide an config option to not set cfg(test)
This commit is contained in:
parent
546339a7be
commit
4ea09dd9f6
16 changed files with 73 additions and 15 deletions
|
@ -30,6 +30,7 @@ pub struct LoadCargoConfig {
|
|||
pub load_out_dirs_from_check: bool,
|
||||
pub with_proc_macro_server: ProcMacroServerChoice,
|
||||
pub prefill_caches: bool,
|
||||
pub set_test: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -99,6 +100,7 @@ pub fn load_workspace(
|
|||
vfs.file_id(&path)
|
||||
},
|
||||
extra_env,
|
||||
load_config.set_test,
|
||||
);
|
||||
let proc_macros = {
|
||||
let proc_macro_server = match &proc_macro_server {
|
||||
|
@ -531,6 +533,7 @@ mod tests {
|
|||
load_out_dirs_from_check: false,
|
||||
with_proc_macro_server: ProcMacroServerChoice::None,
|
||||
prefill_caches: false,
|
||||
set_test: true,
|
||||
};
|
||||
let (db, _vfs, _proc_macro) =
|
||||
load_workspace_at(path, &cargo_config, &load_cargo_config, &|_| {}).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue