summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/issue-74050-end-span.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/match/issue-74050-end-span.rs')
-rw-r--r--src/test/ui/match/issue-74050-end-span.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/match/issue-74050-end-span.rs b/src/test/ui/match/issue-74050-end-span.rs
new file mode 100644
index 000000000..cc81214e2
--- /dev/null
+++ b/src/test/ui/match/issue-74050-end-span.rs
@@ -0,0 +1,13 @@
+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,
+ };
+}