Skip to content

Compiling with --test yields an explicit mode warning on the first token #3633

@gmcabrita

Description

@gmcabrita

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

// extern mod std; 

[4] rustc output

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions