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

Commit d9aa23a

Browse files
authored
Merge pull request #1553 from Xanewok/unbreak-nightly
Unbreak latest nightly
2 parents 412fb00 + 5e7db7e commit d9aa23a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

rls-rustc/src/clippy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn adjust_args(args: Vec<String>, preference: ClippyPreference) -> Vec<Strin
4949

5050
#[cfg(feature = "clippy")]
5151
pub fn after_parse_callback(compiler: &rustc_interface::interface::Compiler) {
52-
use rustc_plugin::registry::Registry;
52+
use self::rustc_driver::plugin::registry::Registry;
5353

5454
let sess = compiler.session();
5555
let mut registry = Registry::new(

rls-rustc/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ extern crate env_logger;
44
extern crate rustc;
55
extern crate rustc_driver;
66
extern crate rustc_interface;
7-
extern crate rustc_plugin;
87
extern crate rustc_save_analysis;
98
extern crate syntax;
109

@@ -73,11 +72,10 @@ pub fn run() -> Result<(), ()> {
7372
None => args,
7473
};
7574

76-
rustc_driver::report_ices_to_stderr_if_any(|| {
77-
run_compiler(&args, &mut shim_calls, file_loader, None)
78-
})
79-
.map(|_| ())
80-
.map_err(|_| ())
75+
rustc_driver::install_ice_hook();
76+
rustc_driver::catch_fatal_errors(|| run_compiler(&args, &mut shim_calls, file_loader, None))
77+
.map(|_| ())
78+
.map_err(|_| ())
8179
}
8280

8381
#[derive(Default)]

rls/src/build/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ fn run_in_process(
198198
let result = std::panic::catch_unwind({
199199
let stderr = Arc::clone(&stderr);
200200
|| {
201-
rustc_driver::report_ices_to_stderr_if_any(move || {
201+
rustc_driver::catch_fatal_errors(move || {
202202
// Replace stderr so we catch most errors.
203203
run_compiler(
204204
&args,

tests/client.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,9 +2160,11 @@ fn client_init_impl(convert_case: fn(&str) -> String) {
21602160
.file(
21612161
"src/main.rs",
21622162
r#"
2163+
#![allow(dead_code)]
21632164
struct NonCfg;
21642165
#[cfg(test)]
21652166
struct CfgTest { inner: PathBuf }
2167+
fn main() {}
21662168
"#,
21672169
)
21682170
.build();

0 commit comments

Comments
 (0)