Skip to content

Commit

Permalink
Make use $crate a hard error
Browse files Browse the repository at this point in the history
  • Loading branch information
mental32 committed Jan 1, 2020
1 parent 9e6fb53 commit 37f4535
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/librustc_resolve/build_reduced_graph.rs
Expand Up @@ -472,12 +472,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {

self.r
.session
.struct_span_warn(item.span, "`$crate` may not be imported")
.note(
"`use $crate;` was erroneously allowed and \
will become a hard error in a future release",
)
.emit();
.struct_span_err(item.span, "`$crate` may not be imported");
}
}

Expand Down

0 comments on commit 37f4535

Please sign in to comment.