about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/passes.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-10-03 13:54:17 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-04 08:50:46 +1100
commit5c462a32bd31d19cacbd15786fb0fa40558eda91 (patch)
tree660f7f1bdea49e1d94b6919618720968cba8e6d3 /compiler/rustc_interface/src/passes.rs
parentab161d1f5deed6e8dc4801ed44d0c635434ea066 (diff)
downloadrust-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_interface/src/passes.rs')
-rw-r--r--compiler/rustc_interface/src/passes.rs16
1 files changed, 1 insertions, 15 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 2099a6d59cb..7d14d088e59 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -23,11 +23,10 @@ use rustc_middle::util::Providers;
 use rustc_mir_build as mir_build;
 use rustc_parse::{parse_crate_from_file, parse_crate_from_source_str, validate_attr};
 use rustc_passes::{self, abi_test, hir_stats, layout_test};
-use rustc_plugin_impl as plugin;
 use rustc_resolve::Resolver;
 use rustc_session::code_stats::VTableSizeInfo;
 use rustc_session::config::{CrateType, Input, OutFileName, OutputFilenames, OutputType};
-use rustc_session::cstore::{MetadataLoader, Untracked};
+use rustc_session::cstore::Untracked;
 use rustc_session::output::filename_for_input;
 use rustc_session::search_paths::PathKind;
 use rustc_session::{Limit, Session};
@@ -75,25 +74,12 @@ fn count_nodes(krate: &ast::Crate) -> usize {
 
 pub(crate) fn create_lint_store(
     sess: &Session,
-    metadata_loader: &dyn MetadataLoader,
     register_lints: Option<impl Fn(&Session, &mut LintStore)>,
-    pre_configured_attrs: &[ast::Attribute],
 ) -> LintStore {
     let mut lint_store = rustc_lint::new_lint_store(sess.enable_internal_lints());
     if let Some(register_lints) = register_lints {
         register_lints(sess, &mut lint_store);
     }
-
-    let registrars = sess.time("plugin_loading", || {
-        plugin::load::load_plugins(sess, metadata_loader, pre_configured_attrs)
-    });
-    sess.time("plugin_registration", || {
-        let mut registry = plugin::Registry { lint_store: &mut lint_store };
-        for registrar in registrars {
-            registrar(&mut registry);
-        }
-    });
-
     lint_store
 }