diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-09-10 20:43:13 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-09-11 13:36:42 +0200 |
| commit | 89fb34fea79fd803c9ea8a333a18ccb32e0c991d (patch) | |
| tree | c0223c5fafd66a1c4e2faa56fb0d8ce2af814a48 /compiler/rustc_session/src | |
| parent | cf8e5d1bc969987aba074bd7f4b01565badca434 (diff) | |
| download | rust-89fb34fea79fd803c9ea8a333a18ccb32e0c991d.tar.gz rust-89fb34fea79fd803c9ea8a333a18ccb32e0c991d.zip | |
Turn unstable trait impl error into a lint, so it can be disabled.
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/lint/builtin.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/lint/builtin.rs b/compiler/rustc_session/src/lint/builtin.rs index a9deaaae0da..0fd6cc10382 100644 --- a/compiler/rustc_session/src/lint/builtin.rs +++ b/compiler/rustc_session/src/lint/builtin.rs @@ -5,7 +5,7 @@ //! lints are all available in `rustc_lint::builtin`. use crate::lint::FutureIncompatibleInfo; -use crate::{declare_lint, declare_lint_pass}; +use crate::{declare_lint, declare_lint_pass, declare_tool_lint}; use rustc_span::edition::Edition; use rustc_span::symbol::sym; @@ -555,6 +555,12 @@ declare_lint! { }; } +declare_tool_lint! { + pub rustc::INEFFECTIVE_UNSTABLE_TRAIT_IMPL, + Deny, + "detects `#[unstable]` on stable trait implementations for stable types" +} + declare_lint_pass! { /// Does nothing as a lint pass, but registers some `Lint`s /// that are used by other parts of the compiler. @@ -630,6 +636,7 @@ declare_lint_pass! { INCOMPLETE_INCLUDE, CENUM_IMPL_DROP_CAST, CONST_EVALUATABLE_UNCHECKED, + INEFFECTIVE_UNSTABLE_TRAIT_IMPL, ] } |
