mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Test that we do not lint for multiple underscores
This commit is contained in:
parent
02cb24de82
commit
c8d78a70b3
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,11 @@ fn unused_underscore(_foo: u32) -> u32 {
|
|||
1
|
||||
}
|
||||
|
||||
///Test that we do not lint for multiple underscores
|
||||
fn multiple_underscores(__x: u32) -> u32 {
|
||||
__x + 1
|
||||
}
|
||||
|
||||
// Non-variable bindings with preceding underscore
|
||||
fn _fn_test() {}
|
||||
struct _StructTest;
|
||||
|
@ -50,6 +55,7 @@ fn main() {
|
|||
// possible false positives
|
||||
let _ = non_prefix_underscore(foo);
|
||||
let _ = unused_underscore(foo);
|
||||
let _ = multiple_underscores(foo);
|
||||
non_variables();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue