mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
rustc_lint: Prevent triplication of 'unknown lint' lint
This commit is contained in:
parent
741884dab2
commit
7ca4e9fcb2
@ -1054,33 +1054,33 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
|||||||
/// Checks if the lint is gated on a feature that is not enabled.
|
/// Checks if the lint is gated on a feature that is not enabled.
|
||||||
///
|
///
|
||||||
/// Returns `true` if the lint's feature is enabled.
|
/// Returns `true` if the lint's feature is enabled.
|
||||||
// FIXME only emit this once for each attribute, instead of repeating it 4 times for
|
|
||||||
// pre-expansion lints, post-expansion lints, `shallow_lint_levels_on` and `lint_expectations`.
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
fn check_gated_lint(&self, lint_id: LintId, span: Span, lint_from_cli: bool) -> bool {
|
fn check_gated_lint(&self, lint_id: LintId, span: Span, lint_from_cli: bool) -> bool {
|
||||||
if let Some(feature) = lint_id.lint.feature_gate {
|
if let Some(feature) = lint_id.lint.feature_gate {
|
||||||
if !self.features.active(feature) {
|
if !self.features.active(feature) {
|
||||||
let lint = builtin::UNKNOWN_LINTS;
|
if self.lint_added_lints {
|
||||||
let (level, src) = self.lint_level(builtin::UNKNOWN_LINTS);
|
let lint = builtin::UNKNOWN_LINTS;
|
||||||
struct_lint_level(
|
let (level, src) = self.lint_level(builtin::UNKNOWN_LINTS);
|
||||||
self.sess,
|
struct_lint_level(
|
||||||
lint,
|
self.sess,
|
||||||
level,
|
lint,
|
||||||
src,
|
level,
|
||||||
Some(span.into()),
|
src,
|
||||||
fluent::lint_unknown_gated_lint,
|
Some(span.into()),
|
||||||
|lint| {
|
fluent::lint_unknown_gated_lint,
|
||||||
lint.set_arg("name", lint_id.lint.name_lower());
|
|lint| {
|
||||||
lint.note(fluent::lint_note);
|
lint.set_arg("name", lint_id.lint.name_lower());
|
||||||
rustc_session::parse::add_feature_diagnostics_for_issue(
|
lint.note(fluent::lint_note);
|
||||||
lint,
|
rustc_session::parse::add_feature_diagnostics_for_issue(
|
||||||
&self.sess.parse_sess,
|
lint,
|
||||||
feature,
|
&self.sess.parse_sess,
|
||||||
GateIssue::Language,
|
feature,
|
||||||
lint_from_cli,
|
GateIssue::Language,
|
||||||
);
|
lint_from_cli,
|
||||||
},
|
);
|
||||||
);
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
#![deny(multiple_supertrait_upcastable)]
|
#![deny(multiple_supertrait_upcastable)]
|
||||||
//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
|
//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
|
||||||
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
|
|
||||||
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
|
|
||||||
#![warn(multiple_supertrait_upcastable)]
|
#![warn(multiple_supertrait_upcastable)]
|
||||||
//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
|
//~^ WARNING unknown lint: `multiple_supertrait_upcastable`
|
||||||
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
|
|
||||||
//~| WARNING unknown lint: `multiple_supertrait_upcastable`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -9,7 +9,7 @@ LL | #![deny(multiple_supertrait_upcastable)]
|
|||||||
= note: `#[warn(unknown_lints)]` on by default
|
= note: `#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
warning: unknown lint: `multiple_supertrait_upcastable`
|
warning: unknown lint: `multiple_supertrait_upcastable`
|
||||||
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
|
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:5:1
|
||||||
|
|
|
|
||||||
LL | #![warn(multiple_supertrait_upcastable)]
|
LL | #![warn(multiple_supertrait_upcastable)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -17,45 +17,5 @@ LL | #![warn(multiple_supertrait_upcastable)]
|
|||||||
= note: the `multiple_supertrait_upcastable` lint is unstable
|
= note: the `multiple_supertrait_upcastable` lint is unstable
|
||||||
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
|
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
|
||||||
|
|
||||||
warning: unknown lint: `multiple_supertrait_upcastable`
|
warning: 2 warnings emitted
|
||||||
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![deny(multiple_supertrait_upcastable)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `multiple_supertrait_upcastable` lint is unstable
|
|
||||||
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `multiple_supertrait_upcastable`
|
|
||||||
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
|
|
||||||
|
|
|
||||||
LL | #![warn(multiple_supertrait_upcastable)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `multiple_supertrait_upcastable` lint is unstable
|
|
||||||
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `multiple_supertrait_upcastable`
|
|
||||||
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![deny(multiple_supertrait_upcastable)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `multiple_supertrait_upcastable` lint is unstable
|
|
||||||
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `multiple_supertrait_upcastable`
|
|
||||||
--> $DIR/feature-gate-multiple_supertrait_upcastable.rs:7:1
|
|
||||||
|
|
|
||||||
LL | #![warn(multiple_supertrait_upcastable)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `multiple_supertrait_upcastable` lint is unstable
|
|
||||||
= help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: 6 warnings emitted
|
|
||||||
|
|
||||||
|
@ -2,12 +2,8 @@
|
|||||||
|
|
||||||
#![deny(non_exhaustive_omitted_patterns)]
|
#![deny(non_exhaustive_omitted_patterns)]
|
||||||
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
#![allow(non_exhaustive_omitted_patterns)]
|
#![allow(non_exhaustive_omitted_patterns)]
|
||||||
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
enum Foo {
|
enum Foo {
|
||||||
@ -19,9 +15,6 @@ fn main() {
|
|||||||
#[allow(non_exhaustive_omitted_patterns)]
|
#[allow(non_exhaustive_omitted_patterns)]
|
||||||
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
match Foo::A {
|
match Foo::A {
|
||||||
//~^ ERROR non-exhaustive patterns: `Foo::C` not covered
|
//~^ ERROR non-exhaustive patterns: `Foo::C` not covered
|
||||||
Foo::A => {}
|
Foo::A => {}
|
||||||
@ -31,9 +24,6 @@ fn main() {
|
|||||||
#[warn(non_exhaustive_omitted_patterns)]
|
#[warn(non_exhaustive_omitted_patterns)]
|
||||||
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
//~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
match Foo::A {
|
match Foo::A {
|
||||||
Foo::A => {}
|
Foo::A => {}
|
||||||
Foo::B => {}
|
Foo::B => {}
|
||||||
|
@ -10,7 +10,7 @@ LL | #![deny(non_exhaustive_omitted_patterns)]
|
|||||||
= note: `#[warn(unknown_lints)]` on by default
|
= note: `#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
|
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:5:1
|
||||||
|
|
|
|
||||||
LL | #![allow(non_exhaustive_omitted_patterns)]
|
LL | #![allow(non_exhaustive_omitted_patterns)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -20,7 +20,7 @@ LL | #![allow(non_exhaustive_omitted_patterns)]
|
|||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
|
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
|
||||||
|
|
|
|
||||||
LL | #[allow(non_exhaustive_omitted_patterns)]
|
LL | #[allow(non_exhaustive_omitted_patterns)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -30,7 +30,7 @@ LL | #[allow(non_exhaustive_omitted_patterns)]
|
|||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
|
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
|
||||||
|
|
|
|
||||||
LL | #[allow(non_exhaustive_omitted_patterns)]
|
LL | #[allow(non_exhaustive_omitted_patterns)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -41,7 +41,7 @@ LL | #[allow(non_exhaustive_omitted_patterns)]
|
|||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
|
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:24:5
|
||||||
|
|
|
|
||||||
LL | #[warn(non_exhaustive_omitted_patterns)]
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -51,73 +51,7 @@ LL | #[warn(non_exhaustive_omitted_patterns)]
|
|||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
|
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:24:5
|
||||||
|
|
|
||||||
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![deny(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
|
|
||||||
|
|
|
||||||
LL | #![allow(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
|
|
||||||
|
|
|
||||||
LL | #[allow(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
|
|
||||||
|
|
|
||||||
LL | #[allow(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
|
|
||||||
|
|
|
||||||
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
|
|
||||||
|
|
|
|
||||||
LL | #[warn(non_exhaustive_omitted_patterns)]
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -128,13 +62,13 @@ LL | #[warn(non_exhaustive_omitted_patterns)]
|
|||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
|
|
||||||
error[E0004]: non-exhaustive patterns: `Foo::C` not covered
|
error[E0004]: non-exhaustive patterns: `Foo::C` not covered
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:25:11
|
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:18:11
|
||||||
|
|
|
|
||||||
LL | match Foo::A {
|
LL | match Foo::A {
|
||||||
| ^^^^^^ pattern `Foo::C` not covered
|
| ^^^^^^ pattern `Foo::C` not covered
|
||||||
|
|
|
|
||||||
note: `Foo` defined here
|
note: `Foo` defined here
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:13:10
|
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:9:10
|
||||||
|
|
|
|
||||||
LL | enum Foo {
|
LL | enum Foo {
|
||||||
| ^^^
|
| ^^^
|
||||||
@ -148,50 +82,6 @@ LL ~ Foo::B => {},
|
|||||||
LL + Foo::C => todo!()
|
LL + Foo::C => todo!()
|
||||||
|
|
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
error: aborting due to 1 previous error; 6 warnings emitted
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![deny(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
|
|
||||||
|
|
|
||||||
LL | #![allow(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
|
|
||||||
|
|
|
||||||
LL | #[allow(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `non_exhaustive_omitted_patterns`
|
|
||||||
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
|
|
||||||
|
|
|
||||||
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `non_exhaustive_omitted_patterns` lint is unstable
|
|
||||||
= note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
|
|
||||||
= help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
error: aborting due to 1 previous error; 16 warnings emitted
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0004`.
|
For more information about this error, try `rustc --explain E0004`.
|
||||||
|
@ -2,12 +2,8 @@
|
|||||||
|
|
||||||
#![deny(fuzzy_provenance_casts)]
|
#![deny(fuzzy_provenance_casts)]
|
||||||
//~^ WARNING unknown lint: `fuzzy_provenance_casts`
|
//~^ WARNING unknown lint: `fuzzy_provenance_casts`
|
||||||
//~| WARNING unknown lint: `fuzzy_provenance_casts`
|
|
||||||
//~| WARNING unknown lint: `fuzzy_provenance_casts`
|
|
||||||
#![deny(lossy_provenance_casts)]
|
#![deny(lossy_provenance_casts)]
|
||||||
//~^ WARNING unknown lint: `lossy_provenance_casts`
|
//~^ WARNING unknown lint: `lossy_provenance_casts`
|
||||||
//~| WARNING unknown lint: `lossy_provenance_casts`
|
|
||||||
//~| WARNING unknown lint: `lossy_provenance_casts`
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// no warnings emitted since the lints are not activated
|
// no warnings emitted since the lints are not activated
|
||||||
|
@ -10,7 +10,7 @@ LL | #![deny(fuzzy_provenance_casts)]
|
|||||||
= note: `#[warn(unknown_lints)]` on by default
|
= note: `#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
warning: unknown lint: `lossy_provenance_casts`
|
warning: unknown lint: `lossy_provenance_casts`
|
||||||
--> $DIR/feature-gate-strict_provenance.rs:7:1
|
--> $DIR/feature-gate-strict_provenance.rs:5:1
|
||||||
|
|
|
|
||||||
LL | #![deny(lossy_provenance_casts)]
|
LL | #![deny(lossy_provenance_casts)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@ -19,49 +19,5 @@ LL | #![deny(lossy_provenance_casts)]
|
|||||||
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
|
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
|
||||||
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
|
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
|
||||||
|
|
||||||
warning: unknown lint: `fuzzy_provenance_casts`
|
warning: 2 warnings emitted
|
||||||
--> $DIR/feature-gate-strict_provenance.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![deny(fuzzy_provenance_casts)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `fuzzy_provenance_casts` lint is unstable
|
|
||||||
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
|
|
||||||
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `lossy_provenance_casts`
|
|
||||||
--> $DIR/feature-gate-strict_provenance.rs:7:1
|
|
||||||
|
|
|
||||||
LL | #![deny(lossy_provenance_casts)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `lossy_provenance_casts` lint is unstable
|
|
||||||
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
|
|
||||||
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `fuzzy_provenance_casts`
|
|
||||||
--> $DIR/feature-gate-strict_provenance.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![deny(fuzzy_provenance_casts)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `fuzzy_provenance_casts` lint is unstable
|
|
||||||
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
|
|
||||||
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `lossy_provenance_casts`
|
|
||||||
--> $DIR/feature-gate-strict_provenance.rs:7:1
|
|
||||||
|
|
|
||||||
LL | #![deny(lossy_provenance_casts)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `lossy_provenance_casts` lint is unstable
|
|
||||||
= note: see issue #95228 <https://github.com/rust-lang/rust/issues/95228> for more information
|
|
||||||
= help: add `#![feature(strict_provenance)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: 6 warnings emitted
|
|
||||||
|
|
||||||
|
@ -3,7 +3,5 @@
|
|||||||
// `test_unstable_lint` is for testing and should never be stabilized.
|
// `test_unstable_lint` is for testing and should never be stabilized.
|
||||||
#![allow(test_unstable_lint)]
|
#![allow(test_unstable_lint)]
|
||||||
//~^ WARNING unknown lint: `test_unstable_lint`
|
//~^ WARNING unknown lint: `test_unstable_lint`
|
||||||
//~| WARNING unknown lint: `test_unstable_lint`
|
|
||||||
//~| WARNING unknown lint: `test_unstable_lint`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -8,25 +8,5 @@ LL | #![allow(test_unstable_lint)]
|
|||||||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
||||||
= note: `#[warn(unknown_lints)]` on by default
|
= note: `#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
warning: unknown lint: `test_unstable_lint`
|
warning: 1 warning emitted
|
||||||
--> $DIR/feature-gate-test_unstable_lint.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![allow(test_unstable_lint)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `test_unstable_lint`
|
|
||||||
--> $DIR/feature-gate-test_unstable_lint.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![allow(test_unstable_lint)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
#![warn(unnameable_types)] //~ WARN unknown lint
|
#![warn(unnameable_types)] //~ WARN unknown lint
|
||||||
//~| WARN unknown lint
|
|
||||||
//~| WARN unknown lint
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -9,27 +9,5 @@ LL | #![warn(unnameable_types)]
|
|||||||
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
|
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
|
||||||
= note: `#[warn(unknown_lints)]` on by default
|
= note: `#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
warning: unknown lint: `unnameable_types`
|
warning: 1 warning emitted
|
||||||
--> $DIR/feature-gate-type_privacy_lints.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![warn(unnameable_types)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `unnameable_types` lint is unstable
|
|
||||||
= note: see issue #48054 <https://github.com/rust-lang/rust/issues/48054> for more information
|
|
||||||
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `unnameable_types`
|
|
||||||
--> $DIR/feature-gate-type_privacy_lints.rs:3:1
|
|
||||||
|
|
|
||||||
LL | #![warn(unnameable_types)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `unnameable_types` lint is unstable
|
|
||||||
= note: see issue #48054 <https://github.com/rust-lang/rust/issues/48054> for more information
|
|
||||||
= help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
|
||||||
|
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
// edition:2018
|
// edition:2018
|
||||||
#![deny(must_not_suspend)]
|
#![deny(must_not_suspend)]
|
||||||
//~^ WARNING unknown lint: `must_not_suspend`
|
//~^ WARNING unknown lint: `must_not_suspend`
|
||||||
//~| WARNING unknown lint: `must_not_suspend`
|
|
||||||
//~| WARNING unknown lint: `must_not_suspend`
|
|
||||||
|
|
||||||
async fn other() {}
|
async fn other() {}
|
||||||
|
|
||||||
|
@ -9,27 +9,5 @@ LL | #![deny(must_not_suspend)]
|
|||||||
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
|
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
|
||||||
= note: `#[warn(unknown_lints)]` on by default
|
= note: `#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
warning: unknown lint: `must_not_suspend`
|
warning: 1 warning emitted
|
||||||
--> $DIR/gated.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![deny(must_not_suspend)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `must_not_suspend` lint is unstable
|
|
||||||
= note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information
|
|
||||||
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `must_not_suspend`
|
|
||||||
--> $DIR/gated.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![deny(must_not_suspend)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `must_not_suspend` lint is unstable
|
|
||||||
= note: see issue #83310 <https://github.com/rust-lang/rust/issues/83310> for more information
|
|
||||||
= help: add `#![feature(must_not_suspend)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
|
||||||
|
|
||||||
|
@ -4,17 +4,5 @@ error: unknown lint: `test_unstable_lint`
|
|||||||
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
||||||
= note: requested on the command line with `-D unknown-lints`
|
= note: requested on the command line with `-D unknown-lints`
|
||||||
|
|
||||||
error: unknown lint: `test_unstable_lint`
|
error: aborting due to 1 previous error
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
error: unknown lint: `test_unstable_lint`
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
|
||||||
|
|
||||||
|
@ -3,7 +3,5 @@
|
|||||||
#![deny(unknown_lints)]
|
#![deny(unknown_lints)]
|
||||||
#![allow(test_unstable_lint)]
|
#![allow(test_unstable_lint)]
|
||||||
//~^ ERROR unknown lint: `test_unstable_lint`
|
//~^ ERROR unknown lint: `test_unstable_lint`
|
||||||
//~| ERROR unknown lint: `test_unstable_lint`
|
|
||||||
//~| ERROR unknown lint: `test_unstable_lint`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -12,25 +12,5 @@ note: the lint level is defined here
|
|||||||
LL | #![deny(unknown_lints)]
|
LL | #![deny(unknown_lints)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: unknown lint: `test_unstable_lint`
|
error: aborting due to 1 previous error
|
||||||
--> $DIR/deny-unstable-lint-inline.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![allow(test_unstable_lint)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
error: unknown lint: `test_unstable_lint`
|
|
||||||
--> $DIR/deny-unstable-lint-inline.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![allow(test_unstable_lint)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
|
||||||
|
|
||||||
|
@ -4,17 +4,5 @@ warning: unknown lint: `test_unstable_lint`
|
|||||||
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
||||||
= note: requested on the command line with `-W unknown-lints`
|
= note: requested on the command line with `-W unknown-lints`
|
||||||
|
|
||||||
warning: unknown lint: `test_unstable_lint`
|
warning: 1 warning emitted
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `test_unstable_lint`
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
|
||||||
|
|
||||||
|
@ -3,7 +3,5 @@
|
|||||||
#![warn(unknown_lints)]
|
#![warn(unknown_lints)]
|
||||||
#![allow(test_unstable_lint)]
|
#![allow(test_unstable_lint)]
|
||||||
//~^ WARNING unknown lint: `test_unstable_lint`
|
//~^ WARNING unknown lint: `test_unstable_lint`
|
||||||
//~| WARNING unknown lint: `test_unstable_lint`
|
|
||||||
//~| WARNING unknown lint: `test_unstable_lint`
|
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -12,25 +12,5 @@ note: the lint level is defined here
|
|||||||
LL | #![warn(unknown_lints)]
|
LL | #![warn(unknown_lints)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: unknown lint: `test_unstable_lint`
|
warning: 1 warning emitted
|
||||||
--> $DIR/warn-unknown-unstable-lint-inline.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![allow(test_unstable_lint)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: unknown lint: `test_unstable_lint`
|
|
||||||
--> $DIR/warn-unknown-unstable-lint-inline.rs:4:1
|
|
||||||
|
|
|
||||||
LL | #![allow(test_unstable_lint)]
|
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
|
||||||
= note: the `test_unstable_lint` lint is unstable
|
|
||||||
= help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user