From ce7a579cace5de621071a9e18416268e93246fdd Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 16 Nov 2019 23:35:27 +0300 Subject: [PATCH 1/2] rustc_plugin: Remove the compatibility shim --- Cargo.lock | 8 -------- src/librustc_driver/Cargo.toml | 1 - src/librustc_interface/Cargo.toml | 2 +- src/librustc_interface/passes.rs | 4 ++-- src/librustc_plugin/deprecated/Cargo.toml | 14 -------------- src/librustc_plugin/deprecated/lib.rs | 8 -------- 6 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 src/librustc_plugin/deprecated/Cargo.toml delete mode 100644 src/librustc_plugin/deprecated/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 2ecb38851e7bd..1923032a4dd0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3529,7 +3529,6 @@ dependencies = [ "rustc_metadata", "rustc_mir", "rustc_parse", - "rustc_plugin", "rustc_plugin_impl", "rustc_resolve", "rustc_save_analysis", @@ -3758,13 +3757,6 @@ dependencies = [ "syntax_pos", ] -[[package]] -name = "rustc_plugin" -version = "0.0.0" -dependencies = [ - "rustc_plugin_impl", -] - [[package]] name = "rustc_plugin_impl" version = "0.0.0" diff --git a/src/librustc_driver/Cargo.toml b/src/librustc_driver/Cargo.toml index ff673e52b60c2..f9613d1aafc69 100644 --- a/src/librustc_driver/Cargo.toml +++ b/src/librustc_driver/Cargo.toml @@ -22,7 +22,6 @@ errors = { path = "../librustc_errors", package = "rustc_errors" } rustc_metadata = { path = "../librustc_metadata" } rustc_mir = { path = "../librustc_mir" } rustc_parse = { path = "../librustc_parse" } -rustc_plugin = { path = "../librustc_plugin/deprecated" } # To get this in the sysroot rustc_plugin_impl = { path = "../librustc_plugin" } rustc_save_analysis = { path = "../librustc_save_analysis" } rustc_codegen_utils = { path = "../librustc_codegen_utils" } diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml index de59882bbdf95..7efcc2855bbaa 100644 --- a/src/librustc_interface/Cargo.toml +++ b/src/librustc_interface/Cargo.toml @@ -31,7 +31,7 @@ rustc_passes = { path = "../librustc_passes" } rustc_typeck = { path = "../librustc_typeck" } rustc_lint = { path = "../librustc_lint" } rustc_errors = { path = "../librustc_errors" } -rustc_plugin = { path = "../librustc_plugin", package = "rustc_plugin_impl" } +rustc_plugin_impl = { path = "../librustc_plugin" } rustc_privacy = { path = "../librustc_privacy" } rustc_resolve = { path = "../librustc_resolve" } tempfile = "3.0.5" diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index 86d58bfe8bdac..5df814da770ad 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -29,8 +29,8 @@ use rustc_metadata::cstore; 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 as plugin; -use rustc_plugin::registry::Registry; +use rustc_plugin_impl as plugin; +use rustc_plugin_impl::registry::Registry; use rustc_privacy; use rustc_resolve::{Resolver, ResolverArenas}; use rustc_traits; diff --git a/src/librustc_plugin/deprecated/Cargo.toml b/src/librustc_plugin/deprecated/Cargo.toml deleted file mode 100644 index cc75f7b9ab20d..0000000000000 --- a/src/librustc_plugin/deprecated/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -authors = ["The Rust Project Developers"] -name = "rustc_plugin" -version = "0.0.0" -build = false -edition = "2018" - -[lib] -name = "rustc_plugin" -path = "lib.rs" -doctest = false - -[dependencies] -rustc_plugin_impl = { path = ".." } diff --git a/src/librustc_plugin/deprecated/lib.rs b/src/librustc_plugin/deprecated/lib.rs deleted file mode 100644 index 1d0afe84c25a8..0000000000000 --- a/src/librustc_plugin/deprecated/lib.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")] -#![feature(staged_api)] -#![unstable(feature = "rustc_private", issue = "27812")] -#![rustc_deprecated(since = "1.38.0", reason = "\ - import this through `rustc_driver::plugin` instead to make TLS work correctly. \ - See https://github.com/rust-lang/rust/issues/62717")] - -pub use rustc_plugin_impl::*; From 7f49f7bcc275062ac7f77b6f58d72e8b180bf367 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 17 Nov 2019 00:54:24 +0300 Subject: [PATCH 2/2] Rename directory `rustc_plugin` -> `rustc_plugin_impl` --- src/librustc_driver/Cargo.toml | 2 +- src/librustc_interface/Cargo.toml | 2 +- src/{librustc_plugin => librustc_plugin_impl}/Cargo.toml | 0 src/{librustc_plugin => librustc_plugin_impl}/build.rs | 0 src/{librustc_plugin => librustc_plugin_impl}/lib.rs | 0 src/{librustc_plugin => librustc_plugin_impl}/load.rs | 0 src/{librustc_plugin => librustc_plugin_impl}/registry.rs | 0 7 files changed, 2 insertions(+), 2 deletions(-) rename src/{librustc_plugin => librustc_plugin_impl}/Cargo.toml (100%) rename src/{librustc_plugin => librustc_plugin_impl}/build.rs (100%) rename src/{librustc_plugin => librustc_plugin_impl}/lib.rs (100%) rename src/{librustc_plugin => librustc_plugin_impl}/load.rs (100%) rename src/{librustc_plugin => librustc_plugin_impl}/registry.rs (100%) diff --git a/src/librustc_driver/Cargo.toml b/src/librustc_driver/Cargo.toml index f9613d1aafc69..2b7e4d35248e6 100644 --- a/src/librustc_driver/Cargo.toml +++ b/src/librustc_driver/Cargo.toml @@ -22,7 +22,7 @@ errors = { path = "../librustc_errors", package = "rustc_errors" } rustc_metadata = { path = "../librustc_metadata" } rustc_mir = { path = "../librustc_mir" } rustc_parse = { path = "../librustc_parse" } -rustc_plugin_impl = { path = "../librustc_plugin" } +rustc_plugin_impl = { path = "../librustc_plugin_impl" } rustc_save_analysis = { path = "../librustc_save_analysis" } rustc_codegen_utils = { path = "../librustc_codegen_utils" } rustc_error_codes = { path = "../librustc_error_codes" } diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml index 7efcc2855bbaa..7ab5ec2b2329e 100644 --- a/src/librustc_interface/Cargo.toml +++ b/src/librustc_interface/Cargo.toml @@ -31,7 +31,7 @@ rustc_passes = { path = "../librustc_passes" } rustc_typeck = { path = "../librustc_typeck" } rustc_lint = { path = "../librustc_lint" } rustc_errors = { path = "../librustc_errors" } -rustc_plugin_impl = { path = "../librustc_plugin" } +rustc_plugin_impl = { path = "../librustc_plugin_impl" } rustc_privacy = { path = "../librustc_privacy" } rustc_resolve = { path = "../librustc_resolve" } tempfile = "3.0.5" diff --git a/src/librustc_plugin/Cargo.toml b/src/librustc_plugin_impl/Cargo.toml similarity index 100% rename from src/librustc_plugin/Cargo.toml rename to src/librustc_plugin_impl/Cargo.toml diff --git a/src/librustc_plugin/build.rs b/src/librustc_plugin_impl/build.rs similarity index 100% rename from src/librustc_plugin/build.rs rename to src/librustc_plugin_impl/build.rs diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin_impl/lib.rs similarity index 100% rename from src/librustc_plugin/lib.rs rename to src/librustc_plugin_impl/lib.rs diff --git a/src/librustc_plugin/load.rs b/src/librustc_plugin_impl/load.rs similarity index 100% rename from src/librustc_plugin/load.rs rename to src/librustc_plugin_impl/load.rs diff --git a/src/librustc_plugin/registry.rs b/src/librustc_plugin_impl/registry.rs similarity index 100% rename from src/librustc_plugin/registry.rs rename to src/librustc_plugin_impl/registry.rs