rust/tests/ui-fulldeps/stable-mir
Nicholas Nethercote e72e7e9ae3 Merge CompilerError::CompilationFailed and CompilerError::ICE.
`CompilerError` has `CompilationFailed` and `ICE` variants, which seems
reasonable at first. But the way it identifies them is flawed:
- If compilation errors out, i.e. `RunCompiler::run` returns an `Err`,
  it uses `CompilationFailed`, which is reasonable.
- If compilation panics with `FatalError`, it catches the panic and uses
  `ICE`. This is sometimes right, because ICEs do cause `FatalError`
  panics, but sometimes wrong, because certain compiler errors also
  cause `FatalError` panics. (The compiler/rustdoc/clippy/whatever just
  catches the `FatalError` with `catch_with_exit_code` in `main`.)

In other words, certain non-ICE compilation failures get miscategorized
as ICEs. It's not possible to reliably distinguish the two cases, so
this commit merges them. It also renames the combined variant as just
`Failed`, to better match the existing `Interrupted` and `Skipped`
variants.

Here is an example of a non-ICE failure that causes a `FatalError`
panic, from `tests/ui/recursion_limit/issue-105700.rs`:
```
 #![recursion_limit="4"]
 #![invalid_attribute]
 #![invalid_attribute]
 #![invalid_attribute]
 #![invalid_attribute]
 #![invalid_attribute]
 //~^ERROR recursion limit reached while expanding

 fn main() {{}}
```
2024-02-17 09:40:44 +11:00
..
check_abi.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
check_allocation.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
check_defs.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
check_foreign.rs Rewrite foreign item kind query using DefKind 2024-02-14 17:38:36 +00:00
check_instance.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
check_item_kind.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
check_trait_queries.rs Remove tcx function and make internal fn safer 2024-01-16 14:35:18 -08:00
check_ty_fold.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
compilation-result.rs Merge CompilerError::CompilationFailed and CompilerError::ICE. 2024-02-17 09:40:44 +11:00
crate-info.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
projections.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00
smir_internal.rs Ensure internal function is safe 2024-01-19 10:00:32 +00:00
smir_visitor.rs Remove tcx from SMIR run macro and accept closures 2024-01-16 11:17:51 -08:00