diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-19 15:39:03 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-24 14:55:15 -0700 |
| commit | eb2f1d925ffdb79d45c7b74cef549e54533c3951 (patch) | |
| tree | a517d12dbb1458f49e21ae40e026d699576dce92 /src/test | |
| parent | ed810385045ab0db90303574ba3ea47dfa2a36d5 (diff) | |
| download | rust-eb2f1d925ffdb79d45c7b74cef549e54533c3951.tar.gz rust-eb2f1d925ffdb79d45c7b74cef549e54533c3951.zip | |
rustc: Add support for `extern crate foo as bar`
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc #23533
Diffstat (limited to 'src/test')
58 files changed, 91 insertions, 103 deletions
diff --git a/src/test/auxiliary/coherence-lib.rs b/src/test/auxiliary/coherence_lib.rs index daa123849e4..daa123849e4 100644 --- a/src/test/auxiliary/coherence-lib.rs +++ b/src/test/auxiliary/coherence_lib.rs diff --git a/src/test/auxiliary/coherence-orphan-lib.rs b/src/test/auxiliary/coherence_orphan_lib.rs index 93d8fd3da88..93d8fd3da88 100644 --- a/src/test/auxiliary/coherence-orphan-lib.rs +++ b/src/test/auxiliary/coherence_orphan_lib.rs diff --git a/src/test/auxiliary/issue-11680.rs b/src/test/auxiliary/issue_11680.rs index 249a1bab465..249a1bab465 100644 --- a/src/test/auxiliary/issue-11680.rs +++ b/src/test/auxiliary/issue_11680.rs diff --git a/src/test/auxiliary/issue-12612-1.rs b/src/test/auxiliary/issue_12612_1.rs index a0234c1185a..a0234c1185a 100644 --- a/src/test/auxiliary/issue-12612-1.rs +++ b/src/test/auxiliary/issue_12612_1.rs diff --git a/src/test/auxiliary/issue-12612-2.rs b/src/test/auxiliary/issue_12612_2.rs index b4ae4374b2e..b4ae4374b2e 100644 --- a/src/test/auxiliary/issue-12612-2.rs +++ b/src/test/auxiliary/issue_12612_2.rs diff --git a/src/test/auxiliary/issue-16725.rs b/src/test/auxiliary/issue_16725.rs index b3b04b4a5ac..b3b04b4a5ac 100644 --- a/src/test/auxiliary/issue-16725.rs +++ b/src/test/auxiliary/issue_16725.rs diff --git a/src/test/auxiliary/issue-17718-const-privacy.rs b/src/test/auxiliary/issue_17718_const_privacy.rs index 3657d39ff77..3657d39ff77 100644 --- a/src/test/auxiliary/issue-17718-const-privacy.rs +++ b/src/test/auxiliary/issue_17718_const_privacy.rs diff --git a/src/test/auxiliary/issue-21202.rs b/src/test/auxiliary/issue_21202.rs index afdbf78aa82..afdbf78aa82 100644 --- a/src/test/auxiliary/issue-21202.rs +++ b/src/test/auxiliary/issue_21202.rs diff --git a/src/test/auxiliary/lint-unused-extern-crate.rs b/src/test/auxiliary/lint_unused_extern_crate.rs index 2661b1f4eb4..2661b1f4eb4 100644 --- a/src/test/auxiliary/lint-unused-extern-crate.rs +++ b/src/test/auxiliary/lint_unused_extern_crate.rs diff --git a/src/test/auxiliary/privacy-tuple-struct.rs b/src/test/auxiliary/privacy_tuple_struct.rs index 2fb9d9923cb..2fb9d9923cb 100644 --- a/src/test/auxiliary/privacy-tuple-struct.rs +++ b/src/test/auxiliary/privacy_tuple_struct.rs diff --git a/src/test/auxiliary/regions-bounded-method-type-parameters-cross-crate-lib.rs b/src/test/auxiliary/regions_bounded_method_type_parameters_cross_crate_lib.rs index 9c0716e2cc2..9c0716e2cc2 100644 --- a/src/test/auxiliary/regions-bounded-method-type-parameters-cross-crate-lib.rs +++ b/src/test/auxiliary/regions_bounded_method_type_parameters_cross_crate_lib.rs diff --git a/src/test/auxiliary/struct-field-privacy.rs b/src/test/auxiliary/struct_field_privacy.rs index e2c16ae8b5c..e2c16ae8b5c 100644 --- a/src/test/auxiliary/struct-field-privacy.rs +++ b/src/test/auxiliary/struct_field_privacy.rs diff --git a/src/test/auxiliary/trait-safety-lib.rs b/src/test/auxiliary/trait_safety_lib.rs index d5437690acd..d5437690acd 100644 --- a/src/test/auxiliary/trait-safety-lib.rs +++ b/src/test/auxiliary/trait_safety_lib.rs diff --git a/src/test/auxiliary/typeck-default-trait-impl-cross-crate-coherence-lib.rs b/src/test/auxiliary/typeck_default_trait_impl_cross_crate_coherence_lib.rs index 5a7a3e7bcc6..5a7a3e7bcc6 100644 --- a/src/test/auxiliary/typeck-default-trait-impl-cross-crate-coherence-lib.rs +++ b/src/test/auxiliary/typeck_default_trait_impl_cross_crate_coherence_lib.rs diff --git a/src/test/auxiliary/unreachable-variant.rs b/src/test/auxiliary/unreachable_variant.rs index 8ca85f20ab2..8ca85f20ab2 100644 --- a/src/test/auxiliary/unreachable-variant.rs +++ b/src/test/auxiliary/unreachable_variant.rs diff --git a/src/test/compile-fail/bad-crate-id.rs b/src/test/compile-fail/bad-crate-id.rs index 71e3ce9a35a..193666f8269 100644 --- a/src/test/compile-fail/bad-crate-id.rs +++ b/src/test/compile-fail/bad-crate-id.rs @@ -9,5 +9,6 @@ // except according to those terms. extern crate "" as foo; //~ ERROR: crate name must not be empty +//~^ WARNING: obsolete syntax fn main() {} diff --git a/src/test/compile-fail/bad-crate-id2.rs b/src/test/compile-fail/bad-crate-id2.rs index 6425908672d..29df0fa705e 100644 --- a/src/test/compile-fail/bad-crate-id2.rs +++ b/src/test/compile-fail/bad-crate-id2.rs @@ -9,5 +9,6 @@ // 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/coherence-all-remote.rs b/src/test/compile-fail/coherence-all-remote.rs index 1e3b7f6dbd2..7a5340041c2 100644 --- a/src/test/compile-fail/coherence-all-remote.rs +++ b/src/test/compile-fail/coherence-all-remote.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote1; impl<T> Remote1<T> for isize { } diff --git a/src/test/compile-fail/coherence-bigint-param.rs b/src/test/compile-fail/coherence-bigint-param.rs index b7ca499be73..32c5b669381 100644 --- a/src/test/compile-fail/coherence-bigint-param.rs +++ b/src/test/compile-fail/coherence-bigint-param.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote1; pub struct BigInt; diff --git a/src/test/compile-fail/coherence-cow-no-cover.rs b/src/test/compile-fail/coherence-cow-no-cover.rs index 1bec97de533..475d7df1fdb 100644 --- a/src/test/compile-fail/coherence-cow-no-cover.rs +++ b/src/test/compile-fail/coherence-cow-no-cover.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // Test that it's not ok for U to appear uncovered -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::{Remote,Pair}; pub struct Cover<T>(T); diff --git a/src/test/compile-fail/coherence-lone-type-parameter.rs b/src/test/compile-fail/coherence-lone-type-parameter.rs index 9f7481f12f2..e78f392b386 100644 --- a/src/test/compile-fail/coherence-lone-type-parameter.rs +++ b/src/test/compile-fail/coherence-lone-type-parameter.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote; impl<T> Remote for T { } diff --git a/src/test/compile-fail/coherence-orphan.rs b/src/test/compile-fail/coherence-orphan.rs index 97dffec2dd9..2243a0507f2 100644 --- a/src/test/compile-fail/coherence-orphan.rs +++ b/src/test/compile-fail/coherence-orphan.rs @@ -9,11 +9,11 @@ // except according to those terms. // ignore-tidy-linelength -// aux-build:coherence-orphan-lib.rs +// aux-build:coherence_orphan_lib.rs #![feature(optin_builtin_traits)] -extern crate "coherence-orphan-lib" as lib; +extern crate coherence_orphan_lib as lib; use lib::TheTrait; diff --git a/src/test/compile-fail/coherence-overlapping-pairs.rs b/src/test/compile-fail/coherence-overlapping-pairs.rs index 9878bdec2c3..ba9dc53e868 100644 --- a/src/test/compile-fail/coherence-overlapping-pairs.rs +++ b/src/test/compile-fail/coherence-overlapping-pairs.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote; struct Foo; diff --git a/src/test/compile-fail/coherence-pair-covered-uncovered-1.rs b/src/test/compile-fail/coherence-pair-covered-uncovered-1.rs index 2bdcc346f70..f55efef14fa 100644 --- a/src/test/compile-fail/coherence-pair-covered-uncovered-1.rs +++ b/src/test/compile-fail/coherence-pair-covered-uncovered-1.rs @@ -11,9 +11,9 @@ // Test that the same coverage rules apply even if the local type appears in the // list of type parameters, not the self type. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::{Remote1, Pair}; pub struct Local<T>(T); diff --git a/src/test/compile-fail/coherence-pair-covered-uncovered.rs b/src/test/compile-fail/coherence-pair-covered-uncovered.rs index 881494f009f..0642dff4b28 100644 --- a/src/test/compile-fail/coherence-pair-covered-uncovered.rs +++ b/src/test/compile-fail/coherence-pair-covered-uncovered.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::{Remote, Pair}; struct Local<T>(T); diff --git a/src/test/compile-fail/derive-no-std-not-supported.rs b/src/test/compile-fail/derive-no-std-not-supported.rs index f82e7f3e36a..d0cb4f23a8c 100644 --- a/src/test/compile-fail/derive-no-std-not-supported.rs +++ b/src/test/compile-fail/derive-no-std-not-supported.rs @@ -13,7 +13,7 @@ extern crate core; extern crate rand; -extern crate "serialize" as rustc_serialize; +extern crate serialize as rustc_serialize; #[derive(Rand)] //~ ERROR this trait cannot be derived //~^ WARNING `#[derive(Rand)]` is deprecated diff --git a/src/test/compile-fail/issue-11680.rs b/src/test/compile-fail/issue-11680.rs index 0f30243b39a..1bd7b0aa1c2 100644 --- a/src/test/compile-fail/issue-11680.rs +++ b/src/test/compile-fail/issue-11680.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:issue-11680.rs +// aux-build:issue_11680.rs -extern crate "issue-11680" as other; +extern crate issue_11680 as other; fn main() { let _b = other::Foo::Bar(1); diff --git a/src/test/compile-fail/issue-12612.rs b/src/test/compile-fail/issue-12612.rs index 41cd3863001..f76d12d93fd 100644 --- a/src/test/compile-fail/issue-12612.rs +++ b/src/test/compile-fail/issue-12612.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:issue-12612-1.rs +// aux-build:issue_12612_1.rs -extern crate "issue-12612-1" as foo; +extern crate issue_12612_1 as foo; use foo::bar; diff --git a/src/test/compile-fail/issue-16725.rs b/src/test/compile-fail/issue-16725.rs index 67fcd820429..cadf602a4cf 100644 --- a/src/test/compile-fail/issue-16725.rs +++ b/src/test/compile-fail/issue-16725.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:issue-16725.rs +// aux-build:issue_16725.rs -extern crate "issue-16725" as foo; +extern crate issue_16725 as foo; fn main() { unsafe { foo::bar(); } diff --git a/src/test/compile-fail/issue-17718-const-privacy.rs b/src/test/compile-fail/issue-17718-const-privacy.rs index a9af30a3ff0..021edbee566 100644 --- a/src/test/compile-fail/issue-17718-const-privacy.rs +++ b/src/test/compile-fail/issue-17718-const-privacy.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:issue-17718-const-privacy.rs +// aux-build:issue_17718_const_privacy.rs -extern crate "issue-17718-const-privacy" as other; +extern crate issue_17718_const_privacy as other; use a::B; //~ ERROR: const `B` is private use other::{ diff --git a/src/test/compile-fail/issue-21202.rs b/src/test/compile-fail/issue-21202.rs index 05485008e51..2bce838c1cf 100644 --- a/src/test/compile-fail/issue-21202.rs +++ b/src/test/compile-fail/issue-21202.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:issue-21202.rs +// aux-build:issue_21202.rs -extern crate "issue-21202" as crate1; +extern crate issue_21202 as crate1; use crate1::A; diff --git a/src/test/compile-fail/lint-unused-extern-crate.rs b/src/test/compile-fail/lint-unused-extern-crate.rs index ada0cd2bc98..854c51d0769 100644 --- a/src/test/compile-fail/lint-unused-extern-crate.rs +++ b/src/test/compile-fail/lint-unused-extern-crate.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:lint-unused-extern-crate.rs +// aux-build:lint_unused_extern_crate.rs #![deny(unused_extern_crates)] #![allow(unused_variables)] @@ -19,12 +19,12 @@ extern crate libc; //~ ERROR: unused extern crate -extern crate "collections" as collecs; // no error, it is used +extern crate collections as collecs; // no error, it is used extern crate rand; // no error, the use marks it as used // even if imported objects aren't used -extern crate "lint-unused-extern-crate" as other; // no error, the use * marks it as used +extern crate lint_unused_extern_crate as other; // no error, the use * marks it as used #[allow(unused_imports)] use rand::isaac::IsaacRng; diff --git a/src/test/compile-fail/privacy5.rs b/src/test/compile-fail/privacy5.rs index a7f6a514b96..4ca37fc2ad2 100644 --- a/src/test/compile-fail/privacy5.rs +++ b/src/test/compile-fail/privacy5.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:privacy-tuple-struct.rs +// aux-build:privacy_tuple_struct.rs -extern crate "privacy-tuple-struct" as other; +extern crate privacy_tuple_struct as other; mod a { pub struct A(()); @@ -101,30 +101,30 @@ fn xcrate() { let c = other::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor let d = other::D(4); - let other::A(()) = a; //~ ERROR: field #1 of struct `privacy-tuple-struct::A` is private + let other::A(()) = a; //~ ERROR: field #1 of struct `privacy_tuple_struct::A` is private let other::A(_) = a; match a { other::A(()) => {} } - //~^ ERROR: field #1 of struct `privacy-tuple-struct::A` is private + //~^ ERROR: field #1 of struct `privacy_tuple_struct::A` is private match a { other::A(_) => {} } let other::B(_) = b; - let other::B(_b) = b; //~ ERROR: field #1 of struct `privacy-tuple-struct::B` is private + let other::B(_b) = b; //~ ERROR: field #1 of struct `privacy_tuple_struct::B` is private match b { other::B(_) => {} } match b { other::B(_b) => {} } - //~^ ERROR: field #1 of struct `privacy-tuple-struct::B` is private + //~^ ERROR: field #1 of struct `privacy_tuple_struct::B` is private match b { other::B(1) => {} other::B(_) => {} } - //~^ ERROR: field #1 of struct `privacy-tuple-struct::B` is private + //~^ ERROR: field #1 of struct `privacy_tuple_struct::B` is private let other::C(_, _) = c; let other::C(_a, _) = c; - let other::C(_, _b) = c; //~ ERROR: field #2 of struct `privacy-tuple-struct::C` is private - let other::C(_a, _b) = c; //~ ERROR: field #2 of struct `privacy-tuple-struct::C` is private + let other::C(_, _b) = c; //~ ERROR: field #2 of struct `privacy_tuple_struct::C` is private + let other::C(_a, _b) = c; //~ ERROR: field #2 of struct `privacy_tuple_struct::C` is private match c { other::C(_, _) => {} } match c { other::C(_a, _) => {} } match c { other::C(_, _b) => {} } - //~^ ERROR: field #2 of struct `privacy-tuple-struct::C` is private + //~^ ERROR: field #2 of struct `privacy_tuple_struct::C` is private match c { other::C(_a, _b) => {} } - //~^ ERROR: field #2 of struct `privacy-tuple-struct::C` is private + //~^ ERROR: field #2 of struct `privacy_tuple_struct::C` is private let other::D(_) = d; let other::D(_d) = d; diff --git a/src/test/compile-fail/regions-bounded-method-type-parameters-cross-crate.rs b/src/test/compile-fail/regions-bounded-method-type-parameters-cross-crate.rs index 1705cfec6e2..82d05c5d716 100644 --- a/src/test/compile-fail/regions-bounded-method-type-parameters-cross-crate.rs +++ b/src/test/compile-fail/regions-bounded-method-type-parameters-cross-crate.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:regions-bounded-method-type-parameters-cross-crate-lib.rs +// aux-build:regions_bounded_method_type_parameters_cross_crate_lib.rs // Check explicit region bounds on methods in the cross crate case. -extern crate "regions-bounded-method-type-parameters-cross-crate-lib" as lib; +extern crate regions_bounded_method_type_parameters_cross_crate_lib as lib; use lib::Inv; use lib::MaybeOwned; diff --git a/src/test/compile-fail/static-array-across-crate.rs b/src/test/compile-fail/static-array-across-crate.rs index 422cf630429..04a731e847a 100644 --- a/src/test/compile-fail/static-array-across-crate.rs +++ b/src/test/compile-fail/static-array-across-crate.rs @@ -10,7 +10,7 @@ // aux-build:pub_static_array.rs -extern crate "pub_static_array" as array; +extern crate pub_static_array as array; use array::ARRAY; diff --git a/src/test/compile-fail/struct-field-privacy.rs b/src/test/compile-fail/struct-field-privacy.rs index 667e944f92c..a1b6b9a744c 100644 --- a/src/test/compile-fail/struct-field-privacy.rs +++ b/src/test/compile-fail/struct-field-privacy.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:struct-field-privacy.rs +// aux-build:struct_field_privacy.rs -extern crate "struct-field-privacy" as xc; +extern crate struct_field_privacy as xc; struct A { a: isize, @@ -37,11 +37,11 @@ fn test(a: A, b: inner::A, c: inner::B, d: xc::A, e: xc::B) { c.a; c.b; //~ ERROR: field `b` of struct `inner::B` is private - d.a; //~ ERROR: field `a` of struct `struct-field-privacy::A` is private + d.a; //~ ERROR: field `a` of struct `struct_field_privacy::A` is private d.b; e.a; - e.b; //~ ERROR: field `b` of struct `struct-field-privacy::B` is private + e.b; //~ ERROR: field `b` of struct `struct_field_privacy::B` is private } fn main() {} diff --git a/src/test/compile-fail/suggest-private-fields.rs b/src/test/compile-fail/suggest-private-fields.rs index 30648498ba8..f987257d4ee 100644 --- a/src/test/compile-fail/suggest-private-fields.rs +++ b/src/test/compile-fail/suggest-private-fields.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:struct-field-privacy.rs +// aux-build:struct_field_privacy.rs -extern crate "struct-field-privacy" as xc; +extern crate struct_field_privacy as xc; use xc::B; @@ -22,9 +22,9 @@ struct A { fn main () { // external crate struct let k = B { - aa: 20, //~ ERROR structure `struct-field-privacy::B` has no field named `aa` + aa: 20, //~ ERROR structure `struct_field_privacy::B` has no field named `aa` //~^ HELP did you mean `a`? - bb: 20, //~ ERROR structure `struct-field-privacy::B` has no field named `bb` + bb: 20, //~ ERROR structure `struct_field_privacy::B` has no field named `bb` }; // local crate struct let l = A { diff --git a/src/test/compile-fail/trait-safety-trait-impl-cc.rs b/src/test/compile-fail/trait-safety-trait-impl-cc.rs index 032deb2e017..6050b549b65 100644 --- a/src/test/compile-fail/trait-safety-trait-impl-cc.rs +++ b/src/test/compile-fail/trait-safety-trait-impl-cc.rs @@ -8,12 +8,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:trait-safety-lib.rs +// aux-build:trait_safety_lib.rs // Check that unsafe traits require unsafe impls and that inherent // impls cannot be unsafe. -extern crate "trait-safety-lib" as lib; +extern crate trait_safety_lib as lib; struct Bar; impl lib::Foo for Bar { //~ ERROR requires an `unsafe impl` declaration diff --git a/src/test/compile-fail/typeck-default-trait-impl-cross-crate-coherence.rs b/src/test/compile-fail/typeck-default-trait-impl-cross-crate-coherence.rs index 3a29bb9c227..7d25c04882f 100644 --- a/src/test/compile-fail/typeck-default-trait-impl-cross-crate-coherence.rs +++ b/src/test/compile-fail/typeck-default-trait-impl-cross-crate-coherence.rs @@ -8,14 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:typeck-default-trait-impl-cross-crate-coherence-lib.rs +// aux-build:typeck_default_trait_impl_cross_crate_coherence_lib.rs // Test that we do not consider associated types to be sendable without // some applicable trait bound (and we don't ICE). #![feature(optin_builtin_traits)] -extern crate "typeck-default-trait-impl-cross-crate-coherence-lib" as lib; +extern crate typeck_default_trait_impl_cross_crate_coherence_lib as lib; use lib::DefaultedTrait; diff --git a/src/test/compile-fail/unreachable-variant.rs b/src/test/compile-fail/unreachable-variant.rs index ef991d85337..5983c83f8b4 100644 --- a/src/test/compile-fail/unreachable-variant.rs +++ b/src/test/compile-fail/unreachable-variant.rs @@ -8,9 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:unreachable-variant.rs +// aux-build:unreachable_variant.rs -extern crate "unreachable-variant" as other; +extern crate unreachable_variant as other; fn main() { let _x = other::super_sekrit::sooper_sekrit::baz; //~ ERROR is private diff --git a/src/test/parse-fail/bad-lit-suffixes.rs b/src/test/parse-fail/bad-lit-suffixes.rs index d10337e768c..9e5fe4ab8a9 100644 --- a/src/test/parse-fail/bad-lit-suffixes.rs +++ b/src/test/parse-fail/bad-lit-suffixes.rs @@ -11,6 +11,7 @@ extern crate "foo"suffix //~ ERROR extern crate name with a suffix is illegal + //~^ WARNING: obsolete syntax as foo; extern diff --git a/src/test/parse-fail/extern-crate-as-no-string-help.rs b/src/test/parse-fail/extern-crate-as-no-string-help.rs deleted file mode 100644 index 5cc52f6f6db..00000000000 --- a/src/test/parse-fail/extern-crate-as-no-string-help.rs +++ /dev/null @@ -1,15 +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 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Tests that the proper help is displayed in the error message - -extern crate foo as bar; -//~^ ERROR expected `;`, found `as` -//~^^ HELP perhaps you meant to enclose the crate name `foo` in a string? diff --git a/src/test/parse-fail/extern-foreign-crate.rs b/src/test/parse-fail/extern-foreign-crate.rs index 24b978b0a21..1ff4368dac5 100644 --- a/src/test/parse-fail/extern-foreign-crate.rs +++ b/src/test/parse-fail/extern-foreign-crate.rs @@ -11,4 +11,4 @@ // Verifies that the expected token errors for `extern crate` are // raised -extern crate foo {} //~ERROR expected `;`, found `{` +extern crate foo {} //~ERROR expected one of `;` or `as`, found `{` diff --git a/src/test/pretty/issue-4264.pp b/src/test/pretty/issue-4264.pp index 58cd19059c0..c2ed10ce6a1 100644 --- a/src/test/pretty/issue-4264.pp +++ b/src/test/pretty/issue-4264.pp @@ -3,7 +3,7 @@ #[prelude_import] use std::prelude::v1::*; #[macro_use] -extern crate "std" as std; +extern crate std as std; // 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. diff --git a/src/test/pretty/raw-str-nonexpr.rs b/src/test/pretty/raw-str-nonexpr.rs index 965b1760f1f..bce78e4f4c1 100644 --- a/src/test/pretty/raw-str-nonexpr.rs +++ b/src/test/pretty/raw-str-nonexpr.rs @@ -13,6 +13,6 @@ #![feature(asm)] #[cfg(foo = r#"just parse this"#)] -extern crate r##"blah"## as blah; +extern crate blah as blah; fn main() { unsafe { asm!(r###"blah"###); } } diff --git a/src/test/run-make/weird-output-filenames/Makefile b/src/test/run-make/weird-output-filenames/Makefile index 3d57a2263e1..2172ed888b1 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 "crate name cannot start with a hyphen:" + | grep "soon cannot contain hyphens:" diff --git a/src/test/run-pass/coherence-bigint-int.rs b/src/test/run-pass/coherence-bigint-int.rs index cbfe30906a7..9ad4f6b9d75 100644 --- a/src/test/run-pass/coherence-bigint-int.rs +++ b/src/test/run-pass/coherence-bigint-int.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote1; pub struct BigInt; diff --git a/src/test/run-pass/coherence-bigint-vecint.rs b/src/test/run-pass/coherence-bigint-vecint.rs index 8537c1bb002..ac4b98cfc8c 100644 --- a/src/test/run-pass/coherence-bigint-vecint.rs +++ b/src/test/run-pass/coherence-bigint-vecint.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote1; pub struct BigInt; diff --git a/src/test/run-pass/coherence-blanket.rs b/src/test/run-pass/coherence-blanket.rs index 2f2709698a0..32743aafa82 100644 --- a/src/test/run-pass/coherence-blanket.rs +++ b/src/test/run-pass/coherence-blanket.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote1; pub trait Local { diff --git a/src/test/run-pass/coherence-covered-type-parameter.rs b/src/test/run-pass/coherence-covered-type-parameter.rs index 7bb3a01ccf8..890470d8ac2 100644 --- a/src/test/run-pass/coherence-covered-type-parameter.rs +++ b/src/test/run-pass/coherence-covered-type-parameter.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote; struct Foo<T>(T); diff --git a/src/test/run-pass/coherence-cow-1.rs b/src/test/run-pass/coherence-cow-1.rs index 4d76f482b4e..31f6c9af020 100644 --- a/src/test/run-pass/coherence-cow-1.rs +++ b/src/test/run-pass/coherence-cow-1.rs @@ -8,14 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // Test that it's ok for T to appear first in the self-type, as long // as it's covered somewhere. // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::{Remote,Pair}; pub struct Cover<T>(T); diff --git a/src/test/run-pass/coherence-cow-2.rs b/src/test/run-pass/coherence-cow-2.rs index 685432ad1cf..ccda8440ea2 100644 --- a/src/test/run-pass/coherence-cow-2.rs +++ b/src/test/run-pass/coherence-cow-2.rs @@ -8,14 +8,14 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // Test that it's ok for T to appear second in the self-type, as long // as it's covered somewhere. // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::{Remote,Pair}; pub struct Cover<T>(T); diff --git a/src/test/run-pass/coherence-iterator-vec-any-elem.rs b/src/test/run-pass/coherence-iterator-vec-any-elem.rs index e807b6ca3bc..04a6cd58827 100644 --- a/src/test/run-pass/coherence-iterator-vec-any-elem.rs +++ b/src/test/run-pass/coherence-iterator-vec-any-elem.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote1; struct Foo<T>(T); diff --git a/src/test/run-pass/coherence-iterator-vec.rs b/src/test/run-pass/coherence-iterator-vec.rs index 3cb3efe8e7b..8a3301dee27 100644 --- a/src/test/run-pass/coherence-iterator-vec.rs +++ b/src/test/run-pass/coherence-iterator-vec.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote1; struct Foo<T>(T); diff --git a/src/test/run-pass/coherence-local-1.rs b/src/test/run-pass/coherence-local-1.rs index 172066abb2b..21faa30245d 100644 --- a/src/test/run-pass/coherence-local-1.rs +++ b/src/test/run-pass/coherence-local-1.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote; struct Local; diff --git a/src/test/run-pass/coherence-local-2.rs b/src/test/run-pass/coherence-local-2.rs index afdea4e6b7f..5fd3e8ca86e 100644 --- a/src/test/run-pass/coherence-local-2.rs +++ b/src/test/run-pass/coherence-local-2.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:coherence-lib.rs +// aux-build:coherence_lib.rs // pretty-expanded FIXME #23616 -extern crate "coherence-lib" as lib; +extern crate coherence_lib as lib; use lib::Remote; struct Local<T>(T); diff --git a/src/test/run-pass/issue-12612.rs b/src/test/run-pass/issue-12612.rs index 8a23e43d59e..bdf8f84a959 100644 --- a/src/test/run-pass/issue-12612.rs +++ b/src/test/run-pass/issue-12612.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:issue-12612-1.rs -// aux-build:issue-12612-2.rs +// aux-build:issue_12612_1.rs +// aux-build:issue_12612_2.rs // pretty-expanded FIXME #23616 -extern crate "issue-12612-1" as foo; -extern crate "issue-12612-2" as bar; +extern crate issue_12612_1 as foo; +extern crate issue_12612_2 as bar; mod test { use bar::baz; diff --git a/src/test/run-pass/trait-safety-ok-cc.rs b/src/test/run-pass/trait-safety-ok-cc.rs index 11a58de4532..28f683c485a 100644 --- a/src/test/run-pass/trait-safety-ok-cc.rs +++ b/src/test/run-pass/trait-safety-ok-cc.rs @@ -8,13 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// aux-build:trait-safety-lib.rs +// aux-build:trait_safety_lib.rs // Simple smoke test that unsafe traits can be compiled across crates. // pretty-expanded FIXME #23616 -extern crate "trait-safety-lib" as lib; +extern crate trait_safety_lib as lib; use lib::Foo; |
