diff options
| author | Michael Goulet <michael@errs.io> | 2022-07-16 20:35:54 -0700 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-07-16 20:35:54 -0700 |
| commit | 26ecd44160f54395b3bd5558cc5352f49cb0a0ba (patch) | |
| tree | aae723fa686a9e3a00667018b7435fcbbc761b81 /compiler/rustc_session/src | |
| parent | d5e7f4782e4b699728d0a08200ecd1a54d56a85d (diff) | |
| download | rust-26ecd44160f54395b3bd5558cc5352f49cb0a0ba.tar.gz rust-26ecd44160f54395b3bd5558cc5352f49cb0a0ba.zip | |
Do not ICE when we have -Zunpretty=expand with invalid ABI
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 0e52bf34661..55307b9cebb 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -2707,6 +2707,14 @@ impl PpMode { | MirCFG => true, } } + pub fn needs_hir(&self) -> bool { + use PpMode::*; + match *self { + Source(_) | AstTree(_) => false, + + Hir(_) | HirTree | ThirTree | Mir | MirCFG => true, + } + } pub fn needs_analysis(&self) -> bool { use PpMode::*; |
