2019-03-12 00:49:17 +00:00
|
|
|
// aux-build:lint-tool-test.rs
|
2018-07-30 09:30:07 +00:00
|
|
|
// ignore-stage1
|
2018-08-30 08:27:35 +00:00
|
|
|
// compile-flags: --cfg foo
|
2018-10-02 08:44:49 +00:00
|
|
|
|
2018-07-30 09:30:07 +00:00
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(lint_tool_test)]
|
2019-10-03 07:33:28 +00:00
|
|
|
//~^ WARN use of deprecated attribute `plugin`
|
2018-07-30 09:30:07 +00:00
|
|
|
#![allow(dead_code)]
|
2018-08-30 08:27:35 +00:00
|
|
|
#![cfg_attr(foo, warn(test_lint))]
|
|
|
|
//~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
|
2020-01-08 17:02:10 +00:00
|
|
|
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
|
|
|
|
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
|
2018-08-27 21:22:47 +00:00
|
|
|
#![deny(clippy_group)]
|
|
|
|
//~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
|
2020-01-08 17:02:10 +00:00
|
|
|
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
|
|
|
|
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
|
2018-07-30 09:30:07 +00:00
|
|
|
|
2018-08-27 21:22:47 +00:00
|
|
|
fn lintme() { } //~ ERROR item is named 'lintme'
|
|
|
|
|
|
|
|
#[allow(clippy::group)]
|
|
|
|
fn lintmetoo() {}
|
2018-07-30 09:30:07 +00:00
|
|
|
|
|
|
|
#[allow(clippy::test_lint)]
|
|
|
|
pub fn main() {
|
|
|
|
fn lintme() { }
|
2018-08-27 21:22:47 +00:00
|
|
|
fn lintmetoo() { } //~ ERROR item is named 'lintmetoo'
|
|
|
|
}
|
|
|
|
|
|
|
|
#[allow(test_group)]
|
|
|
|
//~^ WARNING lint name `test_group` is deprecated and may not have an effect in the future
|
2020-01-08 17:02:10 +00:00
|
|
|
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
|
|
|
|
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
|
2018-08-27 21:22:47 +00:00
|
|
|
#[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
|
|
|
|
fn hello() {
|
|
|
|
fn lintmetoo() { }
|
2018-07-30 09:30:07 +00:00
|
|
|
}
|