Compiling with --test yields an explicit mode warning on the first token · Issue #3633 · rust-lang/rust (original) (raw)

Compiling any code[1][3] with the --test flag spits out a warning[2][4] on the first token it finds.

[1] test.rs

extern mod std;

pure fn bigger_than(x: int, y: int) -> bool {
    return x > y
}

#[test]
fn t1() {
    assert bigger_than(5, 3) == true;
}

#[test]
#[should_fail]
fn t2() {
    assert bigger_than(3, 5) == true;
}

[2] rustc output

λ rustc --test test.rs
test.rs:1:0: 1:0 warning: argument 1 uses an explicit mode
test.rs:1 extern mod std;
          ^

[3] test2.rs

[4] rustc output

λ rustc --test test2.rs
test2.rs:1:0: 1:0 warning: argument 1 uses an explicit mode
test2.rs:1 //
           ^