1
Fork 0

Rollup merge of #99360 - compiler-errors:issue-99331, r=fee1-dead

Do not ICE when we have `-Zunpretty=expanded` with invalid ABI

Fixes #99331
This commit is contained in:
Yuki Okushi 2022-07-18 08:40:00 +09:00 committed by GitHub
commit f3a458f735
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 6 deletions

View file

@ -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::*;