1
Fork 0

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.
This commit is contained in:
Nicholas Nethercote 2023-10-03 13:54:17 +11:00
parent ab161d1f5d
commit 5c462a32bd
101 changed files with 57 additions and 1712 deletions

View file

@ -321,7 +321,7 @@ pub struct Lint {
pub future_incompatible: Option<FutureIncompatibleInfo>,
pub is_plugin: bool,
pub is_loaded: bool,
/// `Some` if this lint is feature gated, otherwise `None`.
pub feature_gate: Option<Symbol>,
@ -399,7 +399,7 @@ impl Lint {
default_level: Level::Forbid,
desc: "",
edition_lint_opts: None,
is_plugin: false,
is_loaded: false,
report_in_external_macro: false,
future_incompatible: None,
feature_gate: None,
@ -735,7 +735,7 @@ macro_rules! declare_lint {
name: stringify!($NAME),
default_level: $crate::$Level,
desc: $desc,
is_plugin: false,
is_loaded: false,
$($v: true,)*
$(feature_gate: Some($gate),)?
$(future_incompatible: Some($crate::FutureIncompatibleInfo {
@ -777,7 +777,7 @@ macro_rules! declare_tool_lint {
edition_lint_opts: None,
report_in_external_macro: $external,
future_incompatible: None,
is_plugin: true,
is_loaded: true,
$(feature_gate: Some($gate),)?
crate_level_only: false,
..$crate::Lint::default_fields_for_macro()