Skip to content

Commit d3cc761

Browse files
committed
Add deprecation notice for no_implicit_prelude
1 parent 4be61ad commit d3cc761

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libsyntax/feature_gate.rs

+5
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,11 @@ impl<'a> PostExpansionVisitor<'a> {
858858

859859
impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
860860
fn visit_attribute(&mut self, attr: &ast::Attribute) {
861+
if &*attr.name() == "no_implicit_prelude" {
862+
self.context.span_handler.span_warn(attr.span,
863+
"the `#[no_implicit_prelude]` attribute is \
864+
deprecated, use `#[no_prelude]` instead");
865+
}
861866
if !self.context.cm.span_allows_unstable(attr.span) {
862867
self.context.check_attribute(attr, false);
863868
}

0 commit comments

Comments
 (0)