mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
centralize diagnostic server stuff
This commit is contained in:
parent
b9f3c16407
commit
abd91493e0
@ -80,10 +80,7 @@ impl<'cfg> Compilation<'cfg> {
|
||||
if bcx.config.extra_verbose() {
|
||||
rustc.display_env_vars();
|
||||
}
|
||||
let srv = bcx.build_config.rustfix_diagnostic_server.borrow();
|
||||
if let Some(server) = &*srv {
|
||||
server.configure(&mut rustc);
|
||||
}
|
||||
|
||||
Ok(Compilation {
|
||||
// TODO: deprecated; remove.
|
||||
native_dirs: BTreeSet::new(),
|
||||
|
@ -119,6 +119,17 @@ pub fn fix(ws: &Workspace<'_>, opts: &mut FixOptions<'_>) -> CargoResult<()> {
|
||||
.build_config
|
||||
.rustfix_diagnostic_server
|
||||
.borrow_mut() = Some(RustfixDiagnosticServer::new()?);
|
||||
|
||||
if let Some(server) = opts
|
||||
.compile_opts
|
||||
.build_config
|
||||
.rustfix_diagnostic_server
|
||||
.borrow()
|
||||
.as_ref()
|
||||
{
|
||||
server.configure(&mut wrapper);
|
||||
}
|
||||
|
||||
opts.compile_opts.build_config.rustc_wrapper = Some(wrapper);
|
||||
|
||||
ops::compile(ws, &opts.compile_opts)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user