summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-4541.rs
blob: e7f26d021515c3b7d217096d8ca2cd1513e2d5c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// run-pass

fn parse_args() -> String {
    let args: Vec<_> = ::std::env::args().collect();
    let mut n = 0;

    while n < args.len() {
        match &*args[n] {
            "-v" => (),
            s => {
                return s.to_string();
            }
        }
        n += 1;
    }

    return "".to_string()
}

pub fn main() {
    println!("{}", parse_args());
}