]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-4541.rs
Rollup merge of #65613 - Mark-Simulacrum:rustdoc-preserve-ws, r=GuillaumeGomez
[rust.git] / src / test / ui / issues / issue-4541.rs
1 // run-pass
2 // ignore-cloudabi no std::env
3
4 fn parse_args() -> String {
5     let args: Vec<_> = ::std::env::args().collect();
6     let mut n = 0;
7
8     while n < args.len() {
9         match &*args[n] {
10             "-v" => (),
11             s => {
12                 return s.to_string();
13             }
14         }
15         n += 1;
16     }
17
18     return "".to_string()
19 }
20
21 pub fn main() {
22     println!("{}", parse_args());
23 }