about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-10-16 22:11:57 +0200
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-10-25 23:23:04 +0200
commitebe63cde53a8bc1a6e7fcde8b6c3dc9f51b1831b (patch)
tree7c6fcd411cf2f03f276cb0d6d17d2f353837099e /src
parent1ffd09af2975b940fc83ad1dc6ee17ff36e564ba (diff)
downloadrust-ebe63cde53a8bc1a6e7fcde8b6c3dc9f51b1831b.tar.gz
rust-ebe63cde53a8bc1a6e7fcde8b6c3dc9f51b1831b.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/driver.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/driver.rs b/src/driver.rs
index d47767faed9..3876da150c5 100644
--- a/src/driver.rs
+++ b/src/driver.rs
@@ -178,7 +178,7 @@ pub fn main() {
 
     rustc_driver::init_rustc_env_logger(&handler);
 
-    rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| {
+    let using_internal_features = rustc_driver::install_ice_hook(BUG_REPORT_URL, |handler| {
         // FIXME: this macro calls unwrap internally but is called in a panicking context!  It's not
         // as simple as moving the call from the hook to main, because `install_ice_hook` doesn't
         // accept a generic closure.
@@ -265,9 +265,11 @@ pub fn main() {
         let clippy_enabled = !cap_lints_allow && (!no_deps || in_primary_package);
         if clippy_enabled {
             args.extend(clippy_args);
-            rustc_driver::RunCompiler::new(&args, &mut ClippyCallbacks { clippy_args_var }).run()
+            rustc_driver::RunCompiler::new(&args, &mut ClippyCallbacks { clippy_args_var })
+                .set_using_internal_features(using_internal_features).run()
         } else {
-            rustc_driver::RunCompiler::new(&args, &mut RustcCallbacks { clippy_args_var }).run()
+            rustc_driver::RunCompiler::new(&args, &mut RustcCallbacks { clippy_args_var })
+                .set_using_internal_features(using_internal_features).run()
         }
     }))
 }