diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-10-03 13:54:17 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-04 08:50:46 +1100 |
| commit | 5c462a32bd31d19cacbd15786fb0fa40558eda91 (patch) | |
| tree | 660f7f1bdea49e1d94b6919618720968cba8e6d3 /compiler/rustc_passes/src | |
| parent | ab161d1f5deed6e8dc4801ed44d0c635434ea066 (diff) | |
| download | rust-5c462a32bd31d19cacbd15786fb0fa40558eda91.tar.gz rust-5c462a32bd31d19cacbd15786fb0fa40558eda91.zip | |
Remove support for compiler plugins.
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/errors.rs | 4 |
2 files changed, 0 insertions, 16 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index a8a27e761cb..c5767fd902f 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -211,7 +211,6 @@ impl CheckAttrVisitor<'_> { sym::deprecated => self.check_deprecated(hir_id, attr, span, target), sym::macro_use | sym::macro_escape => self.check_macro_use(hir_id, attr, target), sym::path => self.check_generic_attr(hir_id, attr, target, Target::Mod), - sym::plugin_registrar => self.check_plugin_registrar(hir_id, attr, target), sym::macro_export => self.check_macro_export(hir_id, attr, target), sym::ignore | sym::should_panic => { self.check_generic_attr(hir_id, attr, target, Target::Fn) @@ -2237,17 +2236,6 @@ impl CheckAttrVisitor<'_> { } } - fn check_plugin_registrar(&self, hir_id: HirId, attr: &Attribute, target: Target) { - if target != Target::Fn { - self.tcx.emit_spanned_lint( - UNUSED_ATTRIBUTES, - hir_id, - attr.span, - errors::PluginRegistrar, - ); - } - } - fn check_unused_attribute(&self, hir_id: HirId, attr: &Attribute) { // Warn on useless empty attributes. let note = if matches!( diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index b0862704003..411c9410195 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -717,10 +717,6 @@ pub enum MacroExport { TooManyItems, } -#[derive(LintDiagnostic)] -#[diag(passes_plugin_registrar)] -pub struct PluginRegistrar; - #[derive(Subdiagnostic)] pub enum UnusedNote { #[note(passes_unused_empty_lints_note)] |
