Tweak removed feature error

This commit is contained in:
Esteban Küber 2019-11-25 12:36:26 -08:00
parent 5ef47160e8
commit 85fb054fef
2 changed files with 4 additions and 9 deletions

View File

@ -688,10 +688,9 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
crate_edition: Edition, allow_features: &Option<Vec<String>>) -> Features {
fn feature_removed(span_handler: &Handler, span: Span, reason: Option<&str>) {
let mut err = struct_span_err!(span_handler, span, E0557, "feature has been removed");
err.span_label(span, "feature has been removed");
if let Some(reason) = reason {
err.span_note(span, reason);
} else {
err.span_label(span, "feature has been removed");
err.note(reason);
}
err.emit();
}

View File

@ -2,13 +2,9 @@ error[E0557]: feature has been removed
--> $DIR/macro-reexport-removed.rs:3:12
|
LL | #![feature(macro_reexport)]
| ^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^ feature has been removed
|
note: subsumed by `pub use`
--> $DIR/macro-reexport-removed.rs:3:12
|
LL | #![feature(macro_reexport)]
| ^^^^^^^^^^^^^^
= note: subsumed by `pub use`
error: cannot find attribute `macro_reexport` in this scope
--> $DIR/macro-reexport-removed.rs:5:3