]> git.lizzy.rs Git - rust.git/blob - tests/ui/blacklisted_name.rs
rustup and compile-fail -> ui test move
[rust.git] / tests / ui / blacklisted_name.rs
1 #![feature(plugin)]
2 #![plugin(clippy)]
3
4 #![allow(dead_code)]
5 #![allow(single_match)]
6 #![allow(unused_variables, similar_names)]
7 #![deny(blacklisted_name)]
8
9 fn test(foo: ()) {} //~ERROR use of a blacklisted/placeholder name `foo`
10
11 fn main() {
12     let foo = 42; //~ERROR use of a blacklisted/placeholder name `foo`
13     let bar = 42; //~ERROR use of a blacklisted/placeholder name `bar`
14     let baz = 42; //~ERROR use of a blacklisted/placeholder name `baz`
15
16     let barb = 42;
17     let barbaric = 42;
18
19     match (42, Some(1337), Some(0)) {
20         (foo, Some(bar), baz @ Some(_)) => (),
21         //~^ ERROR use of a blacklisted/placeholder name `foo`
22         //~| ERROR use of a blacklisted/placeholder name `bar`
23         //~| ERROR use of a blacklisted/placeholder name `baz`
24         _ => (),
25     }
26 }