]> git.lizzy.rs Git - rust.git/blob - src/test/ui-fulldeps/lint-tool-test.rs
Rollup merge of #102940 - ehuss:update-books, r=ehuss
[rust.git] / src / test / ui-fulldeps / lint-tool-test.rs
1 // aux-build:lint-tool-test.rs
2 // ignore-stage1
3 // compile-flags: --cfg foo
4
5 #![feature(plugin)]
6 #![plugin(lint_tool_test)]
7 //~^ WARN use of deprecated attribute `plugin`
8 #![allow(dead_code)]
9 #![cfg_attr(foo, warn(test_lint))]
10 //~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
11 //~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
12 //~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
13 //~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
14 #![deny(clippy_group)]
15 //~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
16 //~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
17 //~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
18 //~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
19
20 fn lintme() { } //~ ERROR item is named 'lintme'
21
22 #[allow(clippy::group)]
23 fn lintmetoo() {}
24
25 #[allow(clippy::test_lint)]
26 pub fn main() {
27     fn lintme() { }
28     fn lintmetoo() { } //~ ERROR item is named 'lintmetoo'
29 }
30
31 #[allow(test_group)]
32 //~^ WARNING lint name `test_group` is deprecated and may not have an effect in the future
33 //~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
34 //~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
35 //~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
36 #[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
37 fn hello() {
38     fn lintmetoo() { }
39 }