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

Commit 7d0bc55

Browse files
committed
Update rustc
1 parent 641202c commit 7d0bc55

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ rayon = "1"
2626
rls-analysis = "0.13"
2727
rls-blacklist = "0.1.2"
2828
rls-data = { version = "0.16", features = ["serialize-serde"] }
29-
rls-rustc = "0.3.0"
29+
rls-rustc = "0.4.0"
3030
rls-span = { version = "0.4", features = ["serialize-serde"] }
3131
rls-vfs = { version = "0.4.5", features = ["racer-impls"] }
3232
rustfmt-nightly = { git = "https://github.com/rust-lang-nursery/rustfmt", rev = "f3906267" }

src/build/rustc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn rustc(
9292
};
9393

9494
let analysis = Arc::new(Mutex::new(None));
95-
let mut controller = RlsRustcCalls::new(Arc::clone(&analysis), clippy_pref);
95+
let controller = Box::new(RlsRustcCalls::new(Arc::clone(&analysis), clippy_pref));
9696

9797
// rustc explicitly panics in run_compiler() on compile failure, regardless
9898
// if it encounters an ICE (internal compiler error) or not.
@@ -103,7 +103,7 @@ pub fn rustc(
103103
// Replace stderr so we catch most errors.
104104
run_compiler(
105105
&args,
106-
&mut controller,
106+
controller,
107107
Some(Box::new(ReplacedFileLoader::new(changed))),
108108
Some(Box::new(BufWriter(buf))),
109109
)
@@ -131,15 +131,15 @@ pub fn rustc(
131131
// controller, but use our own callback for save-analysis.
132132
#[derive(Clone)]
133133
struct RlsRustcCalls {
134-
default_calls: RustcDefaultCalls,
134+
default_calls: Box<RustcDefaultCalls>,
135135
analysis: Arc<Mutex<Option<Analysis>>>,
136136
clippy_preference: ClippyPreference,
137137
}
138138

139139
impl RlsRustcCalls {
140140
fn new(analysis: Arc<Mutex<Option<Analysis>>>, clippy_preference: ClippyPreference) -> RlsRustcCalls {
141141
RlsRustcCalls {
142-
default_calls: RustcDefaultCalls,
142+
default_calls: Box::new(RustcDefaultCalls),
143143
analysis,
144144
clippy_preference,
145145
}
@@ -228,13 +228,13 @@ impl<'a> CompilerCalls<'a> for RlsRustcCalls {
228228
}
229229

230230
fn build_controller(
231-
&mut self,
231+
self: Box<Self>,
232232
sess: &Session,
233233
matches: &getopts::Matches,
234234
) -> CompileController<'a> {
235+
let analysis = self.analysis.clone();
235236
let mut result = self.default_calls.build_controller(sess, matches);
236237
result.keep_ast = true;
237-
let analysis = self.analysis.clone();
238238

239239
#[cfg(feature = "clippy")] {
240240
if self.clippy_preference != ClippyPreference::Off {

0 commit comments

Comments
 (0)