]> git.lizzy.rs Git - rust.git/blob - tests/ui/blacklisted_name.rs
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / blacklisted_name.rs
1 #![feature(tool_lints)]
2
3
4 #![allow(dead_code, clippy::similar_names, clippy::single_match, clippy::toplevel_ref_arg, unused_mut, unused_variables)]
5 #![warn(clippy::blacklisted_name)]
6
7 fn test(foo: ()) {}
8
9 fn main() {
10     let foo = 42;
11     let bar = 42;
12     let baz = 42;
13
14     let barb = 42;
15     let barbaric = 42;
16
17     match (42, Some(1337), Some(0)) {
18         (foo, Some(bar), baz @ Some(_)) => (),
19         _ => (),
20     }
21 }
22
23 fn issue_1647(mut foo: u8) {
24     let mut bar = 0;
25     if let Some(mut baz) = Some(42) {}
26 }
27
28 fn issue_1647_ref() {
29     let ref bar = 0;
30     if let Some(ref baz) = Some(42) {}
31 }
32
33 fn issue_1647_ref_mut() {
34     let ref mut bar = 0;
35     if let Some(ref mut baz) = Some(42) {}
36 }