1
Fork 0

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

This commit is contained in:
Michael Goulet 2022-07-16 20:35:54 -07:00
parent d5e7f4782e
commit 26ecd44160
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::*;