Tweak removed feature error
This commit is contained in:
parent
5ef47160e8
commit
85fb054fef
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user