rust/src/test/ui/match/issue-74050-end-span.rs
Ayaz Hafiz 3c63fba03d
Correctly mark the ending span of a match arm
Closes #74050

r? @matthewjasper
2020-07-08 07:28:07 -07:00

14 lines
321 B
Rust

fn main() {
let mut args = std::env::args_os();
let _arg = match args.next() {
Some(arg) => {
match arg.to_str() {
//~^ ERROR `arg` does not live long enough
Some(s) => s,
None => return,
}
}
None => return,
};
}