diff options
| author | bors <bors@rust-lang.org> | 2018-09-02 02:10:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-02 02:10:33 +0000 |
| commit | 3480ac2a805f8755f41dba2f081446df9d572986 (patch) | |
| tree | 4f34dc9d3443e2553324b079726aa92ac2b4ce97 /src/test | |
| parent | a1a8c444f98e684e39d337aef56401e190ba36e5 (diff) | |
| parent | daa43643b06bf89a183ee9a41d8e50fa80f62c23 (diff) | |
| download | rust-3480ac2a805f8755f41dba2f081446df9d572986.tar.gz rust-3480ac2a805f8755f41dba2f081446df9d572986.zip | |
Auto merge of #53887 - flip1995:tool_lints, r=Manishearth
Fix of bug introduced by #53762 (tool_lints) Before implementing backwards compat for tool lints, the `Tool` case when parsing cmdline lints was unreachable. This changed with #53762. This fix is needed for rls test-pass. (@nrc) r? @Manishearth
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui-fulldeps/lint_tool_cmdline_allow.rs | 23 | ||||
| -rw-r--r-- | src/test/ui-fulldeps/lint_tool_cmdline_allow.stderr | 25 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/test/ui-fulldeps/lint_tool_cmdline_allow.rs b/src/test/ui-fulldeps/lint_tool_cmdline_allow.rs new file mode 100644 index 00000000000..74888d3e140 --- /dev/null +++ b/src/test/ui-fulldeps/lint_tool_cmdline_allow.rs @@ -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() { +} diff --git a/src/test/ui-fulldeps/lint_tool_cmdline_allow.stderr b/src/test/ui-fulldeps/lint_tool_cmdline_allow.stderr new file mode 100644 index 00000000000..c1a9d818746 --- /dev/null +++ b/src/test/ui-fulldeps/lint_tool_cmdline_allow.stderr @@ -0,0 +1,25 @@ +warning: lint name `test_lint` is deprecated 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)] + |
