Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Bump racer and rustfmt to fix broken toolstates #1704

Merged
merged 4 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 52 additions & 63 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ lsp-types = { version = "0.60", features = ["proposed"] }
lazy_static = "1"
log = "0.4"
num_cpus = "1"
racer = { version = "2.1.39", default-features = false }
racer = { version = "2.1.40", default-features = false }
rand = "0.7"
rayon = "1"
rustc_tools_util = "0.2"
rustfmt-nightly = { version = "1.4.22", git = "https://github.com/rust-lang/rustfmt", branch = "rustfmt-1.4.22" }
rustfmt-nightly = { version = "1.4.23", git = "https://github.com/rust-lang/rustfmt", branch = "rustfmt-1.4.23" }
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
Expand Down
8 changes: 5 additions & 3 deletions rls-rustc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extern crate rustc_span;

#[cfg(feature = "ipc")]
use rustc_driver::Compilation;
use rustc_driver::{run_compiler, Callbacks};
use rustc_driver::{Callbacks, RunCompiler};
use rustc_interface::interface;
#[cfg(feature = "ipc")]
use rustc_interface::Queries;
Expand Down Expand Up @@ -75,8 +75,10 @@ pub fn run() -> Result<(), ()> {
};

rustc_driver::install_ice_hook();
rustc_driver::catch_fatal_errors(|| {
run_compiler(&args, &mut shim_calls, file_loader, None, None)
rustc_driver::catch_fatal_errors(move || {
let mut compiler = RunCompiler::new(&args, &mut shim_calls);
compiler.set_file_loader(file_loader);
compiler.run()
})
.map(|_| ())
.map_err(|_| ())
Expand Down
16 changes: 7 additions & 9 deletions rls/src/build/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use log::trace;
use rls_data::Analysis;
use rls_vfs::Vfs;

use self::rustc_driver::{run_compiler, Compilation};
use self::rustc_driver::{Compilation, RunCompiler};
use self::rustc_interface::interface;
use self::rustc_interface::Queries;
use self::rustc_save_analysis as save;
Expand Down Expand Up @@ -185,14 +185,12 @@ fn run_in_process(
let stderr = Arc::clone(&stderr);
|| {
rustc_driver::catch_fatal_errors(move || {
// Replace stderr so we catch most errors.
run_compiler(
&args,
&mut callbacks,
Some(Box::new(ReplacedFileLoader::new(changed))),
Some(Box::new(BufWriter(stderr))),
None,
)
let mut compiler = RunCompiler::new(&args, &mut callbacks);
compiler
.set_file_loader(Some(Box::new(ReplacedFileLoader::new(changed))))
// Replace stderr so we catch most errors.
.set_emitter(Some(Box::new(BufWriter(stderr))));
compiler.run()
})
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"col": 12
},
"data": {
"Ok": []
"Ok": [
{
"language": "rust",
"value": "std/src/sync/mod.rs"
},
"Useful synchronization primitives.\n\n## The need for synchronization\n\nConceptually, a Rust program is a series of operations which will\nbe executed on a computer. The timeline of events happening in the\nprogram is consistent with the order of the operations in the code.\n\nConsider the following code, operating on some global static variables:\n\n```rust\nstatic mut A: u32 = 0;"
]
}
}
Loading