]> git.lizzy.rs Git - rust.git/blob - tests/ui-fulldeps/lint-tool-test.rs
Extend `BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE`.
[rust.git] / tests / 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 #![deny(clippy_group)]
14 //~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
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
18 fn lintme() { } //~ ERROR item is named 'lintme'
19
20 #[allow(clippy::group)]
21 fn lintmetoo() {}
22
23 #[allow(clippy::test_lint)]
24 pub fn main() {
25     fn lintme() { }
26     fn lintmetoo() { } //~ ERROR item is named 'lintmetoo'
27 }
28
29 #[allow(test_group)]
30 //~^ WARNING lint name `test_group` is deprecated and may not have an effect in the future
31 //~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
32 //~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
33 #[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
34 fn hello() {
35     fn lintmetoo() { }
36 }