Unquote all crate names without underscores
This commit is contained in:
parent
199bdcfeff
commit
13e4270bf9
35 changed files with 40 additions and 40 deletions
|
@ -980,7 +980,7 @@ extern crate pcre;
|
|||
|
||||
extern crate std; // equivalent to: extern crate std as std;
|
||||
|
||||
extern crate "std" as ruststd; // linking to 'std' under another name
|
||||
extern crate std as ruststd; // linking to 'std' under another name
|
||||
```
|
||||
|
||||
##### Use declarations
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
#![cfg_attr(rustdoc, feature(rustdoc))]
|
||||
|
||||
#[cfg(rustdoc)]
|
||||
extern crate "rustdoc" as this;
|
||||
extern crate rustdoc as this;
|
||||
|
||||
#[cfg(rustc)]
|
||||
extern crate "rustc_driver" as this;
|
||||
extern crate rustc_driver as this;
|
||||
|
||||
fn main() { this::main() }
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
#![allow(bad_style, raw_pointer_derive)]
|
||||
#![cfg_attr(target_os = "nacl", allow(unused_imports))]
|
||||
#[cfg(feature = "cargo-build")] extern crate "std" as core;
|
||||
#[cfg(feature = "cargo-build")] extern crate std as core;
|
||||
#[cfg(not(feature = "cargo-build"))] extern crate core;
|
||||
|
||||
#[cfg(test)] extern crate std;
|
||||
|
|
|
@ -65,7 +65,7 @@ extern crate collections;
|
|||
#[macro_use] extern crate syntax;
|
||||
#[macro_use] #[no_link] extern crate rustc_bitflags;
|
||||
|
||||
extern crate "serialize" as rustc_serialize; // used by deriving
|
||||
extern crate serialize as rustc_serialize; // used by deriving
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate test;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
// for "clarity", rename the graphviz crate to dot; graphviz within `borrowck`
|
||||
// refers to the borrowck-specific graphviz adapter traits.
|
||||
extern crate "graphviz" as dot;
|
||||
extern crate graphviz as dot;
|
||||
extern crate rustc;
|
||||
|
||||
pub use borrowck::check_crate;
|
||||
|
|
|
@ -55,7 +55,7 @@ extern crate rustc_resolve;
|
|||
extern crate rustc_trans;
|
||||
extern crate rustc_typeck;
|
||||
extern crate serialize;
|
||||
extern crate "rustc_llvm" as llvm;
|
||||
extern crate rustc_llvm as llvm;
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate syntax;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ extern crate libc;
|
|||
extern crate rustc;
|
||||
extern crate rustc_back;
|
||||
extern crate serialize;
|
||||
extern crate "rustc_llvm" as llvm;
|
||||
extern crate rustc_llvm as llvm;
|
||||
|
||||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate syntax;
|
||||
|
|
|
@ -51,11 +51,11 @@ extern crate rustc_lint;
|
|||
extern crate rustc_back;
|
||||
extern crate serialize;
|
||||
extern crate syntax;
|
||||
extern crate "test" as testing;
|
||||
extern crate test as testing;
|
||||
extern crate unicode;
|
||||
#[macro_use] extern crate log;
|
||||
|
||||
extern crate "serialize" as rustc_serialize; // used by deriving
|
||||
extern crate serialize as rustc_serialize; // used by deriving
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -149,9 +149,9 @@ extern crate core;
|
|||
|
||||
#[macro_use]
|
||||
#[macro_reexport(vec, format)]
|
||||
extern crate "collections" as core_collections;
|
||||
extern crate collections as core_collections;
|
||||
|
||||
#[allow(deprecated)] extern crate "rand" as core_rand;
|
||||
#[allow(deprecated)] extern crate rand as core_rand;
|
||||
extern crate alloc;
|
||||
extern crate unicode;
|
||||
extern crate libc;
|
||||
|
@ -159,7 +159,7 @@ extern crate libc;
|
|||
#[macro_use] #[no_link] extern crate rustc_bitflags;
|
||||
|
||||
// Make std testable by not duplicating lang items. See #2912
|
||||
#[cfg(test)] extern crate "std" as realstd;
|
||||
#[cfg(test)] extern crate std as realstd;
|
||||
#[cfg(test)] pub use realstd::marker;
|
||||
#[cfg(test)] pub use realstd::ops;
|
||||
#[cfg(test)] pub use realstd::cmp;
|
||||
|
|
|
@ -397,7 +397,7 @@ impl<'a> Buffer for BufReader<'a> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
extern crate "test" as test_crate;
|
||||
extern crate test as test_crate;
|
||||
use old_io::{SeekSet, SeekCur, SeekEnd, Reader, Writer, Seek, Buffer};
|
||||
use prelude::v1::{Ok, Err, Vec, AsSlice};
|
||||
use prelude::v1::IteratorExt;
|
||||
|
|
|
@ -50,7 +50,7 @@ extern crate libc;
|
|||
#[macro_use] extern crate log;
|
||||
#[macro_use] #[no_link] extern crate rustc_bitflags;
|
||||
|
||||
extern crate "serialize" as rustc_serialize; // used by deriving
|
||||
extern crate serialize as rustc_serialize; // used by deriving
|
||||
|
||||
pub mod util {
|
||||
pub mod interner;
|
||||
|
|
|
@ -4979,7 +4979,7 @@ impl<'a> Parser<'a> {
|
|||
///
|
||||
/// extern crate url;
|
||||
/// extern crate foo = "bar"; //deprecated
|
||||
/// extern crate "bar" as foo;
|
||||
/// extern crate bar as foo;
|
||||
fn parse_item_extern_crate(&mut self,
|
||||
lo: BytePos,
|
||||
visibility: Visibility,
|
||||
|
|
|
@ -52,7 +52,7 @@ struct StandardLibraryInjector {
|
|||
impl fold::Folder for StandardLibraryInjector {
|
||||
fn fold_crate(&mut self, mut krate: ast::Crate) -> ast::Crate {
|
||||
|
||||
// The name to use in `extern crate "name" as std;`
|
||||
// The name to use in `extern crate name as std;`
|
||||
let actual_crate_name = match self.alt_std_name {
|
||||
Some(ref s) => token::intern(&s),
|
||||
None => token::intern("std"),
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
extern crate getopts;
|
||||
extern crate serialize;
|
||||
extern crate "serialize" as rustc_serialize;
|
||||
extern crate serialize as rustc_serialize;
|
||||
extern crate term;
|
||||
extern crate libc;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#![crate_type = "dylib"]
|
||||
#![feature(plugin_registrar, quote, rustc_private)]
|
||||
|
||||
extern crate "syntax_extension_with_dll_deps_1" as other;
|
||||
extern crate syntax_extension_with_dll_deps_1 as other;
|
||||
extern crate syntax;
|
||||
extern crate rustc;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// aux-build:trait_default_method_xc_aux.rs
|
||||
|
||||
extern crate "trait_default_method_xc_aux" as aux;
|
||||
extern crate trait_default_method_xc_aux as aux;
|
||||
use aux::A;
|
||||
|
||||
pub struct a_struct { pub x: int }
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
extern crate graphviz;
|
||||
// A simple rust project
|
||||
|
||||
extern crate "flate" as myflate;
|
||||
extern crate flate as myflate;
|
||||
|
||||
use std::collections::{HashMap,HashSet};
|
||||
use std::cell::RefCell;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
extern crate core;
|
||||
extern crate rand;
|
||||
extern crate "serialize" as rustc_serialize;
|
||||
extern crate serialize as rustc_serialize;
|
||||
extern crate collections;
|
||||
|
||||
// Issue #16803
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "std" as mystd;
|
||||
extern crate std as mystd;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#![feature(lang_items, start, no_std, core, collections)]
|
||||
#![no_std]
|
||||
|
||||
extern crate "std" as other;
|
||||
extern crate std as other;
|
||||
|
||||
#[macro_use] extern crate core;
|
||||
#[macro_use] extern crate collections;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#![feature(lang_items, start, no_std, core, collections)]
|
||||
#![no_std]
|
||||
|
||||
extern crate "std" as other;
|
||||
extern crate std as other;
|
||||
|
||||
#[macro_use] extern crate core;
|
||||
#[macro_use] extern crate collections;
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#[macro_use] extern crate "std" as std2;
|
||||
#[macro_use] extern crate std as std2;
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#![feature(linkage)]
|
||||
|
||||
extern crate "linkage1" as other;
|
||||
extern crate linkage1 as other;
|
||||
|
||||
extern {
|
||||
#[linkage = "extern_weak"]
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// ignore-stage1
|
||||
|
||||
#[macro_use]
|
||||
extern crate "macro_crate_nonterminal" as new_name;
|
||||
extern crate macro_crate_nonterminal as new_name;
|
||||
|
||||
pub fn main() {
|
||||
new_name::check_local();
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "static_fn_inline_xc_aux" as mycore;
|
||||
extern crate static_fn_inline_xc_aux as mycore;
|
||||
|
||||
use mycore::num;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "static_fn_trait_xc_aux" as mycore;
|
||||
extern crate static_fn_trait_xc_aux as mycore;
|
||||
|
||||
use mycore::num;
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "trait_default_method_xc_aux" as aux;
|
||||
extern crate "trait_default_method_xc_aux_2" as aux2;
|
||||
extern crate trait_default_method_xc_aux as aux;
|
||||
extern crate trait_default_method_xc_aux_2 as aux2;
|
||||
use aux::A;
|
||||
use aux2::{a_struct, welp};
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "trait_default_method_xc_aux" as aux;
|
||||
extern crate trait_default_method_xc_aux as aux;
|
||||
use aux::{A, TestEquality, Something};
|
||||
use aux::B;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "trait_inheritance_auto_xc_2_aux" as aux;
|
||||
extern crate trait_inheritance_auto_xc_2_aux as aux;
|
||||
|
||||
// aux defines impls of Foo, Bar and Baz for A
|
||||
use aux::{Foo, Bar, Baz, A};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "trait_inheritance_auto_xc_aux" as aux;
|
||||
extern crate trait_inheritance_auto_xc_aux as aux;
|
||||
|
||||
use aux::{Foo, Bar, Baz, Quux};
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "trait_inheritance_cross_trait_call_xc_aux" as aux;
|
||||
extern crate trait_inheritance_cross_trait_call_xc_aux as aux;
|
||||
|
||||
use aux::Foo;
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
// Issue #1706
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "std" as stdlib;
|
||||
extern crate std as stdlib;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#![no_std]
|
||||
|
||||
extern crate std;
|
||||
extern crate "std" as zed;
|
||||
extern crate std as zed;
|
||||
|
||||
use std::str;
|
||||
use zed::str as x;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#![feature(lang_items, start, no_std, core, libc, collections)]
|
||||
#![no_std]
|
||||
|
||||
extern crate "std" as other;
|
||||
extern crate std as other;
|
||||
|
||||
#[macro_use]
|
||||
extern crate core;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
extern crate "xcrate_address_insignificant" as foo;
|
||||
extern crate xcrate_address_insignificant as foo;
|
||||
|
||||
pub fn main() {
|
||||
assert_eq!(foo::foo::<f64>(), foo::bar());
|
||||
|
|
Loading…
Add table
Reference in a new issue