Skip to content

Commit 13e4270

Browse files
committed
Unquote all crate names without underscores
1 parent 199bdcf commit 13e4270

35 files changed

+40
-40
lines changed

src/doc/reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ extern crate pcre;
980980
981981
extern crate std; // equivalent to: extern crate std as std;
982982
983-
extern crate "std" as ruststd; // linking to 'std' under another name
983+
extern crate std as ruststd; // linking to 'std' under another name
984984
```
985985

986986
##### Use declarations

src/driver/driver.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#![cfg_attr(rustdoc, feature(rustdoc))]
1313

1414
#[cfg(rustdoc)]
15-
extern crate "rustdoc" as this;
15+
extern crate rustdoc as this;
1616

1717
#[cfg(rustc)]
18-
extern crate "rustc_driver" as this;
18+
extern crate rustc_driver as this;
1919

2020
fn main() { this::main() }

src/liblibc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
7777
#![allow(bad_style, raw_pointer_derive)]
7878
#![cfg_attr(target_os = "nacl", allow(unused_imports))]
79-
#[cfg(feature = "cargo-build")] extern crate "std" as core;
79+
#[cfg(feature = "cargo-build")] extern crate std as core;
8080
#[cfg(not(feature = "cargo-build"))] extern crate core;
8181

8282
#[cfg(test)] extern crate std;

src/librustc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extern crate collections;
6565
#[macro_use] extern crate syntax;
6666
#[macro_use] #[no_link] extern crate rustc_bitflags;
6767

68-
extern crate "serialize" as rustc_serialize; // used by deriving
68+
extern crate serialize as rustc_serialize; // used by deriving
6969

7070
#[cfg(test)]
7171
extern crate test;

src/librustc_borrowck/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
// for "clarity", rename the graphviz crate to dot; graphviz within `borrowck`
3737
// refers to the borrowck-specific graphviz adapter traits.
38-
extern crate "graphviz" as dot;
38+
extern crate graphviz as dot;
3939
extern crate rustc;
4040

4141
pub use borrowck::check_crate;

src/librustc_driver/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extern crate rustc_resolve;
5555
extern crate rustc_trans;
5656
extern crate rustc_typeck;
5757
extern crate serialize;
58-
extern crate "rustc_llvm" as llvm;
58+
extern crate rustc_llvm as llvm;
5959
#[macro_use] extern crate log;
6060
#[macro_use] extern crate syntax;
6161

src/librustc_trans/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extern crate libc;
5454
extern crate rustc;
5555
extern crate rustc_back;
5656
extern crate serialize;
57-
extern crate "rustc_llvm" as llvm;
57+
extern crate rustc_llvm as llvm;
5858

5959
#[macro_use] extern crate log;
6060
#[macro_use] extern crate syntax;

src/librustdoc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ extern crate rustc_lint;
5151
extern crate rustc_back;
5252
extern crate serialize;
5353
extern crate syntax;
54-
extern crate "test" as testing;
54+
extern crate test as testing;
5555
extern crate unicode;
5656
#[macro_use] extern crate log;
5757

58-
extern crate "serialize" as rustc_serialize; // used by deriving
58+
extern crate serialize as rustc_serialize; // used by deriving
5959

6060
use std::cell::RefCell;
6161
use std::collections::HashMap;

src/libstd/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,17 @@ extern crate core;
149149

150150
#[macro_use]
151151
#[macro_reexport(vec, format)]
152-
extern crate "collections" as core_collections;
152+
extern crate collections as core_collections;
153153

154-
#[allow(deprecated)] extern crate "rand" as core_rand;
154+
#[allow(deprecated)] extern crate rand as core_rand;
155155
extern crate alloc;
156156
extern crate unicode;
157157
extern crate libc;
158158

159159
#[macro_use] #[no_link] extern crate rustc_bitflags;
160160

161161
// Make std testable by not duplicating lang items. See #2912
162-
#[cfg(test)] extern crate "std" as realstd;
162+
#[cfg(test)] extern crate std as realstd;
163163
#[cfg(test)] pub use realstd::marker;
164164
#[cfg(test)] pub use realstd::ops;
165165
#[cfg(test)] pub use realstd::cmp;

src/libstd/old_io/mem.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ impl<'a> Buffer for BufReader<'a> {
397397

398398
#[cfg(test)]
399399
mod test {
400-
extern crate "test" as test_crate;
400+
extern crate test as test_crate;
401401
use old_io::{SeekSet, SeekCur, SeekEnd, Reader, Writer, Seek, Buffer};
402402
use prelude::v1::{Ok, Err, Vec, AsSlice};
403403
use prelude::v1::IteratorExt;

src/libsyntax/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ extern crate libc;
5050
#[macro_use] extern crate log;
5151
#[macro_use] #[no_link] extern crate rustc_bitflags;
5252

53-
extern crate "serialize" as rustc_serialize; // used by deriving
53+
extern crate serialize as rustc_serialize; // used by deriving
5454

5555
pub mod util {
5656
pub mod interner;

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4979,7 +4979,7 @@ impl<'a> Parser<'a> {
49794979
///
49804980
/// extern crate url;
49814981
/// extern crate foo = "bar"; //deprecated
4982-
/// extern crate "bar" as foo;
4982+
/// extern crate bar as foo;
49834983
fn parse_item_extern_crate(&mut self,
49844984
lo: BytePos,
49854985
visibility: Visibility,

src/libsyntax/std_inject.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct StandardLibraryInjector {
5252
impl fold::Folder for StandardLibraryInjector {
5353
fn fold_crate(&mut self, mut krate: ast::Crate) -> ast::Crate {
5454

55-
// The name to use in `extern crate "name" as std;`
55+
// The name to use in `extern crate name as std;`
5656
let actual_crate_name = match self.alt_std_name {
5757
Some(ref s) => token::intern(&s),
5858
None => token::intern("std"),

src/libtest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
extern crate getopts;
5252
extern crate serialize;
53-
extern crate "serialize" as rustc_serialize;
53+
extern crate serialize as rustc_serialize;
5454
extern crate term;
5555
extern crate libc;
5656

src/test/auxiliary/syntax_extension_with_dll_deps_2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![crate_type = "dylib"]
1414
#![feature(plugin_registrar, quote, rustc_private)]
1515

16-
extern crate "syntax_extension_with_dll_deps_1" as other;
16+
extern crate syntax_extension_with_dll_deps_1 as other;
1717
extern crate syntax;
1818
extern crate rustc;
1919

src/test/auxiliary/trait_default_method_xc_aux_2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// aux-build:trait_default_method_xc_aux.rs
1212

13-
extern crate "trait_default_method_xc_aux" as aux;
13+
extern crate trait_default_method_xc_aux as aux;
1414
use aux::A;
1515

1616
pub struct a_struct { pub x: int }

src/test/run-make/save-analysis/foo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
extern crate graphviz;
1616
// A simple rust project
1717

18-
extern crate "flate" as myflate;
18+
extern crate flate as myflate;
1919

2020
use std::collections::{HashMap,HashSet};
2121
use std::cell::RefCell;

src/test/run-pass/derive-no-std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
extern crate core;
1515
extern crate rand;
16-
extern crate "serialize" as rustc_serialize;
16+
extern crate serialize as rustc_serialize;
1717
extern crate collections;
1818

1919
// Issue #16803

src/test/run-pass/extern-foreign-crate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
// pretty-expanded FIXME #23616
1212

13-
extern crate "std" as mystd;
13+
extern crate std as mystd;
1414

1515
pub fn main() {}

src/test/run-pass/for-loop-no-std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(lang_items, start, no_std, core, collections)]
1414
#![no_std]
1515

16-
extern crate "std" as other;
16+
extern crate std as other;
1717

1818
#[macro_use] extern crate core;
1919
#[macro_use] extern crate collections;

src/test/run-pass/format-no-std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(lang_items, start, no_std, core, collections)]
1414
#![no_std]
1515

16-
extern crate "std" as other;
16+
extern crate std as other;
1717

1818
#[macro_use] extern crate core;
1919
#[macro_use] extern crate collections;

src/test/run-pass/issue-14330.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
// pretty-expanded FIXME #23616
1212

13-
#[macro_use] extern crate "std" as std2;
13+
#[macro_use] extern crate std as std2;
1414

1515
fn main() {}

src/test/run-pass/linkage1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#![feature(linkage)]
1616

17-
extern crate "linkage1" as other;
17+
extern crate linkage1 as other;
1818

1919
extern {
2020
#[linkage = "extern_weak"]

src/test/run-pass/macro-crate-nonterminal-renamed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// ignore-stage1
1313

1414
#[macro_use]
15-
extern crate "macro_crate_nonterminal" as new_name;
15+
extern crate macro_crate_nonterminal as new_name;
1616

1717
pub fn main() {
1818
new_name::check_local();

src/test/run-pass/static-fn-inline-xc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// pretty-expanded FIXME #23616
1414

15-
extern crate "static_fn_inline_xc_aux" as mycore;
15+
extern crate static_fn_inline_xc_aux as mycore;
1616

1717
use mycore::num;
1818

src/test/run-pass/static-fn-trait-xc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// pretty-expanded FIXME #23616
1414

15-
extern crate "static_fn_trait_xc_aux" as mycore;
15+
extern crate static_fn_trait_xc_aux as mycore;
1616

1717
use mycore::num;
1818

src/test/run-pass/trait-default-method-xc-2.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
// pretty-expanded FIXME #23616
1616

17-
extern crate "trait_default_method_xc_aux" as aux;
18-
extern crate "trait_default_method_xc_aux_2" as aux2;
17+
extern crate trait_default_method_xc_aux as aux;
18+
extern crate trait_default_method_xc_aux_2 as aux2;
1919
use aux::A;
2020
use aux2::{a_struct, welp};
2121

src/test/run-pass/trait-default-method-xc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// pretty-expanded FIXME #23616
1414

15-
extern crate "trait_default_method_xc_aux" as aux;
15+
extern crate trait_default_method_xc_aux as aux;
1616
use aux::{A, TestEquality, Something};
1717
use aux::B;
1818

src/test/run-pass/trait-inheritance-auto-xc-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// pretty-expanded FIXME #23616
1414

15-
extern crate "trait_inheritance_auto_xc_2_aux" as aux;
15+
extern crate trait_inheritance_auto_xc_2_aux as aux;
1616

1717
// aux defines impls of Foo, Bar and Baz for A
1818
use aux::{Foo, Bar, Baz, A};

src/test/run-pass/trait-inheritance-auto-xc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// pretty-expanded FIXME #23616
1414

15-
extern crate "trait_inheritance_auto_xc_aux" as aux;
15+
extern crate trait_inheritance_auto_xc_aux as aux;
1616

1717
use aux::{Foo, Bar, Baz, Quux};
1818

src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// pretty-expanded FIXME #23616
1414

15-
extern crate "trait_inheritance_cross_trait_call_xc_aux" as aux;
15+
extern crate trait_inheritance_cross_trait_call_xc_aux as aux;
1616

1717
use aux::Foo;
1818

src/test/run-pass/use-crate-name-alias.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
// Issue #1706
1212
// pretty-expanded FIXME #23616
1313

14-
extern crate "std" as stdlib;
14+
extern crate std as stdlib;
1515

1616
pub fn main() {}

src/test/run-pass/use.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#![no_std]
1616

1717
extern crate std;
18-
extern crate "std" as zed;
18+
extern crate std as zed;
1919

2020
use std::str;
2121
use zed::str as x;

src/test/run-pass/vec-macro-no-std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(lang_items, start, no_std, core, libc, collections)]
1414
#![no_std]
1515

16-
extern crate "std" as other;
16+
extern crate std as other;
1717

1818
#[macro_use]
1919
extern crate core;

src/test/run-pass/xcrate-address-insignificant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// pretty-expanded FIXME #23616
1414

15-
extern crate "xcrate_address_insignificant" as foo;
15+
extern crate xcrate_address_insignificant as foo;
1616

1717
pub fn main() {
1818
assert_eq!(foo::foo::<f64>(), foo::bar());

0 commit comments

Comments
 (0)