Test that we do not lint for multiple underscores

This commit is contained in:
Devon Hollowood 2015-12-18 13:47:12 -08:00
parent 02cb24de82
commit c8d78a70b3

View File

@ -22,6 +22,11 @@ fn unused_underscore(_foo: u32) -> u32 {
1 1
} }
///Test that we do not lint for multiple underscores
fn multiple_underscores(__x: u32) -> u32 {
__x + 1
}
// Non-variable bindings with preceding underscore // Non-variable bindings with preceding underscore
fn _fn_test() {} fn _fn_test() {}
struct _StructTest; struct _StructTest;
@ -50,6 +55,7 @@ fn main() {
// possible false positives // possible false positives
let _ = non_prefix_underscore(foo); let _ = non_prefix_underscore(foo);
let _ = unused_underscore(foo); let _ = unused_underscore(foo);
let _ = multiple_underscores(foo);
non_variables(); non_variables();
} }