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.
This commit is contained in:
parent
98c1e3d95b
commit
9d42b1e268
15 changed files with 121 additions and 27 deletions
|
@ -23,6 +23,7 @@ use rustc_span::source_map::{FileLoader, FileName};
|
|||
use rustc_span::symbol::sym;
|
||||
use std::path::PathBuf;
|
||||
use std::result;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub type Result<T> = result::Result<T, ErrorGuaranteed>;
|
||||
|
||||
|
@ -280,6 +281,12 @@ pub struct Config {
|
|||
/// Registry of diagnostics codes.
|
||||
pub registry: Registry,
|
||||
|
||||
/// The inner atomic value is set to true when a feature marked as `internal` is
|
||||
/// enabled. Makes it so that "please report a bug" is hidden, as ICEs with
|
||||
/// internal features are wontfix, and they are usually the cause of the ICEs.
|
||||
/// None signifies that this is not tracked.
|
||||
pub using_internal_features: Arc<std::sync::atomic::AtomicBool>,
|
||||
|
||||
/// All commandline args used to invoke the compiler, with @file args fully expanded.
|
||||
/// This will only be used within debug info, e.g. in the pdb file on windows
|
||||
/// This is mainly useful for other tools that reads that debuginfo to figure out
|
||||
|
@ -323,6 +330,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
|
|||
config.make_codegen_backend,
|
||||
registry.clone(),
|
||||
config.ice_file,
|
||||
config.using_internal_features,
|
||||
config.expanded_args,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue