]> git.lizzy.rs Git - rust.git/commitdiff
Make use $crate a hard error
authormental <m3nta1@yahoo.com>
Wed, 1 Jan 2020 12:33:53 +0000 (14:33 +0200)
committermental <m3nta1@yahoo.com>
Wed, 1 Jan 2020 12:33:53 +0000 (14:33 +0200)
src/librustc_resolve/build_reduced_graph.rs

index 911de5d2174e6d137801299367e8a89063044485..b563e6e14e8f8ce367a3ee1775f2214eab3a4171 100644 (file)
@@ -472,12 +472,7 @@ fn build_reduced_graph_for_use_tree(
 
                         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");
                     }
                 }