rust/tests/ui/duplicate-label-E0381-issue-129274.rs
Stephen Lazaro e91f32829c Deduplicate Spans in Uninitialized Check
Prevents reporting labels or diagnostics on spans that are produced
multiple times.
2024-08-22 09:36:14 -07:00

14 lines
287 B
Rust

fn main() {
fn test() {
loop {
let blah: Option<String>;
if true {
blah = Some("".to_string());
}
if let Some(blah) = blah.as_ref() { //~ ERROR E0381
}
}
}
println!("{:?}", test())
}