1
Fork 0

Add tests for cmdline tool lints

This commit is contained in:
flip1995 2018-09-01 18:06:36 +02:00
parent 798a20740e
commit 6a317be5c8
No known key found for this signature in database
GPG key ID: ECF9412261FAA470
2 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,23 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// aux-build:lint_tool_test.rs
// ignore-stage1
// compile-flags: -A test-lint
#![feature(plugin)]
#![warn(unused)]
#![plugin(lint_tool_test)]
fn lintme() { }
pub fn main() {
}

View file

@ -0,0 +1,25 @@
warning: lint name `test_lint` is deprcated and does not have an effect anymore. Use: clippy::test_lint
|
= note: requested on the command line with `-A test_lint`
warning: item is named 'lintme'
--> $DIR/lint_tool_cmdline_allow.rs:20:1
|
LL | fn lintme() { }
| ^^^^^^^^^^^^^^^
|
= note: #[warn(clippy::test_lint)] on by default
warning: function is never used: `lintme`
--> $DIR/lint_tool_cmdline_allow.rs:20:1
|
LL | fn lintme() { }
| ^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/lint_tool_cmdline_allow.rs:17:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: #[warn(dead_code)] implied by #[warn(unused)]