diff --git a/src/doc/reference.md b/src/doc/reference.md index 86b1c84c97a..4da7d6db444 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -937,7 +937,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 diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs index 7d8789c3cd1..b6a8525675e 100644 --- a/src/librustc/metadata/creader.rs +++ b/src/librustc/metadata/creader.rs @@ -73,24 +73,20 @@ struct CrateInfo { } pub fn validate_crate_name(sess: Option<&Session>, s: &str, sp: Option) { - let say = |s: &str, warn: bool| { + let say = |s: &str| { match (sp, sess) { (_, None) => panic!("{}", s), - (Some(sp), Some(sess)) if warn => sess.span_warn(sp, s), (Some(sp), Some(sess)) => sess.span_err(sp, s), - (None, Some(sess)) if warn => sess.warn(s), (None, Some(sess)) => sess.err(s), } }; if s.len() == 0 { - say("crate name must not be empty", false); - } else if s.contains("-") { - say(&format!("crate names soon cannot contain hyphens: {}", s), true); + say("crate name must not be empty"); } for c in s.chars() { if c.is_alphanumeric() { continue } - if c == '_' || c == '-' { continue } - say(&format!("invalid character `{}` in crate name: `{}`", c, s), false); + if c == '_' { continue } + say(&format!("invalid character `{}` in crate name: `{}`", c, s)); } match sess { Some(sess) => sess.abort_if_errors(), @@ -306,13 +302,7 @@ impl<'a> CrateReader<'a> { -> Option { let mut ret = None; self.sess.cstore.iter_crate_data(|cnum, data| { - // For now we do a "fuzzy match" on crate names by considering - // hyphens equal to underscores. This is purely meant to be a - // transitionary feature while we deprecate the quote syntax of - // `extern crate` statements. - if data.name != name.replace("-", "_") { - return - } + if data.name != name { return } match hash { Some(hash) if *hash == data.hash() => { ret = Some(cnum); return } diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 5e85209fe1a..ad777351898 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -159,11 +159,19 @@ pub fn find_crate_name(sess: Option<&Session>, } if let Input::File(ref path) = *input { if let Some(s) = path.file_stem().and_then(|s| s.to_str()) { - return validate(s.to_string(), None); + if s.starts_with("-") { + let msg = format!("crate names cannot start with a `-`, but \ + `{}` has a leading hyphen", s); + if let Some(sess) = sess { + sess.err(&msg); + } + } else { + return validate(s.replace("-", "_"), None); + } } } - "rust-out".to_string() + "rust_out".to_string() } pub fn build_link_meta(sess: &Session, krate: &ast::Crate, @@ -455,7 +463,11 @@ pub fn filename_for_input(sess: &Session, } config::CrateTypeExecutable => { let suffix = &sess.target.target.options.exe_suffix; - out_filename.with_file_name(&format!("{}{}", libname, suffix)) + if suffix.len() == 0 { + out_filename.to_path_buf() + } else { + out_filename.with_extension(&suffix[1..]) + } } } } diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index 6d17627e0a7..702a32be586 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -224,7 +224,7 @@ fn runtest(test: &str, cratename: &str, libs: SearchPaths, // environment to ensure that the target loads the right libraries at // runtime. It would be a sad day if the *host* libraries were loaded as a // mistake. - let mut cmd = Command::new(&outdir.path().join("rust-out")); + let mut cmd = Command::new(&outdir.path().join("rust_out")); let var = DynamicLibrary::envvar(); let newpath = { let path = env::var_os(var).unwrap_or(OsString::new()); diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 9d8d4eec18a..b287093bf19 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4951,46 +4951,19 @@ impl<'a> Parser<'a> { /// /// # Examples /// - /// extern crate url; - /// extern crate foo = "bar"; //deprecated - /// extern crate "bar" as foo; + /// extern crate foo; + /// extern crate bar as foo; fn parse_item_extern_crate(&mut self, - lo: BytePos, - visibility: Visibility, - attrs: Vec) + lo: BytePos, + visibility: Visibility, + attrs: Vec) -> P { - let (maybe_path, ident) = match self.token { - token::Ident(..) => { - let crate_name = self.parse_ident(); - if self.eat_keyword(keywords::As) { - (Some(crate_name.name), self.parse_ident()) - } else { - (None, crate_name) - } - }, - token::Literal(token::Str_(..), suf) | - token::Literal(token::StrRaw(..), suf) => { - let sp = self.span; - self.expect_no_suffix(sp, "extern crate name", suf); - // forgo the internal suffix check of `parse_str` to - // avoid repeats (this unwrap will always succeed due - // to the restriction of the `match`) - let (s, _, _) = self.parse_optional_str().unwrap(); - self.expect_keyword(keywords::As); - let the_ident = self.parse_ident(); - self.obsolete(sp, ObsoleteSyntax::ExternCrateString); - let s = token::intern(&s); - (Some(s), the_ident) - }, - _ => { - let span = self.span; - let token_str = self.this_token_to_string(); - self.span_fatal(span, - &format!("expected extern crate name but \ - found `{}`", - token_str)); - } + let crate_name = self.parse_ident(); + let (maybe_path, ident) = if self.eat_keyword(keywords::As) { + (Some(crate_name.name), self.parse_ident()) + } else { + (None, crate_name) }; self.expect(&token::Semi); diff --git a/src/libsyntax/std_inject.rs b/src/libsyntax/std_inject.rs index 0fa7e4f902c..021ec4738ed 100644 --- a/src/libsyntax/std_inject.rs +++ b/src/libsyntax/std_inject.rs @@ -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"), diff --git a/src/test/auxiliary/issue-12133-dylib2.rs b/src/test/auxiliary/issue-12133-dylib2.rs index cf1953005ba..fa5722ae6a3 100644 --- a/src/test/auxiliary/issue-12133-dylib2.rs +++ b/src/test/auxiliary/issue-12133-dylib2.rs @@ -12,5 +12,5 @@ #![crate_type = "dylib"] -extern crate "issue-12133-rlib" as a; -extern crate "issue-12133-dylib" as b; +extern crate issue_12133_rlib as a; +extern crate issue_12133_dylib as b; diff --git a/src/test/auxiliary/issue-13560-3.rs b/src/test/auxiliary/issue-13560-3.rs index f1f16af6f0e..c0539aa1b6e 100644 --- a/src/test/auxiliary/issue-13560-3.rs +++ b/src/test/auxiliary/issue-13560-3.rs @@ -12,5 +12,5 @@ #![crate_type = "rlib"] -#[macro_use] #[no_link] extern crate "issue-13560-1" as t1; -#[macro_use] extern crate "issue-13560-2" as t2; +#[macro_use] #[no_link] extern crate issue_13560_1 as t1; +#[macro_use] extern crate issue_13560_2 as t2; diff --git a/src/test/auxiliary/issue-13620-2.rs b/src/test/auxiliary/issue-13620-2.rs index da47115e2b3..554170bc130 100644 --- a/src/test/auxiliary/issue-13620-2.rs +++ b/src/test/auxiliary/issue-13620-2.rs @@ -8,6 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate "issue-13620-1" as crate1; +extern crate issue_13620_1 as crate1; pub static FOO2: crate1::Foo = crate1::FOO; diff --git a/src/test/auxiliary/issue-13872-2.rs b/src/test/auxiliary/issue-13872-2.rs index 8294d2b4594..bb51417528a 100644 --- a/src/test/auxiliary/issue-13872-2.rs +++ b/src/test/auxiliary/issue-13872-2.rs @@ -8,6 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate "issue-13872-1" as foo; +extern crate issue_13872_1 as foo; pub use foo::A::B; diff --git a/src/test/auxiliary/issue-13872-3.rs b/src/test/auxiliary/issue-13872-3.rs index 827a9f18f48..e20618f1ec0 100644 --- a/src/test/auxiliary/issue-13872-3.rs +++ b/src/test/auxiliary/issue-13872-3.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate "issue-13872-2" as bar; +extern crate issue_13872_2 as bar; use bar::B; diff --git a/src/test/auxiliary/static-function-pointer-aux.rs b/src/test/auxiliary/static-function-pointer-aux.rs index 38ea619286e..2ccdb4e0864 100644 --- a/src/test/auxiliary/static-function-pointer-aux.rs +++ b/src/test/auxiliary/static-function-pointer-aux.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![crate_name="static-function-pointer-aux"] pub fn f(x: isize) -> isize { -x } diff --git a/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs b/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs index 54da1a1e451..4980eb8b913 100644 --- a/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs +++ b/src/test/auxiliary/syntax_extension_with_dll_deps_2.rs @@ -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; diff --git a/src/test/auxiliary/trait_default_method_xc_aux.rs b/src/test/auxiliary/trait_default_method_xc_aux.rs index 93da8862cf0..c1168a912dc 100644 --- a/src/test/auxiliary/trait_default_method_xc_aux.rs +++ b/src/test/auxiliary/trait_default_method_xc_aux.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![crate_name="trait_default_method_xc_aux"] - pub struct Something { pub x: isize } pub trait A { diff --git a/src/test/auxiliary/trait_default_method_xc_aux_2.rs b/src/test/auxiliary/trait_default_method_xc_aux_2.rs index 3ae9640e35d..7443ef9c0f3 100644 --- a/src/test/auxiliary/trait_default_method_xc_aux_2.rs +++ b/src/test/auxiliary/trait_default_method_xc_aux_2.rs @@ -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: isize } diff --git a/src/test/compile-fail/bad-crate-id2.rs b/src/test/compile-fail/bad-crate-id2.rs deleted file mode 100644 index 29df0fa705e..00000000000 --- a/src/test/compile-fail/bad-crate-id2.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -extern crate "#a" as bar; //~ ERROR: invalid character `#` in crate name: `#a` -//~^ WARNING: obsolete syntax - -fn main() {} diff --git a/src/test/compile-fail/use-meta-mismatch.rs b/src/test/compile-fail/use-meta-mismatch.rs index 808deea226b..6b7b9c89149 100644 --- a/src/test/compile-fail/use-meta-mismatch.rs +++ b/src/test/compile-fail/use-meta-mismatch.rs @@ -10,6 +10,6 @@ // error-pattern:can't find crate for `extra` -extern crate "fake-crate" as extra; +extern crate fake_crate as extra; fn main() { } diff --git a/src/test/compile-fail/weak-lang-item.rs b/src/test/compile-fail/weak-lang-item.rs index 42df43934a8..708d56442fe 100644 --- a/src/test/compile-fail/weak-lang-item.rs +++ b/src/test/compile-fail/weak-lang-item.rs @@ -17,4 +17,4 @@ #![no_std] extern crate core; -extern crate "weak-lang-items" as other; +extern crate weak_lang_items; diff --git a/src/test/debuginfo/basic-types-globals-metadata.rs b/src/test/debuginfo/basic-types-globals-metadata.rs index 2c44afa4b8a..1aabd549ca5 100644 --- a/src/test/debuginfo/basic-types-globals-metadata.rs +++ b/src/test/debuginfo/basic-types-globals-metadata.rs @@ -12,33 +12,33 @@ // compile-flags:-g // gdb-command:run -// gdb-command:whatis 'basic-types-globals-metadata::B' +// gdb-command:whatis 'basic_types_globals_metadata::B' // gdb-check:type = bool -// gdb-command:whatis 'basic-types-globals-metadata::I' +// gdb-command:whatis 'basic_types_globals_metadata::I' // gdb-check:type = isize -// gdb-command:whatis 'basic-types-globals-metadata::C' +// gdb-command:whatis 'basic_types_globals_metadata::C' // gdb-check:type = char -// gdb-command:whatis 'basic-types-globals-metadata::I8' +// gdb-command:whatis 'basic_types_globals_metadata::I8' // gdb-check:type = i8 -// gdb-command:whatis 'basic-types-globals-metadata::I16' +// gdb-command:whatis 'basic_types_globals_metadata::I16' // gdb-check:type = i16 -// gdb-command:whatis 'basic-types-globals-metadata::I32' +// gdb-command:whatis 'basic_types_globals_metadata::I32' // gdb-check:type = i32 -// gdb-command:whatis 'basic-types-globals-metadata::I64' +// gdb-command:whatis 'basic_types_globals_metadata::I64' // gdb-check:type = i64 -// gdb-command:whatis 'basic-types-globals-metadata::U' +// gdb-command:whatis 'basic_types_globals_metadata::U' // gdb-check:type = usize -// gdb-command:whatis 'basic-types-globals-metadata::U8' +// gdb-command:whatis 'basic_types_globals_metadata::U8' // gdb-check:type = u8 -// gdb-command:whatis 'basic-types-globals-metadata::U16' +// gdb-command:whatis 'basic_types_globals_metadata::U16' // gdb-check:type = u16 -// gdb-command:whatis 'basic-types-globals-metadata::U32' +// gdb-command:whatis 'basic_types_globals_metadata::U32' // gdb-check:type = u32 -// gdb-command:whatis 'basic-types-globals-metadata::U64' +// gdb-command:whatis 'basic_types_globals_metadata::U64' // gdb-check:type = u64 -// gdb-command:whatis 'basic-types-globals-metadata::F32' +// gdb-command:whatis 'basic_types_globals_metadata::F32' // gdb-check:type = f32 -// gdb-command:whatis 'basic-types-globals-metadata::F64' +// gdb-command:whatis 'basic_types_globals_metadata::F64' // gdb-check:type = f64 // gdb-command:continue diff --git a/src/test/debuginfo/basic-types-globals.rs b/src/test/debuginfo/basic-types-globals.rs index 745beab17be..f0c187fd223 100644 --- a/src/test/debuginfo/basic-types-globals.rs +++ b/src/test/debuginfo/basic-types-globals.rs @@ -18,33 +18,33 @@ // compile-flags:-g // gdb-command:run -// gdb-command:print 'basic-types-globals::B' +// gdb-command:print 'basic_types_globals::B' // gdb-check:$1 = false -// gdb-command:print 'basic-types-globals::I' +// gdb-command:print 'basic_types_globals::I' // gdb-check:$2 = -1 -// gdb-command:print 'basic-types-globals::C' +// gdb-command:print 'basic_types_globals::C' // gdb-check:$3 = 97 -// gdb-command:print/d 'basic-types-globals::I8' +// gdb-command:print/d 'basic_types_globals::I8' // gdb-check:$4 = 68 -// gdb-command:print 'basic-types-globals::I16' +// gdb-command:print 'basic_types_globals::I16' // gdb-check:$5 = -16 -// gdb-command:print 'basic-types-globals::I32' +// gdb-command:print 'basic_types_globals::I32' // gdb-check:$6 = -32 -// gdb-command:print 'basic-types-globals::I64' +// gdb-command:print 'basic_types_globals::I64' // gdb-check:$7 = -64 -// gdb-command:print 'basic-types-globals::U' +// gdb-command:print 'basic_types_globals::U' // gdb-check:$8 = 1 -// gdb-command:print/d 'basic-types-globals::U8' +// gdb-command:print/d 'basic_types_globals::U8' // gdb-check:$9 = 100 -// gdb-command:print 'basic-types-globals::U16' +// gdb-command:print 'basic_types_globals::U16' // gdb-check:$10 = 16 -// gdb-command:print 'basic-types-globals::U32' +// gdb-command:print 'basic_types_globals::U32' // gdb-check:$11 = 32 -// gdb-command:print 'basic-types-globals::U64' +// gdb-command:print 'basic_types_globals::U64' // gdb-check:$12 = 64 -// gdb-command:print 'basic-types-globals::F32' +// gdb-command:print 'basic_types_globals::F32' // gdb-check:$13 = 2.5 -// gdb-command:print 'basic-types-globals::F64' +// gdb-command:print 'basic_types_globals::F64' // gdb-check:$14 = 3.5 // gdb-command:continue diff --git a/src/test/debuginfo/basic-types-mut-globals.rs b/src/test/debuginfo/basic-types-mut-globals.rs index 6540f268220..4094c2e9b13 100644 --- a/src/test/debuginfo/basic-types-mut-globals.rs +++ b/src/test/debuginfo/basic-types-mut-globals.rs @@ -21,64 +21,64 @@ // gdb-command:run // Check initializers -// gdb-command:print 'basic-types-mut-globals::B' +// gdb-command:print 'basic_types_mut_globals::B' // gdb-check:$1 = false -// gdb-command:print 'basic-types-mut-globals::I' +// gdb-command:print 'basic_types_mut_globals::I' // gdb-check:$2 = -1 -// gdb-command:print 'basic-types-mut-globals::C' +// gdb-command:print 'basic_types_mut_globals::C' // gdb-check:$3 = 97 -// gdb-command:print/d 'basic-types-mut-globals::I8' +// gdb-command:print/d 'basic_types_mut_globals::I8' // gdb-check:$4 = 68 -// gdb-command:print 'basic-types-mut-globals::I16' +// gdb-command:print 'basic_types_mut_globals::I16' // gdb-check:$5 = -16 -// gdb-command:print 'basic-types-mut-globals::I32' +// gdb-command:print 'basic_types_mut_globals::I32' // gdb-check:$6 = -32 -// gdb-command:print 'basic-types-mut-globals::I64' +// gdb-command:print 'basic_types_mut_globals::I64' // gdb-check:$7 = -64 -// gdb-command:print 'basic-types-mut-globals::U' +// gdb-command:print 'basic_types_mut_globals::U' // gdb-check:$8 = 1 -// gdb-command:print/d 'basic-types-mut-globals::U8' +// gdb-command:print/d 'basic_types_mut_globals::U8' // gdb-check:$9 = 100 -// gdb-command:print 'basic-types-mut-globals::U16' +// gdb-command:print 'basic_types_mut_globals::U16' // gdb-check:$10 = 16 -// gdb-command:print 'basic-types-mut-globals::U32' +// gdb-command:print 'basic_types_mut_globals::U32' // gdb-check:$11 = 32 -// gdb-command:print 'basic-types-mut-globals::U64' +// gdb-command:print 'basic_types_mut_globals::U64' // gdb-check:$12 = 64 -// gdb-command:print 'basic-types-mut-globals::F32' +// gdb-command:print 'basic_types_mut_globals::F32' // gdb-check:$13 = 2.5 -// gdb-command:print 'basic-types-mut-globals::F64' +// gdb-command:print 'basic_types_mut_globals::F64' // gdb-check:$14 = 3.5 // gdb-command:continue // Check new values -// gdb-command:print 'basic-types-mut-globals'::B +// gdb-command:print 'basic_types_mut_globals'::B // gdb-check:$15 = true -// gdb-command:print 'basic-types-mut-globals'::I +// gdb-command:print 'basic_types_mut_globals'::I // gdb-check:$16 = 2 -// gdb-command:print 'basic-types-mut-globals'::C +// gdb-command:print 'basic_types_mut_globals'::C // gdb-check:$17 = 102 -// gdb-command:print/d 'basic-types-mut-globals'::I8 +// gdb-command:print/d 'basic_types_mut_globals'::I8 // gdb-check:$18 = 78 -// gdb-command:print 'basic-types-mut-globals'::I16 +// gdb-command:print 'basic_types_mut_globals'::I16 // gdb-check:$19 = -26 -// gdb-command:print 'basic-types-mut-globals'::I32 +// gdb-command:print 'basic_types_mut_globals'::I32 // gdb-check:$20 = -12 -// gdb-command:print 'basic-types-mut-globals'::I64 +// gdb-command:print 'basic_types_mut_globals'::I64 // gdb-check:$21 = -54 -// gdb-command:print 'basic-types-mut-globals'::U +// gdb-command:print 'basic_types_mut_globals'::U // gdb-check:$22 = 5 -// gdb-command:print/d 'basic-types-mut-globals'::U8 +// gdb-command:print/d 'basic_types_mut_globals'::U8 // gdb-check:$23 = 20 -// gdb-command:print 'basic-types-mut-globals'::U16 +// gdb-command:print 'basic_types_mut_globals'::U16 // gdb-check:$24 = 32 -// gdb-command:print 'basic-types-mut-globals'::U32 +// gdb-command:print 'basic_types_mut_globals'::U32 // gdb-check:$25 = 16 -// gdb-command:print 'basic-types-mut-globals'::U64 +// gdb-command:print 'basic_types_mut_globals'::U64 // gdb-check:$26 = 128 -// gdb-command:print 'basic-types-mut-globals'::F32 +// gdb-command:print 'basic_types_mut_globals'::F32 // gdb-check:$27 = 5.75 -// gdb-command:print 'basic-types-mut-globals'::F64 +// gdb-command:print 'basic_types_mut_globals'::F64 // gdb-check:$28 = 9.25 #![allow(unused_variables)] diff --git a/src/test/debuginfo/c-style-enum.rs b/src/test/debuginfo/c-style-enum.rs index 766105881ce..7a285d90b9d 100644 --- a/src/test/debuginfo/c-style-enum.rs +++ b/src/test/debuginfo/c-style-enum.rs @@ -15,25 +15,25 @@ // === GDB TESTS =================================================================================== -// gdb-command:print 'c-style-enum::SINGLE_VARIANT' +// gdb-command:print 'c_style_enum::SINGLE_VARIANT' // gdb-check:$1 = TheOnlyVariant -// gdb-command:print 'c-style-enum::AUTO_ONE' +// gdb-command:print 'c_style_enum::AUTO_ONE' // gdb-check:$2 = One -// gdb-command:print 'c-style-enum::AUTO_TWO' +// gdb-command:print 'c_style_enum::AUTO_TWO' // gdb-check:$3 = One -// gdb-command:print 'c-style-enum::AUTO_THREE' +// gdb-command:print 'c_style_enum::AUTO_THREE' // gdb-check:$4 = One -// gdb-command:print 'c-style-enum::MANUAL_ONE' +// gdb-command:print 'c_style_enum::MANUAL_ONE' // gdb-check:$5 = OneHundred -// gdb-command:print 'c-style-enum::MANUAL_TWO' +// gdb-command:print 'c_style_enum::MANUAL_TWO' // gdb-check:$6 = OneHundred -// gdb-command:print 'c-style-enum::MANUAL_THREE' +// gdb-command:print 'c_style_enum::MANUAL_THREE' // gdb-check:$7 = OneHundred // gdb-command:run @@ -59,16 +59,16 @@ // gdb-command:print single_variant // gdb-check:$14 = TheOnlyVariant -// gdb-command:print 'c-style-enum::AUTO_TWO' +// gdb-command:print 'c_style_enum::AUTO_TWO' // gdb-check:$15 = Two -// gdb-command:print 'c-style-enum::AUTO_THREE' +// gdb-command:print 'c_style_enum::AUTO_THREE' // gdb-check:$16 = Three -// gdb-command:print 'c-style-enum::MANUAL_TWO' +// gdb-command:print 'c_style_enum::MANUAL_TWO' // gdb-check:$17 = OneThousand -// gdb-command:print 'c-style-enum::MANUAL_THREE' +// gdb-command:print 'c_style_enum::MANUAL_THREE' // gdb-check:$18 = OneMillion diff --git a/src/test/debuginfo/generic-struct.rs b/src/test/debuginfo/generic-struct.rs index 15982f309c6..a459badfa8a 100644 --- a/src/test/debuginfo/generic-struct.rs +++ b/src/test/debuginfo/generic-struct.rs @@ -38,7 +38,7 @@ // lldb-check:[...]$2 = AGenericStruct { key: 4.5, value: 5 } // lldb-command:print float_int_float -// lldb-check:[...]$3 = AGenericStruct> { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } } +// lldb-check:[...]$3 = AGenericStruct> { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } } #![omit_gdb_pretty_printer_section] diff --git a/src/test/debuginfo/lexical-scopes-in-block-expression.rs b/src/test/debuginfo/lexical-scopes-in-block-expression.rs index 63e2402c65d..1d406af10a2 100644 --- a/src/test/debuginfo/lexical-scopes-in-block-expression.rs +++ b/src/test/debuginfo/lexical-scopes-in-block-expression.rs @@ -16,7 +16,7 @@ // gdb-command:run -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$1 = 0 // STRUCT EXPRESSION @@ -28,7 +28,7 @@ // gdb-command:print val // gdb-check:$4 = 11 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$5 = 1 // gdb-command:print ten // gdb-check:$6 = 10 @@ -49,7 +49,7 @@ // gdb-command:print val // gdb-check:$11 = 12 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$12 = 2 // gdb-command:print ten // gdb-check:$13 = 10 @@ -70,7 +70,7 @@ // gdb-command:print val // gdb-check:$18 = 13 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$19 = 3 // gdb-command:print ten // gdb-check:$20 = 10 @@ -91,7 +91,7 @@ // gdb-command:print val // gdb-check:$25 = 14 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$26 = 4 // gdb-command:print ten // gdb-check:$27 = 10 @@ -112,7 +112,7 @@ // gdb-command:print val // gdb-check:$32 = 15 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$33 = 5 // gdb-command:print ten // gdb-check:$34 = 10 @@ -133,7 +133,7 @@ // gdb-command:print val // gdb-check:$39 = 16 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$40 = 6 // gdb-command:print ten // gdb-check:$41 = 10 @@ -155,7 +155,7 @@ // gdb-command:print val // gdb-check:$46 = 17 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$47 = 7 // gdb-command:print ten // gdb-check:$48 = 10 @@ -176,7 +176,7 @@ // gdb-command:print val // gdb-check:$53 = 18 -// gdb-command:print 'lexical-scopes-in-block-expression::MUT_INT' +// gdb-command:print 'lexical_scopes_in_block_expression::MUT_INT' // gdb-check:$54 = 8 // gdb-command:print ten // gdb-check:$55 = 10 diff --git a/src/test/debuginfo/simple-struct.rs b/src/test/debuginfo/simple-struct.rs index eee3cf55052..36007c10932 100644 --- a/src/test/debuginfo/simple-struct.rs +++ b/src/test/debuginfo/simple-struct.rs @@ -14,22 +14,22 @@ // === GDB TESTS =================================================================================== -// gdb-command:print 'simple-struct::NO_PADDING_16' +// gdb-command:print 'simple_struct::NO_PADDING_16' // gdb-check:$1 = {x = 1000, y = -1001} -// gdb-command:print 'simple-struct::NO_PADDING_32' +// gdb-command:print 'simple_struct::NO_PADDING_32' // gdb-check:$2 = {x = 1, y = 2, z = 3} -// gdb-command:print 'simple-struct::NO_PADDING_64' +// gdb-command:print 'simple_struct::NO_PADDING_64' // gdb-check:$3 = {x = 4, y = 5, z = 6} -// gdb-command:print 'simple-struct::NO_PADDING_163264' +// gdb-command:print 'simple_struct::NO_PADDING_163264' // gdb-check:$4 = {a = 7, b = 8, c = 9, d = 10} -// gdb-command:print 'simple-struct::INTERNAL_PADDING' +// gdb-command:print 'simple_struct::INTERNAL_PADDING' // gdb-check:$5 = {x = 11, y = 12} -// gdb-command:print 'simple-struct::PADDING_AT_END' +// gdb-command:print 'simple_struct::PADDING_AT_END' // gdb-check:$6 = {x = 13, y = 14} // gdb-command:run @@ -52,22 +52,22 @@ // gdb-command:print padding_at_end // gdb-check:$12 = {x = -10014, y = 10015} -// gdb-command:print 'simple-struct::NO_PADDING_16' +// gdb-command:print 'simple_struct::NO_PADDING_16' // gdb-check:$13 = {x = 100, y = -101} -// gdb-command:print 'simple-struct::NO_PADDING_32' +// gdb-command:print 'simple_struct::NO_PADDING_32' // gdb-check:$14 = {x = -15, y = -16, z = 17} -// gdb-command:print 'simple-struct::NO_PADDING_64' +// gdb-command:print 'simple_struct::NO_PADDING_64' // gdb-check:$15 = {x = -18, y = 19, z = 20} -// gdb-command:print 'simple-struct::NO_PADDING_163264' +// gdb-command:print 'simple_struct::NO_PADDING_163264' // gdb-check:$16 = {a = -21, b = 22, c = 23, d = 24} -// gdb-command:print 'simple-struct::INTERNAL_PADDING' +// gdb-command:print 'simple_struct::INTERNAL_PADDING' // gdb-check:$17 = {x = 25, y = -26} -// gdb-command:print 'simple-struct::PADDING_AT_END' +// gdb-command:print 'simple_struct::PADDING_AT_END' // gdb-check:$18 = {x = -27, y = 28} // gdb-command:continue diff --git a/src/test/debuginfo/simple-tuple.rs b/src/test/debuginfo/simple-tuple.rs index 75db47af246..3c3a85a34c7 100644 --- a/src/test/debuginfo/simple-tuple.rs +++ b/src/test/debuginfo/simple-tuple.rs @@ -14,21 +14,21 @@ // === GDB TESTS =================================================================================== -// gdb-command:print/d 'simple-tuple::NO_PADDING_8' +// gdb-command:print/d 'simple_tuple::NO_PADDING_8' // gdb-check:$1 = {-50, 50} -// gdb-command:print 'simple-tuple::NO_PADDING_16' +// gdb-command:print 'simple_tuple::NO_PADDING_16' // gdb-check:$2 = {-1, 2, 3} -// gdb-command:print 'simple-tuple::NO_PADDING_32' +// gdb-command:print 'simple_tuple::NO_PADDING_32' // gdb-check:$3 = {4, 5, 6} -// gdb-command:print 'simple-tuple::NO_PADDING_64' +// gdb-command:print 'simple_tuple::NO_PADDING_64' // gdb-check:$4 = {7, 8, 9} -// gdb-command:print 'simple-tuple::INTERNAL_PADDING_1' +// gdb-command:print 'simple_tuple::INTERNAL_PADDING_1' // gdb-check:$5 = {10, 11} -// gdb-command:print 'simple-tuple::INTERNAL_PADDING_2' +// gdb-command:print 'simple_tuple::INTERNAL_PADDING_2' // gdb-check:$6 = {12, 13, 14, 15} -// gdb-command:print 'simple-tuple::PADDING_AT_END' +// gdb-command:print 'simple_tuple::PADDING_AT_END' // gdb-check:$7 = {16, 17} // gdb-command:run @@ -50,21 +50,21 @@ // gdb-command:print paddingAtEnd // gdb-check:$14 = {15, 16} -// gdb-command:print/d 'simple-tuple::NO_PADDING_8' +// gdb-command:print/d 'simple_tuple::NO_PADDING_8' // gdb-check:$15 = {-127, 127} -// gdb-command:print 'simple-tuple::NO_PADDING_16' +// gdb-command:print 'simple_tuple::NO_PADDING_16' // gdb-check:$16 = {-10, 10, 9} -// gdb-command:print 'simple-tuple::NO_PADDING_32' +// gdb-command:print 'simple_tuple::NO_PADDING_32' // gdb-check:$17 = {14, 15, 16} -// gdb-command:print 'simple-tuple::NO_PADDING_64' +// gdb-command:print 'simple_tuple::NO_PADDING_64' // gdb-check:$18 = {17, 18, 19} -// gdb-command:print 'simple-tuple::INTERNAL_PADDING_1' +// gdb-command:print 'simple_tuple::INTERNAL_PADDING_1' // gdb-check:$19 = {110, 111} -// gdb-command:print 'simple-tuple::INTERNAL_PADDING_2' +// gdb-command:print 'simple_tuple::INTERNAL_PADDING_2' // gdb-check:$20 = {112, 113, 114, 115} -// gdb-command:print 'simple-tuple::PADDING_AT_END' +// gdb-command:print 'simple_tuple::PADDING_AT_END' // gdb-check:$21 = {116, 117} diff --git a/src/test/debuginfo/type-names.rs b/src/test/debuginfo/type-names.rs index d4cbd255e34..e7ee9e2ccf8 100644 --- a/src/test/debuginfo/type-names.rs +++ b/src/test/debuginfo/type-names.rs @@ -21,10 +21,10 @@ // gdb-check:type = struct Struct1 // gdb-command:whatis generic_struct1 -// gdb-check:type = struct GenericStruct +// gdb-check:type = struct GenericStruct // gdb-command:whatis generic_struct2 -// gdb-check:type = struct GenericStruct usize> +// gdb-check:type = struct GenericStruct usize> // gdb-command:whatis mod_struct // gdb-check:type = struct Struct2 @@ -41,18 +41,18 @@ // gdb-check:type = union Enum2 // gdb-command:whatis generic_enum_1 -// gdb-check:type = union Enum3 +// gdb-check:type = union Enum3 // gdb-command:whatis generic_enum_2 -// gdb-check:type = union Enum3 +// gdb-check:type = union Enum3 // TUPLES // gdb-command:whatis tuple1 -// gdb-check:type = struct (u32, type-names::Struct1, type-names::Mod1::Mod2::Enum3) +// gdb-check:type = struct (u32, type_names::Struct1, type_names::Mod1::Mod2::Enum3) // gdb-command:whatis tuple2 -// gdb-check:type = struct ((type-names::Struct1, type-names::Mod1::Mod2::Struct3), type-names::Mod1::Enum2, char) +// gdb-check:type = struct ((type_names::Struct1, type_names::Mod1::Mod2::Struct3), type_names::Mod1::Enum2, char) // BOX @@ -60,46 +60,46 @@ // gdb-check:type = struct (Box, i32) // gdb-command:whatis box2 -// gdb-check:type = struct (Box>, i32) +// gdb-check:type = struct (Box>, i32) // REFERENCES // gdb-command:whatis ref1 -// gdb-check:type = struct (&type-names::Struct1, i32) +// gdb-check:type = struct (&type_names::Struct1, i32) // gdb-command:whatis ref2 -// gdb-check:type = struct (&type-names::GenericStruct, i32) +// gdb-check:type = struct (&type_names::GenericStruct, i32) // gdb-command:whatis mut_ref1 -// gdb-check:type = struct (&mut type-names::Struct1, i32) +// gdb-check:type = struct (&mut type_names::Struct1, i32) // gdb-command:whatis mut_ref2 -// gdb-check:type = struct (&mut type-names::GenericStruct, i32) +// gdb-check:type = struct (&mut type_names::GenericStruct, i32) // RAW POINTERS // gdb-command:whatis mut_ptr1 -// gdb-check:type = struct (*mut type-names::Struct1, isize) +// gdb-check:type = struct (*mut type_names::Struct1, isize) // gdb-command:whatis mut_ptr2 // gdb-check:type = struct (*mut isize, isize) // gdb-command:whatis mut_ptr3 -// gdb-check:type = struct (*mut type-names::Mod1::Mod2::Enum3, isize) +// gdb-check:type = struct (*mut type_names::Mod1::Mod2::Enum3, isize) // gdb-command:whatis const_ptr1 -// gdb-check:type = struct (*const type-names::Struct1, isize) +// gdb-check:type = struct (*const type_names::Struct1, isize) // gdb-command:whatis const_ptr2 // gdb-check:type = struct (*const isize, isize) // gdb-command:whatis const_ptr3 -// gdb-check:type = struct (*const type-names::Mod1::Mod2::Enum3, isize) +// gdb-check:type = struct (*const type_names::Mod1::Mod2::Enum3, isize) // VECTORS // gdb-command:whatis fixed_size_vec1 -// gdb-check:type = struct ([type-names::Struct1; 3], i16) +// gdb-check:type = struct ([type_names::Struct1; 3], i16) // gdb-command:whatis fixed_size_vec2 // gdb-check:type = struct ([usize; 3], i16) @@ -108,7 +108,7 @@ // gdb-check:type = struct &[usize] // gdb-command:whatis slice2 -// gdb-check:type = struct &[type-names::Mod1::Enum2] +// gdb-check:type = struct &[type_names::Mod1::Enum2] // TRAITS @@ -122,18 +122,18 @@ // gdb-check:type = struct &mut Trait1 // gdb-command:whatis generic_box_trait -// gdb-check:type = struct Box> +// gdb-check:type = struct Box> // gdb-command:whatis generic_ref_trait -// gdb-check:type = struct &Trait2 +// gdb-check:type = struct &Trait2 // gdb-command:whatis generic_mut_ref_trait -// gdb-check:type = struct &mut Trait2> +// gdb-check:type = struct &mut Trait2> // BARE FUNCTIONS // gdb-command:whatis rust_fn -// gdb-check:type = struct (fn(core::option::Option, core::option::Option<&type-names::Mod1::Struct2>), usize) +// gdb-check:type = struct (fn(core::option::Option, core::option::Option<&type_names::Mod1::Struct2>), usize) // gdb-command:whatis extern_c_fn // gdb-check:type = struct (extern "C" fn(isize), usize) @@ -148,10 +148,10 @@ // gdb-check:type = struct (fn(f64) -> usize, usize) // gdb-command:whatis extern_c_fn_with_return_value -// gdb-check:type = struct (extern "C" fn() -> type-names::Struct1, usize) +// gdb-check:type = struct (extern "C" fn() -> type_names::Struct1, usize) // gdb-command:whatis unsafe_fn_with_return_value -// gdb-check:type = struct (unsafe fn(type-names::GenericStruct) -> type-names::Mod1::Struct2, usize) +// gdb-check:type = struct (unsafe fn(type_names::GenericStruct) -> type_names::Mod1::Struct2, usize) // gdb-command:whatis extern_stdcall_fn_with_return_value // gdb-check:type = struct (extern "stdcall" fn(Box) -> usize, usize) @@ -160,7 +160,7 @@ // gdb-check:type = struct (fn(isize) -> isize, usize) // gdb-command:whatis generic_function_struct3 -// gdb-check:type = struct (fn(type-names::Mod1::Mod2::Struct3) -> type-names::Mod1::Mod2::Struct3, usize) +// gdb-check:type = struct (fn(type_names::Mod1::Mod2::Struct3) -> type_names::Mod1::Mod2::Struct3, usize) // gdb-command:whatis variadic_function // gdb-check:type = struct (unsafe extern "C" fn(*const u8, ...) -> isize, usize) diff --git a/src/test/debuginfo/vec-slices.rs b/src/test/debuginfo/vec-slices.rs index 3ceb3946f3c..3759082db2c 100644 --- a/src/test/debuginfo/vec-slices.rs +++ b/src/test/debuginfo/vec-slices.rs @@ -49,9 +49,9 @@ // gdb-command:print padded_struct.data_ptr[1] // gdb-check:$13 = {x = 13, y = 14, z = 15} -// gdb-command:print 'vec-slices::MUT_VECT_SLICE'.length +// gdb-command:print 'vec_slices::MUT_VECT_SLICE'.length // gdb-check:$14 = 2 -// gdb-command:print *((int64_t[2]*)('vec-slices::MUT_VECT_SLICE'.data_ptr)) +// gdb-command:print *((int64_t[2]*)('vec_slices::MUT_VECT_SLICE'.data_ptr)) // gdb-check:$15 = {64, 65} diff --git a/src/test/parse-fail/bad-lit-suffixes.rs b/src/test/parse-fail/bad-lit-suffixes.rs index 9e5fe4ab8a9..f1f18115825 100644 --- a/src/test/parse-fail/bad-lit-suffixes.rs +++ b/src/test/parse-fail/bad-lit-suffixes.rs @@ -9,11 +9,6 @@ // except according to those terms. -extern crate - "foo"suffix //~ ERROR extern crate name with a suffix is illegal - //~^ WARNING: obsolete syntax - as foo; - extern "C"suffix //~ ERROR ABI spec with a suffix is illegal fn foo() {} diff --git a/src/test/run-make/output-with-hyphens/Makefile b/src/test/run-make/output-with-hyphens/Makefile new file mode 100644 index 00000000000..783d826a53d --- /dev/null +++ b/src/test/run-make/output-with-hyphens/Makefile @@ -0,0 +1,6 @@ +-include ../tools.mk + +all: + $(RUSTC) foo-bar.rs + [ -f $(TMPDIR)/$(call BIN,foo-bar) ] + [ -f $(TMPDIR)/libfoo_bar.rlib ] diff --git a/src/test/compile-fail/bad-crate-id.rs b/src/test/run-make/output-with-hyphens/foo-bar.rs similarity index 72% rename from src/test/compile-fail/bad-crate-id.rs rename to src/test/run-make/output-with-hyphens/foo-bar.rs index 193666f8269..2f93b2d1ead 100644 --- a/src/test/compile-fail/bad-crate-id.rs +++ b/src/test/run-make/output-with-hyphens/foo-bar.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate "" as foo; //~ ERROR: crate name must not be empty -//~^ WARNING: obsolete syntax +#![crate_type = "lib"] +#![crate_type = "bin"] fn main() {} diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs index d2d97fbb888..5310ed25d3b 100644 --- a/src/test/run-make/save-analysis/foo.rs +++ b/src/test/run-make/save-analysis/foo.rs @@ -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; diff --git a/src/test/run-make/weird-output-filenames/Makefile b/src/test/run-make/weird-output-filenames/Makefile index 2172ed888b1..8b69c68279d 100644 --- a/src/test/run-make/weird-output-filenames/Makefile +++ b/src/test/run-make/weird-output-filenames/Makefile @@ -12,4 +12,4 @@ all: | grep "invalid character.*in crate name:" cp foo.rs $(TMPDIR)/-foo.rs $(RUSTC) $(TMPDIR)/-foo.rs 2>&1 \ - | grep "soon cannot contain hyphens:" + | grep 'crate names cannot start with a `-`' diff --git a/src/test/run-pass-fulldeps/issue-13560.rs b/src/test/run-pass-fulldeps/issue-13560.rs index cd79a95dace..1541e809b61 100644 --- a/src/test/run-pass-fulldeps/issue-13560.rs +++ b/src/test/run-pass-fulldeps/issue-13560.rs @@ -16,7 +16,7 @@ // Regression test for issue #13560, the test itself is all in the dependent // libraries. The fail which previously failed to compile is the one numbered 3. -extern crate "issue-13560-2" as t2; -extern crate "issue-13560-3" as t3; +extern crate issue_13560_2 as t2; +extern crate issue_13560_3 as t3; fn main() {} diff --git a/src/test/run-pass-fulldeps/issue-16822.rs b/src/test/run-pass-fulldeps/issue-16822.rs index 6f02ffa42a7..172d3e31d45 100644 --- a/src/test/run-pass-fulldeps/issue-16822.rs +++ b/src/test/run-pass-fulldeps/issue-16822.rs @@ -10,7 +10,7 @@ // aux-build:issue-16822.rs -extern crate "issue-16822" as lib; +extern crate issue_16822 as lib; use std::cell::RefCell; diff --git a/src/test/run-pass-fulldeps/issue-18502.rs b/src/test/run-pass-fulldeps/issue-18502.rs index 91b24b3b2ab..8367fc110e1 100644 --- a/src/test/run-pass-fulldeps/issue-18502.rs +++ b/src/test/run-pass-fulldeps/issue-18502.rs @@ -10,7 +10,7 @@ // aux-build:issue-18502.rs -extern crate "issue-18502" as fmt; +extern crate issue_18502 as fmt; fn main() { ::fmt::baz(); diff --git a/src/test/run-pass/associated-types-cc.rs b/src/test/run-pass/associated-types-cc.rs index 948192f4fc0..b2be87be4cb 100644 --- a/src/test/run-pass/associated-types-cc.rs +++ b/src/test/run-pass/associated-types-cc.rs @@ -13,7 +13,7 @@ // Test that we are able to reference cross-crate traits that employ // associated types. -extern crate "associated-types-cc-lib" as bar; +extern crate associated_types_cc_lib as bar; use bar::Bar; diff --git a/src/test/run-pass/blind-item-mixed-crate-use-item.rs b/src/test/run-pass/blind-item-mixed-crate-use-item.rs index b1d6f96f0f6..3b6614c18fa 100644 --- a/src/test/run-pass/blind-item-mixed-crate-use-item.rs +++ b/src/test/run-pass/blind-item-mixed-crate-use-item.rs @@ -21,14 +21,14 @@ mod m { const BAR: () = (); struct Data; use m::f; -extern crate "blind-item-mixed-crate-use-item-foo" as foo; +extern crate blind_item_mixed_crate_use_item_foo as foo; fn main() { const BAR2: () = (); struct Data2; use m::g; - extern crate "blind-item-mixed-crate-use-item-foo2" as foo2; + extern crate blind_item_mixed_crate_use_item_foo2 as foo2; f(Data, BAR, foo::X); g(Data2, BAR2, foo2::Y); diff --git a/src/test/run-pass/crate-name-attr-used.rs b/src/test/run-pass/crate-name-attr-used.rs index c794e45c845..a108f4dc568 100644 --- a/src/test/run-pass/crate-name-attr-used.rs +++ b/src/test/run-pass/crate-name-attr-used.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags:--crate-name crate-name-attr-used -F unused-attributes +// compile-flags:--crate-name crate_name_attr_used -F unused-attributes // pretty-expanded FIXME #23616 -#![crate_name = "crate-name-attr-used"] +#![crate_name = "crate_name_attr_used"] fn main() {} diff --git a/src/test/run-pass/derive-no-std.rs b/src/test/run-pass/derive-no-std.rs index 4f48549d499..fbc6c28fd4a 100644 --- a/src/test/run-pass/derive-no-std.rs +++ b/src/test/run-pass/derive-no-std.rs @@ -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 diff --git a/src/test/run-pass/extern-foreign-crate.rs b/src/test/run-pass/extern-foreign-crate.rs index 50c070483f6..1757ff51fed 100644 --- a/src/test/run-pass/extern-foreign-crate.rs +++ b/src/test/run-pass/extern-foreign-crate.rs @@ -10,6 +10,6 @@ // pretty-expanded FIXME #23616 -extern crate "std" as mystd; +extern crate std as mystd; pub fn main() {} diff --git a/src/test/run-pass/for-loop-no-std.rs b/src/test/run-pass/for-loop-no-std.rs index 63738b47517..6deaec19059 100644 --- a/src/test/run-pass/for-loop-no-std.rs +++ b/src/test/run-pass/for-loop-no-std.rs @@ -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; diff --git a/src/test/run-pass/format-no-std.rs b/src/test/run-pass/format-no-std.rs index a4bf95d5467..9204cdfd755 100644 --- a/src/test/run-pass/format-no-std.rs +++ b/src/test/run-pass/format-no-std.rs @@ -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; diff --git a/src/test/run-pass/issue-10028.rs b/src/test/run-pass/issue-10028.rs index fdaa71d1cfb..53d6f67f119 100644 --- a/src/test/run-pass/issue-10028.rs +++ b/src/test/run-pass/issue-10028.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-10028" as issue10028; +extern crate issue_10028 as issue10028; use issue10028::ZeroLengthThingWithDestructor; diff --git a/src/test/run-pass/issue-11224.rs b/src/test/run-pass/issue-11224.rs index f226e25eaa4..14017ee1789 100644 --- a/src/test/run-pass/issue-11224.rs +++ b/src/test/run-pass/issue-11224.rs @@ -12,6 +12,6 @@ // pretty-expanded FIXME #23616 -extern crate "issue-11224" as unused; +extern crate issue_11224 as unused; pub fn main() {} diff --git a/src/test/run-pass/issue-11225-1.rs b/src/test/run-pass/issue-11225-1.rs index e960558e52c..a74fdbe3de4 100644 --- a/src/test/run-pass/issue-11225-1.rs +++ b/src/test/run-pass/issue-11225-1.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-11225-1" as foo; +extern crate issue_11225_1 as foo; pub fn main() { foo::foo(1); diff --git a/src/test/run-pass/issue-11225-2.rs b/src/test/run-pass/issue-11225-2.rs index 56144edb5c7..c6fc5e8b484 100644 --- a/src/test/run-pass/issue-11225-2.rs +++ b/src/test/run-pass/issue-11225-2.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-11225-2" as foo; +extern crate issue_11225_2 as foo; pub fn main() { foo::foo(1); diff --git a/src/test/run-pass/issue-11508.rs b/src/test/run-pass/issue-11508.rs index 1fc72fd2cbe..21ed30683f5 100644 --- a/src/test/run-pass/issue-11508.rs +++ b/src/test/run-pass/issue-11508.rs @@ -10,7 +10,7 @@ // aux-build:issue-11508.rs -extern crate "issue-11508" as rand; +extern crate issue_11508 as rand; use rand::{Closed01, random}; diff --git a/src/test/run-pass/issue-11529.rs b/src/test/run-pass/issue-11529.rs index 535fc366991..e5d95874be6 100644 --- a/src/test/run-pass/issue-11529.rs +++ b/src/test/run-pass/issue-11529.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-11529" as a; +extern crate issue_11529 as a; fn main() { let one = 1; diff --git a/src/test/run-pass/issue-12133-1.rs b/src/test/run-pass/issue-12133-1.rs index 7e5b0c22301..d47bb818c49 100644 --- a/src/test/run-pass/issue-12133-1.rs +++ b/src/test/run-pass/issue-12133-1.rs @@ -13,7 +13,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-12133-rlib" as a; -extern crate "issue-12133-dylib" as b; +extern crate issue_12133_rlib as a; +extern crate issue_12133_dylib as b; fn main() {} diff --git a/src/test/run-pass/issue-12133-2.rs b/src/test/run-pass/issue-12133-2.rs index 76bae09bd49..580c487af0d 100644 --- a/src/test/run-pass/issue-12133-2.rs +++ b/src/test/run-pass/issue-12133-2.rs @@ -14,7 +14,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-12133-rlib" as a; -extern crate "issue-12133-dylib" as b; +extern crate issue_12133_rlib as a; +extern crate issue_12133_dylib as b; fn main() {} diff --git a/src/test/run-pass/issue-12133-3.rs b/src/test/run-pass/issue-12133-3.rs index 514cfeab6af..79a53078545 100644 --- a/src/test/run-pass/issue-12133-3.rs +++ b/src/test/run-pass/issue-12133-3.rs @@ -14,6 +14,6 @@ // pretty-expanded FIXME #23616 -extern crate "issue-12133-dylib2" as other; +extern crate issue_12133_dylib2 as other; fn main() {} diff --git a/src/test/run-pass/issue-13620.rs b/src/test/run-pass/issue-13620.rs index 8ed8426b8f5..4c468314187 100644 --- a/src/test/run-pass/issue-13620.rs +++ b/src/test/run-pass/issue-13620.rs @@ -13,7 +13,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-13620-2" as crate2; +extern crate issue_13620_2 as crate2; fn main() { (crate2::FOO2.foo)(); diff --git a/src/test/run-pass/issue-13872.rs b/src/test/run-pass/issue-13872.rs index 66cf37eb61f..e9fb7945d04 100644 --- a/src/test/run-pass/issue-13872.rs +++ b/src/test/run-pass/issue-13872.rs @@ -14,7 +14,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-13872-3" as other; +extern crate issue_13872_3 as other; fn main() { other::foo(); diff --git a/src/test/run-pass/issue-14330.rs b/src/test/run-pass/issue-14330.rs index 48c4aed50f4..dd5b7e722fe 100644 --- a/src/test/run-pass/issue-14330.rs +++ b/src/test/run-pass/issue-14330.rs @@ -10,6 +10,6 @@ // pretty-expanded FIXME #23616 -#[macro_use] extern crate "std" as std2; +#[macro_use] extern crate std as std2; fn main() {} diff --git a/src/test/run-pass/issue-14421.rs b/src/test/run-pass/issue-14421.rs index e6425f7cb7a..046d888030f 100644 --- a/src/test/run-pass/issue-14421.rs +++ b/src/test/run-pass/issue-14421.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-14421" as bug_lib; +extern crate issue_14421 as bug_lib; use bug_lib::B; use bug_lib::make; diff --git a/src/test/run-pass/issue-14422.rs b/src/test/run-pass/issue-14422.rs index d3f1858c363..178a219f5bf 100644 --- a/src/test/run-pass/issue-14422.rs +++ b/src/test/run-pass/issue-14422.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-14422" as bug_lib; +extern crate issue_14422 as bug_lib; use bug_lib::B; use bug_lib::make; diff --git a/src/test/run-pass/issue-15562.rs b/src/test/run-pass/issue-15562.rs index 6556dba6534..f1ef57e44b1 100644 --- a/src/test/run-pass/issue-15562.rs +++ b/src/test/run-pass/issue-15562.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-15562" as i; +extern crate issue_15562 as i; pub fn main() { extern { diff --git a/src/test/run-pass/issue-16643.rs b/src/test/run-pass/issue-16643.rs index 49dc02779c4..54572296df7 100644 --- a/src/test/run-pass/issue-16643.rs +++ b/src/test/run-pass/issue-16643.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-16643" as i; +extern crate issue_16643 as i; pub fn main() { i::TreeBuilder { h: 3 }.process_token(); diff --git a/src/test/run-pass/issue-17662.rs b/src/test/run-pass/issue-17662.rs index 6d53e103d35..36e12b96c87 100644 --- a/src/test/run-pass/issue-17662.rs +++ b/src/test/run-pass/issue-17662.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-17662" as i; +extern crate issue_17662 as i; use std::marker; diff --git a/src/test/run-pass/issue-17718.rs b/src/test/run-pass/issue-17718.rs index 3453d2e6fce..13e082eada8 100644 --- a/src/test/run-pass/issue-17718.rs +++ b/src/test/run-pass/issue-17718.rs @@ -14,7 +14,7 @@ #![feature(core)] -extern crate "issue-17718" as other; +extern crate issue_17718 as other; use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering}; diff --git a/src/test/run-pass/issue-18501.rs b/src/test/run-pass/issue-18501.rs index de6a5be83de..fb8158c6ddc 100644 --- a/src/test/run-pass/issue-18501.rs +++ b/src/test/run-pass/issue-18501.rs @@ -15,7 +15,7 @@ // aux-build:issue-18501.rs // pretty-expanded FIXME #23616 -extern crate "issue-18501" as issue; +extern crate issue_18501 as issue; fn main() { issue::pass_method(); diff --git a/src/test/run-pass/issue-18514.rs b/src/test/run-pass/issue-18514.rs index f284ac90b4e..b0b2f068bb7 100644 --- a/src/test/run-pass/issue-18514.rs +++ b/src/test/run-pass/issue-18514.rs @@ -17,7 +17,7 @@ // aux-build:issue-18514.rs // pretty-expanded FIXME #23616 -extern crate "issue-18514" as ice; +extern crate issue_18514 as ice; use ice::{Tr, St}; fn main() { diff --git a/src/test/run-pass/issue-18711.rs b/src/test/run-pass/issue-18711.rs index 81c717f8174..277ad3260c5 100644 --- a/src/test/run-pass/issue-18711.rs +++ b/src/test/run-pass/issue-18711.rs @@ -16,7 +16,7 @@ #![feature(unboxed_closures)] // aux-build:issue-18711.rs -extern crate "issue-18711" as issue; +extern crate issue_18711 as issue; fn main() { (|| issue::inner(()))(); diff --git a/src/test/run-pass/issue-18859.rs b/src/test/run-pass/issue-18859.rs index f72e7fbe30a..16e6c99f0e3 100644 --- a/src/test/run-pass/issue-18859.rs +++ b/src/test/run-pass/issue-18859.rs @@ -21,6 +21,6 @@ mod foo { } fn main() { - assert_eq!(module_path!(), "issue-18859"); - assert_eq!(foo::bar::baz::name(), "issue-18859::foo::bar::baz"); + assert_eq!(module_path!(), "issue_18859"); + assert_eq!(foo::bar::baz::name(), "issue_18859::foo::bar::baz"); } diff --git a/src/test/run-pass/issue-19340-1.rs b/src/test/run-pass/issue-19340-1.rs index ba2aaee0289..e553c244c86 100644 --- a/src/test/run-pass/issue-19340-1.rs +++ b/src/test/run-pass/issue-19340-1.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-19340-1" as lib; +extern crate issue_19340_1 as lib; use lib::Homura; diff --git a/src/test/run-pass/issue-4545.rs b/src/test/run-pass/issue-4545.rs index cf7ab5d860b..6cb7ccc0e95 100644 --- a/src/test/run-pass/issue-4545.rs +++ b/src/test/run-pass/issue-4545.rs @@ -12,5 +12,5 @@ // pretty-expanded FIXME #23616 -extern crate "issue-4545" as somelib; +extern crate issue_4545 as somelib; pub fn main() { somelib::mk::(); } diff --git a/src/test/run-pass/issue-5518.rs b/src/test/run-pass/issue-5518.rs index e24b69bb0de..5981a0148a0 100644 --- a/src/test/run-pass/issue-5518.rs +++ b/src/test/run-pass/issue-5518.rs @@ -12,6 +12,6 @@ // pretty-expanded FIXME #23616 -extern crate "issue-5518" as other; +extern crate issue_5518 as other; fn main() {} diff --git a/src/test/run-pass/issue-5521.rs b/src/test/run-pass/issue-5521.rs index c9196fc66b0..4ad729f1bc6 100644 --- a/src/test/run-pass/issue-5521.rs +++ b/src/test/run-pass/issue-5521.rs @@ -13,7 +13,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-5521" as foo; +extern crate issue_5521 as foo; fn bar(a: foo::map) { if false { diff --git a/src/test/run-pass/issue-7178.rs b/src/test/run-pass/issue-7178.rs index 3180927f74d..0882203cb1e 100644 --- a/src/test/run-pass/issue-7178.rs +++ b/src/test/run-pass/issue-7178.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-7178" as cross_crate_self; +extern crate issue_7178 as cross_crate_self; pub fn main() { let _ = cross_crate_self::Foo::new(&1); diff --git a/src/test/run-pass/issue-7899.rs b/src/test/run-pass/issue-7899.rs index a830de42862..a17565fa0ac 100644 --- a/src/test/run-pass/issue-7899.rs +++ b/src/test/run-pass/issue-7899.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-7899" as testcrate; +extern crate issue_7899 as testcrate; fn main() { let f = testcrate::V2(1.0f32, 2.0f32); diff --git a/src/test/run-pass/issue-8044.rs b/src/test/run-pass/issue-8044.rs index 386d3558553..4f72409c36e 100644 --- a/src/test/run-pass/issue-8044.rs +++ b/src/test/run-pass/issue-8044.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-8044" as minimal; +extern crate issue_8044 as minimal; use minimal::{BTree, leaf}; pub fn main() { diff --git a/src/test/run-pass/issue-8259.rs b/src/test/run-pass/issue-8259.rs index 34e5ee5621b..e7f09789c5b 100644 --- a/src/test/run-pass/issue-8259.rs +++ b/src/test/run-pass/issue-8259.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-8259" as other; +extern crate issue_8259 as other; static a: other::Foo<'static> = other::Foo::A; pub fn main() {} diff --git a/src/test/run-pass/issue-9906.rs b/src/test/run-pass/issue-9906.rs index 2730f567aa3..84f848fc9cd 100644 --- a/src/test/run-pass/issue-9906.rs +++ b/src/test/run-pass/issue-9906.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-9906" as testmod; +extern crate issue_9906 as testmod; pub fn main() { testmod::foo(); diff --git a/src/test/run-pass/issue-9968.rs b/src/test/run-pass/issue-9968.rs index 5761c8d9438..c8af811d13d 100644 --- a/src/test/run-pass/issue-9968.rs +++ b/src/test/run-pass/issue-9968.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "issue-9968" as lib; +extern crate issue_9968 as lib; use lib::{Trait, Struct}; diff --git a/src/test/run-pass/lang-item-public.rs b/src/test/run-pass/lang-item-public.rs index 966ab4d260f..780bb52b3e8 100644 --- a/src/test/run-pass/lang-item-public.rs +++ b/src/test/run-pass/lang-item-public.rs @@ -14,7 +14,7 @@ #![feature(lang_items, start, no_std)] #![no_std] -extern crate "lang-item-public" as lang_lib; +extern crate lang_item_public as lang_lib; #[cfg(target_os = "linux")] #[link(name = "c")] diff --git a/src/test/run-pass/linkage-visibility.rs b/src/test/run-pass/linkage-visibility.rs index 509ff77655e..945cf9370f4 100644 --- a/src/test/run-pass/linkage-visibility.rs +++ b/src/test/run-pass/linkage-visibility.rs @@ -14,7 +14,7 @@ #![feature(std_misc, old_path)] -extern crate "linkage-visibility" as foo; +extern crate linkage_visibility as foo; pub fn main() { foo::test(); diff --git a/src/test/run-pass/linkage1.rs b/src/test/run-pass/linkage1.rs index 5e765bb4c3c..0794a5e0daf 100644 --- a/src/test/run-pass/linkage1.rs +++ b/src/test/run-pass/linkage1.rs @@ -14,7 +14,7 @@ #![feature(linkage)] -extern crate "linkage1" as other; +extern crate linkage1 as other; extern { #[linkage = "extern_weak"] diff --git a/src/test/run-pass/logging-enabled.rs b/src/test/run-pass/logging-enabled.rs index 24ef0295626..294d4d12179 100644 --- a/src/test/run-pass/logging-enabled.rs +++ b/src/test/run-pass/logging-enabled.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// exec-env:RUST_LOG=logging-enabled=info +// exec-env:RUST_LOG=logging_enabled=info // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/macro-crate-nonterminal-renamed.rs b/src/test/run-pass/macro-crate-nonterminal-renamed.rs index cb919297b04..ed7b1cbacad 100644 --- a/src/test/run-pass/macro-crate-nonterminal-renamed.rs +++ b/src/test/run-pass/macro-crate-nonterminal-renamed.rs @@ -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(); diff --git a/src/test/run-pass/priv-impl-prim-ty.rs b/src/test/run-pass/priv-impl-prim-ty.rs index 17fb5aad6d0..aa2db260dd4 100644 --- a/src/test/run-pass/priv-impl-prim-ty.rs +++ b/src/test/run-pass/priv-impl-prim-ty.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "priv-impl-prim-ty" as bar; +extern crate priv_impl_prim_ty as bar; pub fn main() { bar::frob(1); diff --git a/src/test/run-pass/reexport-should-still-link.rs b/src/test/run-pass/reexport-should-still-link.rs index 2c92965ee7a..1243d72af5e 100644 --- a/src/test/run-pass/reexport-should-still-link.rs +++ b/src/test/run-pass/reexport-should-still-link.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "reexport-should-still-link" as foo; +extern crate reexport_should_still_link as foo; pub fn main() { foo::bar(); diff --git a/src/test/run-pass/rust-log-filter.rs b/src/test/run-pass/rust-log-filter.rs index 0f7fb31fbae..bc379f1a76f 100644 --- a/src/test/run-pass/rust-log-filter.rs +++ b/src/test/run-pass/rust-log-filter.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// exec-env:RUST_LOG=rust-log-filter/foo +// exec-env:RUST_LOG=rust_log_filter/foo // pretty-expanded FIXME #23616 diff --git a/src/test/run-pass/sepcomp-extern.rs b/src/test/run-pass/sepcomp-extern.rs index 87470e90047..f91c3d1ff37 100644 --- a/src/test/run-pass/sepcomp-extern.rs +++ b/src/test/run-pass/sepcomp-extern.rs @@ -15,7 +15,7 @@ // pretty-expanded FIXME #23616 -#[link(name = "sepcomp-extern-lib")] +#[link(name = "sepcomp_extern_lib")] extern { #[allow(ctypes)] fn foo() -> usize; diff --git a/src/test/run-pass/static-fn-inline-xc.rs b/src/test/run-pass/static-fn-inline-xc.rs index b2fbff67ac7..80de65c0e9f 100644 --- a/src/test/run-pass/static-fn-inline-xc.rs +++ b/src/test/run-pass/static-fn-inline-xc.rs @@ -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; diff --git a/src/test/run-pass/static-fn-trait-xc.rs b/src/test/run-pass/static-fn-trait-xc.rs index 7c9049ffacf..550e03c8b12 100644 --- a/src/test/run-pass/static-fn-trait-xc.rs +++ b/src/test/run-pass/static-fn-trait-xc.rs @@ -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; diff --git a/src/test/run-pass/static-function-pointer-xc.rs b/src/test/run-pass/static-function-pointer-xc.rs index ecabfcaf20c..55f3b0883b9 100644 --- a/src/test/run-pass/static-function-pointer-xc.rs +++ b/src/test/run-pass/static-function-pointer-xc.rs @@ -11,7 +11,7 @@ // aux-build:static-function-pointer-aux.rs // pretty-expanded FIXME #23616 -extern crate "static-function-pointer-aux" as aux; +extern crate static_function_pointer_aux as aux; fn f(x: isize) -> isize { x } diff --git a/src/test/run-pass/trait-default-method-xc-2.rs b/src/test/run-pass/trait-default-method-xc-2.rs index b3e83f747a3..d4ed7270400 100644 --- a/src/test/run-pass/trait-default-method-xc-2.rs +++ b/src/test/run-pass/trait-default-method-xc-2.rs @@ -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}; diff --git a/src/test/run-pass/trait-default-method-xc.rs b/src/test/run-pass/trait-default-method-xc.rs index 9ac799216dd..65e8c53a25e 100644 --- a/src/test/run-pass/trait-default-method-xc.rs +++ b/src/test/run-pass/trait-default-method-xc.rs @@ -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; diff --git a/src/test/run-pass/trait-inheritance-auto-xc-2.rs b/src/test/run-pass/trait-inheritance-auto-xc-2.rs index 9db1af230d5..128be2993ec 100644 --- a/src/test/run-pass/trait-inheritance-auto-xc-2.rs +++ b/src/test/run-pass/trait-inheritance-auto-xc-2.rs @@ -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}; diff --git a/src/test/run-pass/trait-inheritance-auto-xc.rs b/src/test/run-pass/trait-inheritance-auto-xc.rs index 401c93c78c8..827674c81ad 100644 --- a/src/test/run-pass/trait-inheritance-auto-xc.rs +++ b/src/test/run-pass/trait-inheritance-auto-xc.rs @@ -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}; diff --git a/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs b/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs index 990c4b9b418..c665c35b418 100644 --- a/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs +++ b/src/test/run-pass/trait-inheritance-cross-trait-call-xc.rs @@ -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; diff --git a/src/test/run-pass/typeid-intrinsic.rs b/src/test/run-pass/typeid-intrinsic.rs index a34204d6831..7a143ce5889 100644 --- a/src/test/run-pass/typeid-intrinsic.rs +++ b/src/test/run-pass/typeid-intrinsic.rs @@ -15,8 +15,8 @@ #![feature(hash, core)] -extern crate "typeid-intrinsic" as other1; -extern crate "typeid-intrinsic2" as other2; +extern crate typeid_intrinsic as other1; +extern crate typeid_intrinsic2 as other2; use std::hash::{self, SipHasher}; use std::any::TypeId; diff --git a/src/test/run-pass/unboxed-closures-cross-crate.rs b/src/test/run-pass/unboxed-closures-cross-crate.rs index 31a90175671..0c255c6bd6c 100644 --- a/src/test/run-pass/unboxed-closures-cross-crate.rs +++ b/src/test/run-pass/unboxed-closures-cross-crate.rs @@ -14,7 +14,7 @@ // aux-build:unboxed-closures-cross-crate.rs // pretty-expanded FIXME #23616 -extern crate "unboxed-closures-cross-crate" as ubcc; +extern crate unboxed_closures_cross_crate as ubcc; fn main() { assert_eq!(ubcc::has_closures(), 2_usize); diff --git a/src/test/run-pass/use-crate-name-alias.rs b/src/test/run-pass/use-crate-name-alias.rs index 2821de6f1e7..98594183a00 100644 --- a/src/test/run-pass/use-crate-name-alias.rs +++ b/src/test/run-pass/use-crate-name-alias.rs @@ -11,6 +11,6 @@ // Issue #1706 // pretty-expanded FIXME #23616 -extern crate "std" as stdlib; +extern crate std as stdlib; pub fn main() {} diff --git a/src/test/run-pass/use.rs b/src/test/run-pass/use.rs index 664a8b27e78..40ab4c86c6f 100644 --- a/src/test/run-pass/use.rs +++ b/src/test/run-pass/use.rs @@ -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; diff --git a/src/test/run-pass/vec-macro-no-std.rs b/src/test/run-pass/vec-macro-no-std.rs index d1729c9dde4..948fe28cc62 100644 --- a/src/test/run-pass/vec-macro-no-std.rs +++ b/src/test/run-pass/vec-macro-no-std.rs @@ -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; diff --git a/src/test/run-pass/weak-lang-item.rs b/src/test/run-pass/weak-lang-item.rs index ec346a248a9..5a567758bf4 100644 --- a/src/test/run-pass/weak-lang-item.rs +++ b/src/test/run-pass/weak-lang-item.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "weak-lang-items" as other; +extern crate weak_lang_items as other; use std::thread; diff --git a/src/test/run-pass/xcrate-address-insignificant.rs b/src/test/run-pass/xcrate-address-insignificant.rs index f133396a725..ac8b15d7bf5 100644 --- a/src/test/run-pass/xcrate-address-insignificant.rs +++ b/src/test/run-pass/xcrate-address-insignificant.rs @@ -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::(), foo::bar()); diff --git a/src/test/run-pass/xcrate-trait-lifetime-param.rs b/src/test/run-pass/xcrate-trait-lifetime-param.rs index 016ebc777f1..62d62839ba3 100644 --- a/src/test/run-pass/xcrate-trait-lifetime-param.rs +++ b/src/test/run-pass/xcrate-trait-lifetime-param.rs @@ -12,7 +12,7 @@ // pretty-expanded FIXME #23616 -extern crate "xcrate-trait-lifetime-param" as other; +extern crate xcrate_trait_lifetime_param as other; struct Reader<'a> { b : &'a [u8]