Skip to content
Permalink
Browse files

Tweak removed feature error

  • Loading branch information
estebank committed Nov 25, 2019
1 parent 5ef4716 commit 85fb054fefd1787260c72ee281ed7d436bc524f7
Showing with 4 additions and 9 deletions.
  1. +2 −3 src/libsyntax/feature_gate/check.rs
  2. +2 −6 src/test/ui/macros/macro-reexport-removed.stderr
@@ -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

0 comments on commit 85fb054

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