rust/tests/ui-fulldeps/lint-tool-test.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.4 KiB
Rust
Raw Normal View History

// aux-build:lint-tool-test.rs
// ignore-stage1
2018-08-30 03:27:35 -05:00
// compile-flags: --cfg foo
#![feature(plugin)]
#![plugin(lint_tool_test)]
2019-10-03 02:33:28 -05:00
//~^ WARN use of deprecated attribute `plugin`
#![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-08-27 16:22:47 -05:00
fn lintme() { } //~ ERROR item is named 'lintme'
#[allow(clippy::group)]
fn lintmetoo() {}
#[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() { }
}