File tree Expand file tree Collapse file tree 13 files changed +25
-20
lines changed Expand file tree Collapse file tree 13 files changed +25
-20
lines changed Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
#[ cfg( rustdoc) ]
12
- extern crate this = "rustdoc" ;
12
+ extern crate "rustdoc" as this ;
13
13
14
14
#[ cfg( rustc) ]
15
- extern crate this = "rustc" ;
15
+ extern crate "rustc" as this ;
16
16
17
17
fn main ( ) { this:: main ( ) }
Original file line number Diff line number Diff line change 372
372
#![ deny( missing_doc) ]
373
373
374
374
#[ cfg( test) ]
375
- extern crate stdtest = "test" ;
375
+ extern crate "test" as stdtest ;
376
376
#[ cfg( test) ]
377
377
extern crate rand;
378
378
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ struct StandardLibraryInjector<'a> {
62
62
impl < ' a > fold:: Folder for StandardLibraryInjector < ' a > {
63
63
fn fold_crate ( & mut self , mut krate : ast:: Crate ) -> ast:: Crate {
64
64
65
- // The name to use in `extern crate std = "name";`
65
+ // The name to use in `extern crate "name" as std ;`
66
66
let actual_crate_name = match self . sess . opts . alt_std_name {
67
67
Some ( ref s) => token:: intern_and_get_ident ( s. as_slice ( ) ) ,
68
68
None => token:: intern_and_get_ident ( "std" ) ,
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ extern crate flate;
42
42
extern crate getopts;
43
43
extern crate graphviz;
44
44
extern crate libc;
45
- extern crate llvm = "rustc_llvm" ;
46
- extern crate rustc_back = " rustc_back" ;
45
+ extern crate "rustc_llvm" as llvm ;
46
+ extern crate " rustc_back" as rustc_back;
47
47
extern crate serialize;
48
48
extern crate rbml;
49
49
extern crate time;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ extern crate libc;
23
23
extern crate rustc;
24
24
extern crate serialize;
25
25
extern crate syntax;
26
- extern crate testing = "test" ;
26
+ extern crate "test" as testing ;
27
27
extern crate time;
28
28
#[ phase( plugin, link) ] extern crate log;
29
29
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ extern crate alloc;
27
27
extern crate libc;
28
28
extern crate collections;
29
29
30
- #[ cfg( test) ] extern crate realrustrt = "rustrt" ;
30
+ #[ cfg( test) ] extern crate "rustrt" as realrustrt ;
31
31
#[ cfg( test) ] extern crate test;
32
32
#[ cfg( test) ] extern crate native;
33
33
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ via `close` and `delete` methods.
52
52
53
53
#[ cfg( test) ] extern crate green;
54
54
#[ cfg( test) ] extern crate debug;
55
- #[ cfg( test) ] extern crate realrustuv = "rustuv" ;
55
+ #[ cfg( test) ] extern crate "rustuv" as realrustuv ;
56
56
extern crate libc;
57
57
extern crate alloc;
58
58
Original file line number Diff line number Diff line change 129
129
extern crate alloc;
130
130
extern crate unicode;
131
131
extern crate core;
132
- extern crate core_collections = "collections" ;
133
- extern crate core_rand = "rand" ;
134
- extern crate core_sync = "sync" ;
132
+ extern crate "collections" as core_collections ;
133
+ extern crate "rand" as core_rand ;
134
+ extern crate "sync" as core_sync ;
135
135
extern crate libc;
136
136
extern crate rustrt;
137
137
138
138
// Make std testable by not duplicating lang items. See #2912
139
- #[ cfg( test) ] extern crate realstd = "std" ;
139
+ #[ cfg( test) ] extern crate "std" as realstd ;
140
140
#[ cfg( test) ] pub use realstd:: kinds;
141
141
#[ cfg( test) ] pub use realstd:: ops;
142
142
#[ cfg( test) ] pub use realstd:: cmp;
Original file line number Diff line number Diff line change @@ -4773,11 +4773,16 @@ impl<'a> Parser<'a> {
4773
4773
token:: IDENT ( ..) => {
4774
4774
let the_ident = self . parse_ident ( ) ;
4775
4775
self . expect_one_of ( & [ ] , & [ token:: EQ , token:: SEMI ] ) ;
4776
- // NOTE - #16689 change this to a warning once
4777
- // the 'as' support is in stage0
4778
4776
let path = if self . token == token:: EQ {
4779
4777
self . bump ( ) ;
4780
- Some ( self . parse_str ( ) )
4778
+ let path = self . parse_str ( ) ;
4779
+ let span = self . span ;
4780
+ self . span_warn ( span,
4781
+ format ! ( "this extern crate syntax is deprecated. \
4782
+ Use: extern create \" {}\" as {};",
4783
+ the_ident. as_str( ) , path. ref0( ) . get( ) ) . as_slice ( )
4784
+ ) ;
4785
+ Some ( path)
4781
4786
} else { None } ;
4782
4787
4783
4788
self . expect ( & token:: SEMI ) ;
Original file line number Diff line number Diff line change 10
10
11
11
// aux-build:issue-16725.rs
12
12
13
- extern crate foo = "issue-16725" ;
13
+ extern crate "issue-16725" as foo ;
14
14
15
15
fn main ( ) {
16
16
unsafe { foo:: bar ( ) ; }
Original file line number Diff line number Diff line change 12
12
13
13
// Check explicit region bounds on methods in the cross crate case.
14
14
15
- extern crate lib = "regions-bounded-method-type-parameters-cross-crate-lib" ;
15
+ extern crate "regions-bounded-method-type-parameters-cross-crate-lib" as lib ;
16
16
17
17
use lib:: Inv ;
18
18
use lib:: MaybeOwned ;
Original file line number Diff line number Diff line change 10
10
11
11
// aux-build:issue-15562.rs
12
12
13
- extern crate i = "issue-15562" ;
13
+ extern crate "issue-15562" as i ;
14
14
15
15
pub fn main ( ) {
16
16
extern {
Original file line number Diff line number Diff line change 10
10
11
11
// aux-build:issue-16643.rs
12
12
13
- extern crate i = "issue-16643" ;
13
+ extern crate "issue-16643" as i ;
14
14
15
15
pub fn main ( ) {
16
16
i:: TreeBuilder :: < uint > . process_token ( ) ;
You can’t perform that action at this time.
0 commit comments