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