Skip to content
Permalink
Browse files

rustc_plugin: Some further cleanup

Remove a useless test
  • Loading branch information
petrochenkov committed Nov 30, 2019
1 parent 2799378 commit e5944a5a698a0a9dd3acbb14d8309a2b72cd9160
@@ -30,7 +30,6 @@ use rustc_mir as mir;
use rustc_parse::{parse_crate_from_file, parse_crate_from_source_str};
use rustc_passes::{self, ast_validation, hir_stats, layout_test};
use rustc_plugin_impl as plugin;
use rustc_plugin_impl::registry::Registry;
use rustc_privacy;
use rustc_resolve::{Resolver, ResolverArenas};
use rustc_traits;
@@ -218,7 +217,7 @@ pub fn register_plugins<'a>(
plugin::load::load_plugins(sess, metadata_loader, &krate)
});
time(sess, "plugin registration", || {
let mut registry = Registry::new(sess, &mut lint_store, krate.span);
let mut registry = plugin::Registry { lint_store: &mut lint_store };
for registrar in registrars {
registrar(&mut registry);
}
@@ -10,10 +10,16 @@

#![feature(nll)]

#![recursion_limit="256"]
use rustc::lint::LintStore;

pub use registry::Registry;

pub mod registry;
pub mod load;
pub mod build;
pub mod load;

/// Structure used to register plugins.
///
/// A plugin registrar function takes an `&mut Registry` and should call
/// methods to register its plugins.
pub struct Registry<'a> {
/// The `LintStore` allows plugins to register new lints.
pub lint_store: &'a mut LintStore,
}
@@ -3,7 +3,7 @@
use rustc::middle::cstore::MetadataLoader;
use rustc::session::Session;
use rustc_metadata::locator;
use crate::registry::Registry;
use crate::Registry;

use std::borrow::ToOwned;
use std::env;

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
@@ -1,11 +1,11 @@
error[E0498]: malformed `plugin` attribute
--> $DIR/plugin-args-2.rs:5:11
--> $DIR/plugin-args.rs:5:11
|
LL | #![plugin(empty_plugin(args))]
| ^^^^^^^^^^^^^^^^^^ malformed attribute

warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
--> $DIR/plugin-args-2.rs:5:1
--> $DIR/plugin-args.rs:5:1
|
LL | #![plugin(empty_plugin(args))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version

0 comments on commit e5944a5

Please sign in to comment.
You can’t perform that action at this time.