ICE: Lint: Diagnostic "literal out of range" crashes if the source is not available #128445
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Found by grepping through the compiler via
rg 'span_to_snippet.+?(expect|unwrap)\(' compiler
while reviewing an unrelated PR.rust/compiler/rustc_lint/src/types.rs
Line 466 in 83734f2
Reproducer
File
a.rs
:File
b.rs
:a.rs
:rustc a.rs --crate-type=lib
.a.rs
.b.rs
:rustc b.rs -L. --extern a --edition=2021
.Compiler Output
Full compiler output
Meta
rustc -Vv
:The text was updated successfully, but these errors were encountered: