forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change causes unstable lints to be ignored if the `unknown_lints` lint is allowed. To achieve this, it also changes lints to apply as soon as they are processed. Previously, lints in the same set were processed as a batch and then all simultaneously applied. Implementation of rust-lang/compiler-team#469
- Loading branch information
David Koloski
committed
Mar 8, 2022
1 parent
b97dc20
commit 8852752
Showing
10 changed files
with
119 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/test/ui/unknown-unstable-lints/allow-unknown-unstable-lint-command-line.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// check-pass | ||
// compile-flags: -Aunknown_lints -Atest_unstable_lint | ||
|
||
fn main() {} |
5 changes: 5 additions & 0 deletions
5
src/test/ui/unknown-unstable-lints/allow-unknown-unstable-lint-inline.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// check-pass | ||
|
||
#![allow(unknown_lints, test_unstable_lint)] | ||
|
||
fn main() {} |
5 changes: 5 additions & 0 deletions
5
src/test/ui/unknown-unstable-lints/unstable-lint-command-line.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// check-fail | ||
// compile-flags: -Atest_unstable_lint | ||
// error-pattern: the `test_unstable_lint` lint is unstable | ||
|
||
fn main() {} |
11 changes: 11 additions & 0 deletions
11
src/test/ui/unknown-unstable-lints/unstable-lint-command-line.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0658]: the `test_unstable_lint` lint is unstable | ||
| | ||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable | ||
|
||
error[E0658]: the `test_unstable_lint` lint is unstable | ||
| | ||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// check-fail | ||
// error-pattern: the `test_unstable_lint` lint is unstable | ||
|
||
#![allow(test_unstable_lint)] | ||
|
||
fn main() {} |
19 changes: 19 additions & 0 deletions
19
src/test/ui/unknown-unstable-lints/unstable-lint-inline.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0658]: the `test_unstable_lint` lint is unstable | ||
--> $DIR/unstable-lint-inline.rs:4:1 | ||
| | ||
LL | #![allow(test_unstable_lint)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable | ||
|
||
error[E0658]: the `test_unstable_lint` lint is unstable | ||
--> $DIR/unstable-lint-inline.rs:4:1 | ||
| | ||
LL | #![allow(test_unstable_lint)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |