ICE: 'trimmed_def_paths constructed but no error emitted' in THIR unsafety checker #106126
Labels
-Zthir-unsafeck
Unstable option: THIR unsafeck
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
In some external crate, say
macro_foo
:Main crate:
Meta
rustc --version --verbose
:Error output
With
-Zthir-unsafeck
, this gives the following ICE:Backtrace
This is because the
unsafe_op_in_unsafe_fn
lint callsdef_path_str
to insert the name in the diagnostic message (this delays a good path bug), then the lint gets cancelled because it's in an external macro, which means we don't emit any diagnostic which triggers the good path bug.This ICE is currently preventing rustc from building
std
with-Zthir-unsafeck
enabled.I see several ways to fix this:
@rustbot label +A-diagnostics +requires-nightly
@rusbot claim
The text was updated successfully, but these errors were encountered: