Skip to content

Commit ebe63cd

Browse files
committed
Stop telling people to submit bugs for internal feature ICEs
This keeps track of usage of internal features, and changes the message to instead tell them that using internal features is not supported. See MCP 620.
1 parent 1ffd09a commit ebe63cd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/driver.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub fn main() {
178178

179179
rustc_driver::init_rustc_env_logger(&handler);
180180

181-
rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| {
181+
let using_internal_features = rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| {
182182
// FIXME: this macro calls unwrap internally but is called in a panicking context! It's not
183183
// as simple as moving the call from the hook to main, because `install_ice_hook` doesn't
184184
// accept a generic closure.
@@ -265,9 +265,11 @@ pub fn main() {
265265
let clippy_enabled = !cap_lints_allow && (!no_deps || in_primary_package);
266266
if clippy_enabled {
267267
args.extend(clippy_args);
268-
rustc_driver::RunCompiler::new(&args, &mut ClippyCallbacks { clippy_args_var }).run()
268+
rustc_driver::RunCompiler::new(&args, &mut ClippyCallbacks { clippy_args_var })
269+
.set_using_internal_features(using_internal_features).run()
269270
} else {
270-
rustc_driver::RunCompiler::new(&args, &mut RustcCallbacks { clippy_args_var }).run()
271+
rustc_driver::RunCompiler::new(&args, &mut RustcCallbacks { clippy_args_var })
272+
.set_using_internal_features(using_internal_features).run()
271273
}
272274
}))
273275
}

0 commit comments

Comments
 (0)