File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ extern crate flate;
4242extern crate getopts;
4343extern crate graphviz;
4444extern crate libc;
45- extern crate " rustc_llvm" as llvm ;
46- extern crate "rustc_back" as rustc_back;
45+ extern crate rustc_llvm;
46+ extern crate rustc_back;
4747extern crate serialize;
4848extern crate rbml;
4949extern crate time;
@@ -53,6 +53,8 @@ extern crate time;
5353#[ cfg( test) ]
5454extern crate test;
5555
56+ pub use rustc_llvm as llvm;
57+
5658mod diagnostics;
5759
5860pub mod back {
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ pub enum ObsoleteSyntax {
3636 ObsoleteManagedExpr ,
3737 ObsoleteImportRenaming ,
3838 ObsoleteSubsliceMatch ,
39+ ObsoleteExternCrateRenaming ,
3940}
4041
4142pub trait ParserObsoleteMethods {
@@ -92,6 +93,10 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
9293 ObsoleteSubsliceMatch => (
9394 "subslice match syntax" ,
9495 "instead of `..xs`, write `xs..` in a pattern"
96+ ) ,
97+ ObsoleteExternCrateRenaming => (
98+ "`extern crate foo = bar` syntax" ,
99+ "write `extern crate bar as foo` instead"
95100 )
96101 } ;
97102
Original file line number Diff line number Diff line change @@ -4783,11 +4783,7 @@ impl<'a> Parser<'a> {
47834783 self . bump ( ) ;
47844784 let path = self . parse_str ( ) ;
47854785 let span = self . span ;
4786- self . span_warn ( span,
4787- format ! ( "this extern crate syntax is deprecated. \
4788- Use: extern crate \" {}\" as {};",
4789- path. ref0( ) . get( ) , the_ident. as_str( ) ) . as_slice ( )
4790- ) ;
4786+ self . obsolete ( span, ObsoleteExternCrateRenaming ) ;
47914787 Some ( path)
47924788 } else { None } ;
47934789
You can’t perform that action at this time.
0 commit comments