mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
e91f32829c
Prevents reporting labels or diagnostics on spans that are produced multiple times.
14 lines
287 B
Rust
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())
|
|
}
|