diff options
| author | bors <bors@rust-lang.org> | 2020-01-08 12:12:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-08 12:12:08 +0000 |
| commit | ed6468da160bd67a2ce0573427f09a98daff8c07 (patch) | |
| tree | f60a0277a129a9835cafbe0eb526b28a4888f0e8 /src/librustc_plugin_impl | |
| parent | 87540bd3bca8dcd86223261f8c76c5bbf6811ee6 (diff) | |
| parent | 20ebb807d523947f5fac710c4ae95ac9730ad995 (diff) | |
| download | rust-ed6468da160bd67a2ce0573427f09a98daff8c07.tar.gz rust-ed6468da160bd67a2ce0573427f09a98daff8c07.zip | |
Auto merge of #67770 - Centril:reduce-diversity-2, r=petrochenkov
More reductions in error handling diversity In this follow up to https://github.com/rust-lang/rust/pull/67744, we: - Remove all fatal / error / warning macros in `syntax` except for `struct_span_err`, which is moved to `rustc_errors`. - Lintify some hard-coded warnings which used warning macros. - Defatalize some errors. In general, the goal here is to make it painful to use fatal or unstructured errors and so we hopefully won't see many of these creep in. Fixes https://github.com/rust-lang/rust/issues/67933.
Diffstat (limited to 'src/librustc_plugin_impl')
| -rw-r--r-- | src/librustc_plugin_impl/Cargo.toml | 1 | ||||
| -rw-r--r-- | src/librustc_plugin_impl/load.rs | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_plugin_impl/Cargo.toml b/src/librustc_plugin_impl/Cargo.toml index 54cceca7d3a..d0b7accafd6 100644 --- a/src/librustc_plugin_impl/Cargo.toml +++ b/src/librustc_plugin_impl/Cargo.toml @@ -12,6 +12,7 @@ doctest = false [dependencies] rustc = { path = "../librustc" } +rustc_errors = { path = "../librustc_errors" } rustc_hir = { path = "../librustc_hir" } rustc_metadata = { path = "../librustc_metadata" } syntax = { path = "../libsyntax" } diff --git a/src/librustc_plugin_impl/load.rs b/src/librustc_plugin_impl/load.rs index 2215e49ec97..65661ec24f0 100644 --- a/src/librustc_plugin_impl/load.rs +++ b/src/librustc_plugin_impl/load.rs @@ -3,18 +3,17 @@ use crate::Registry; use rustc::middle::cstore::MetadataLoader; use rustc::session::Session; +use rustc_error_codes::*; +use rustc_errors::struct_span_err; use rustc_metadata::locator; - use rustc_span::symbol::sym; use rustc_span::Span; +use syntax::ast::{Crate, Ident}; + use std::borrow::ToOwned; use std::env; use std::mem; use std::path::PathBuf; -use syntax::ast::{Crate, Ident}; -use syntax::struct_span_err; - -use rustc_error_codes::*; /// Pointer to a registrar function. type PluginRegistrarFn = fn(&mut Registry<'_>); |
