diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index 377b52a3dbe29..fcf8c8156944c 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -171,18 +171,6 @@ pub struct BitVec { impl Index for BitVec { type Output = bool; - - #[cfg(stage0)] - #[inline] - fn index(&self, i: &usize) -> &bool { - if self.get(*i).expect("index out of bounds") { - &TRUE - } else { - &FALSE - } - } - - #[cfg(not(stage0))] #[inline] fn index(&self, i: usize) -> &bool { if self.get(i).expect("index out of bounds") { diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index c2f6fbc0b2602..1f48f904e5fb0 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -915,20 +915,6 @@ impl Debug for BTreeMap { } } -#[cfg(stage0)] -#[stable(feature = "rust1", since = "1.0.0")] -impl Index for BTreeMap - where K: Borrow, Q: Ord -{ - type Output = V; - - #[inline] - fn index(&self, key: &Q) -> &V { - self.get(key).expect("no entry found for key") - } -} - -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K: Ord, Q: ?Sized, V> Index<&'a Q> for BTreeMap where K: Borrow, Q: Ord diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs index 23eafa41d8a01..66f04d94ca131 100644 --- a/src/libcollections/btree/node.rs +++ b/src/libcollections/btree/node.rs @@ -1524,36 +1524,6 @@ macro_rules! node_slice_impl { } /// Returns a sub-slice with elements starting with `min_key`. - #[cfg(stage0)] - pub fn slice_from(self, min_key: &K) -> $NodeSlice<'a, K, V> { - // _______________ - // |_1_|_3_|_5_|_7_| - // | | | | | - // 0 0 1 1 2 2 3 3 4 index - // | | | | | - // \___|___|___|___/ slice_from(&0); pos = 0 - // \___|___|___/ slice_from(&2); pos = 1 - // |___|___|___/ slice_from(&3); pos = 1; result.head_is_edge = false - // \___|___/ slice_from(&4); pos = 2 - // \___/ slice_from(&6); pos = 3 - // \|/ slice_from(&999); pos = 4 - let (pos, pos_is_kv) = self.search_linear(min_key); - $NodeSlice { - has_edges: self.has_edges, - edges: if !self.has_edges { - self.edges - } else { - self.edges.$index(&(pos ..)) - }, - keys: &self.keys[pos ..], - vals: self.vals.$index(&(pos ..)), - head_is_edge: !pos_is_kv, - tail_is_edge: self.tail_is_edge, - } - } - - /// Returns a sub-slice with elements starting with `min_key`. - #[cfg(not(stage0))] pub fn slice_from(self, min_key: &K) -> $NodeSlice<'a, K, V> { // _______________ // |_1_|_3_|_5_|_7_| @@ -1582,37 +1552,6 @@ macro_rules! node_slice_impl { } /// Returns a sub-slice with elements up to and including `max_key`. - #[cfg(stage0)] - pub fn slice_to(self, max_key: &K) -> $NodeSlice<'a, K, V> { - // _______________ - // |_1_|_3_|_5_|_7_| - // | | | | | - // 0 0 1 1 2 2 3 3 4 index - // | | | | | - //\|/ | | | | slice_to(&0); pos = 0 - // \___/ | | | slice_to(&2); pos = 1 - // \___|___| | | slice_to(&3); pos = 1; result.tail_is_edge = false - // \___|___/ | | slice_to(&4); pos = 2 - // \___|___|___/ | slice_to(&6); pos = 3 - // \___|___|___|___/ slice_to(&999); pos = 4 - let (pos, pos_is_kv) = self.search_linear(max_key); - let pos = pos + if pos_is_kv { 1 } else { 0 }; - $NodeSlice { - has_edges: self.has_edges, - edges: if !self.has_edges { - self.edges - } else { - self.edges.$index(&(.. (pos + 1))) - }, - keys: &self.keys[..pos], - vals: self.vals.$index(&(.. pos)), - head_is_edge: self.head_is_edge, - tail_is_edge: !pos_is_kv, - } - } - - /// Returns a sub-slice with elements up to and including `max_key`. - #[cfg(not(stage0))] pub fn slice_to(self, max_key: &K) -> $NodeSlice<'a, K, V> { // _______________ // |_1_|_3_|_5_|_7_| diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index a61eaecd2b1ea..7131c1cd881b4 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -903,13 +903,6 @@ impl<'a> Add<&'a str> for String { impl ops::Index> for String { type Output = str; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::Range) -> &str { - &self[..][*index] - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::Range) -> &str { &self[..][index] @@ -919,13 +912,6 @@ impl ops::Index> for String { impl ops::Index> for String { type Output = str; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeTo) -> &str { - &self[..][*index] - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeTo) -> &str { &self[..][index] @@ -935,13 +921,6 @@ impl ops::Index> for String { impl ops::Index> for String { type Output = str; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeFrom) -> &str { - &self[..][*index] - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeFrom) -> &str { &self[..][index] @@ -951,13 +930,6 @@ impl ops::Index> for String { impl ops::Index for String { type Output = str; - #[cfg(stage0)] - #[inline] - fn index(&self, _index: &ops::RangeFull) -> &str { - unsafe { mem::transmute(&*self.vec) } - } - - #[cfg(not(stage0))] #[inline] fn index(&self, _index: ops::RangeFull) -> &str { unsafe { mem::transmute(&*self.vec) } diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index e71077c96c774..ee528255ae7a5 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1343,15 +1343,6 @@ impl Hash for Vec { impl Index for Vec { type Output = T; - - #[cfg(stage0)] - #[inline] - fn index(&self, index: &usize) -> &T { - // NB built-in indexing via `&[T]` - &(**self)[*index] - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: usize) -> &T { // NB built-in indexing via `&[T]` @@ -1361,15 +1352,6 @@ impl Index for Vec { #[stable(feature = "rust1", since = "1.0.0")] impl IndexMut for Vec { - - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &usize) -> &mut T { - // NB built-in indexing via `&mut [T]` - &mut (**self)[*index] - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: usize) -> &mut T { // NB built-in indexing via `&mut [T]` @@ -1382,13 +1364,6 @@ impl IndexMut for Vec { impl ops::Index> for Vec { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::Range) -> &[T] { - Index::index(&**self, index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::Range) -> &[T] { Index::index(&**self, index) @@ -1398,13 +1373,6 @@ impl ops::Index> for Vec { impl ops::Index> for Vec { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeTo) -> &[T] { - Index::index(&**self, index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeTo) -> &[T] { Index::index(&**self, index) @@ -1414,13 +1382,6 @@ impl ops::Index> for Vec { impl ops::Index> for Vec { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeFrom) -> &[T] { - Index::index(&**self, index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeFrom) -> &[T] { Index::index(&**self, index) @@ -1430,13 +1391,6 @@ impl ops::Index> for Vec { impl ops::Index for Vec { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, _index: &ops::RangeFull) -> &[T] { - self - } - - #[cfg(not(stage0))] #[inline] fn index(&self, _index: ops::RangeFull) -> &[T] { self @@ -1446,13 +1400,6 @@ impl ops::Index for Vec { #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for Vec { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::Range) -> &mut [T] { - IndexMut::index_mut(&mut **self, index) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::Range) -> &mut [T] { IndexMut::index_mut(&mut **self, index) @@ -1461,13 +1408,6 @@ impl ops::IndexMut> for Vec { #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for Vec { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::RangeTo) -> &mut [T] { - IndexMut::index_mut(&mut **self, index) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::RangeTo) -> &mut [T] { IndexMut::index_mut(&mut **self, index) @@ -1476,13 +1416,6 @@ impl ops::IndexMut> for Vec { #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for Vec { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::RangeFrom) -> &mut [T] { - IndexMut::index_mut(&mut **self, index) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::RangeFrom) -> &mut [T] { IndexMut::index_mut(&mut **self, index) @@ -1491,13 +1424,6 @@ impl ops::IndexMut> for Vec { #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut for Vec { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, _index: &ops::RangeFull) -> &mut [T] { - self.as_mut_slice() - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, _index: ops::RangeFull) -> &mut [T] { self.as_mut_slice() diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index af9db46f810b9..f5702be2f4588 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -1705,13 +1705,6 @@ impl Hash for VecDeque { impl Index for VecDeque { type Output = A; - #[cfg(stage0)] - #[inline] - fn index(&self, i: &usize) -> &A { - self.get(*i).expect("Out of bounds access") - } - - #[cfg(not(stage0))] #[inline] fn index(&self, i: usize) -> &A { self.get(i).expect("Out of bounds access") @@ -1720,13 +1713,6 @@ impl Index for VecDeque { #[stable(feature = "rust1", since = "1.0.0")] impl IndexMut for VecDeque { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, i: &usize) -> &mut A { - self.get_mut(*i).expect("Out of bounds access") - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, i: usize) -> &mut A { self.get_mut(i).expect("Out of bounds access") diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index c994064d34724..980131b9711e0 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -821,17 +821,6 @@ impl Extend<(usize, V)> for VecMap { } } -#[cfg(stage0)] -impl Index for VecMap { - type Output = V; - - #[inline] - fn index<'a>(&'a self, i: &usize) -> &'a V { - self.get(i).expect("key not present") - } -} - -#[cfg(not(stage0))] impl Index for VecMap { type Output = V; @@ -841,7 +830,6 @@ impl Index for VecMap { } } -#[cfg(not(stage0))] impl<'a,V> Index<&'a usize> for VecMap { type Output = V; @@ -851,16 +839,6 @@ impl<'a,V> Index<&'a usize> for VecMap { } } -#[cfg(stage0)] -#[stable(feature = "rust1", since = "1.0.0")] -impl IndexMut for VecMap { - #[inline] - fn index_mut(&mut self, i: &usize) -> &mut V { - self.get_mut(&i).expect("key not present") - } -} - -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl IndexMut for VecMap { #[inline] @@ -869,7 +847,6 @@ impl IndexMut for VecMap { } } -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl<'a, V> IndexMut<&'a usize> for VecMap { #[inline] diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 1f1044b0b2152..211b0152c33ce 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -44,10 +44,6 @@ use marker::Sized; -#[cfg(stage0)] pub use self::copy_memory as copy; -#[cfg(stage0)] pub use self::set_memory as write_bytes; -#[cfg(stage0)] pub use self::copy_nonoverlapping_memory as copy_nonoverlapping; - extern "rust-intrinsic" { // NB: These intrinsics take unsafe pointers because they mutate aliased @@ -183,7 +179,6 @@ extern "rust-intrinsic" { pub fn pref_align_of() -> usize; /// Gets a static string slice containing the name of a type. - #[cfg(not(stage0))] pub fn type_name() -> &'static str; /// Gets an identifier which is globally unique to the specified type. This @@ -287,14 +282,8 @@ extern "rust-intrinsic" { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] pub fn copy_nonoverlapping(dst: *mut T, src: *const T, count: usize); - /// dox - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - pub fn copy_nonoverlapping_memory(dst: *mut T, src: *const T, count: usize); - /// Copies `count * size_of` bytes from `src` to `dst`. The source /// and destination may overlap. /// @@ -323,26 +312,14 @@ extern "rust-intrinsic" { /// } /// ``` /// - #[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] pub fn copy(dst: *mut T, src: *const T, count: usize); - /// dox - #[cfg(stage0)] - #[stable(feature = "rust1", since = "1.0.0")] - pub fn copy_memory(dst: *mut T, src: *const T, count: usize); - /// Invokes memset on the specified pointer, setting `count * size_of::()` /// bytes of memory starting at `dst` to `c`. - #[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] pub fn write_bytes(dst: *mut T, val: u8, count: usize); - /// dox - #[cfg(stage0)] - #[stable(feature = "rust1", since = "1.0.0")] - pub fn set_memory(dst: *mut T, val: u8, count: usize); - /// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with /// a size of `count` * `size_of::()` and an alignment of /// `min_align_of::()` diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 16d03901239b3..26deb80d8c51f 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -917,12 +917,6 @@ pub trait Index { type Output: ?Sized; /// The method for the indexing (`Foo[Bar]`) operation - #[cfg(stage0)] - #[stable(feature = "rust1", since = "1.0.0")] - fn index<'a>(&'a self, index: &Idx) -> &'a Self::Output; - - /// The method for the indexing (`Foo[Bar]`) operation - #[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] fn index<'a>(&'a self, index: Idx) -> &'a Self::Output; } @@ -966,12 +960,6 @@ pub trait Index { #[stable(feature = "rust1", since = "1.0.0")] pub trait IndexMut: Index { /// The method for the indexing (`Foo[Bar]`) operation - #[cfg(stage0)] - #[stable(feature = "rust1", since = "1.0.0")] - fn index_mut<'a>(&'a mut self, index: &Idx) -> &'a mut Self::Output; - - /// The method for the indexing (`Foo[Bar]`) operation - #[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] fn index_mut<'a>(&'a mut self, index: Idx) -> &'a mut Self::Output; } @@ -1149,20 +1137,6 @@ impl<'a, T: ?Sized> DerefMut for &'a mut T { #[lang="fn"] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_paren_sugar] -#[cfg(stage0)] -pub trait Fn { - /// The returned type after the call operator is used. - type Output; - - /// This is called when the call operator is used. - extern "rust-call" fn call(&self, args: Args) -> Self::Output; -} - -/// A version of the call operator that takes an immutable receiver. -#[lang="fn"] -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_paren_sugar] -#[cfg(not(stage0))] pub trait Fn : FnMut { /// This is called when the call operator is used. extern "rust-call" fn call(&self, args: Args) -> Self::Output; @@ -1172,20 +1146,6 @@ pub trait Fn : FnMut { #[lang="fn_mut"] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_paren_sugar] -#[cfg(stage0)] -pub trait FnMut { - /// The returned type after the call operator is used. - type Output; - - /// This is called when the call operator is used. - extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; -} - -/// A version of the call operator that takes a mutable receiver. -#[lang="fn_mut"] -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_paren_sugar] -#[cfg(not(stage0))] pub trait FnMut : FnOnce { /// This is called when the call operator is used. extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; @@ -1202,25 +1162,3 @@ pub trait FnOnce { /// This is called when the call operator is used. extern "rust-call" fn call_once(self, args: Args) -> Self::Output; } - -#[cfg(stage0)] -impl FnMut for F - where F : Fn -{ - type Output = >::Output; - - extern "rust-call" fn call_mut(&mut self, args: A) -> >::Output { - self.call(args) - } -} - -#[cfg(stage0)] -impl FnOnce for F - where F : FnMut -{ - type Output = >::Output; - - extern "rust-call" fn call_once(mut self, args: A) -> >::Output { - self.call_mut(args) - } -} diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index fce29abed7300..d5e8b4ce81e5c 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -263,18 +263,6 @@ impl SliceExt for [T] { #[inline] fn as_mut_slice(&mut self) -> &mut [T] { self } - #[cfg(stage0)] - #[inline] - fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { - unsafe { - let self2: &mut [T] = mem::transmute_copy(&self); - - (ops::IndexMut::index_mut(self, &ops::RangeTo { end: mid } ), - ops::IndexMut::index_mut(self2, &ops::RangeFrom { start: mid } )) - } - } - - #[cfg(not(stage0))] #[inline] fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { unsafe { @@ -507,14 +495,6 @@ impl SliceExt for [T] { impl ops::Index for [T] { type Output = T; - #[cfg(stage0)] - fn index(&self, &index: &usize) -> &T { - assert!(index < self.len()); - - unsafe { mem::transmute(self.repr().data.offset(index as isize)) } - } - - #[cfg(not(stage0))] fn index(&self, index: usize) -> &T { assert!(index < self.len()); @@ -524,15 +504,6 @@ impl ops::Index for [T] { #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut for [T] { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, &index: &usize) -> &mut T { - assert!(index < self.len()); - - unsafe { mem::transmute(self.repr().data.offset(index as isize)) } - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: usize) -> &mut T { assert!(index < self.len()); @@ -545,20 +516,6 @@ impl ops::IndexMut for [T] { impl ops::Index> for [T] { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::Range) -> &[T] { - assert!(index.start <= index.end); - assert!(index.end <= self.len()); - unsafe { - from_raw_parts ( - self.as_ptr().offset(index.start as isize), - index.end - index.start - ) - } - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::Range) -> &[T] { assert!(index.start <= index.end); @@ -575,13 +532,6 @@ impl ops::Index> for [T] { impl ops::Index> for [T] { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeTo) -> &[T] { - self.index(&ops::Range{ start: 0, end: index.end }) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeTo) -> &[T] { self.index(ops::Range{ start: 0, end: index.end }) @@ -591,13 +541,6 @@ impl ops::Index> for [T] { impl ops::Index> for [T] { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeFrom) -> &[T] { - self.index(&ops::Range{ start: index.start, end: self.len() }) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeFrom) -> &[T] { self.index(ops::Range{ start: index.start, end: self.len() }) @@ -607,13 +550,6 @@ impl ops::Index> for [T] { impl ops::Index for [T] { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, _index: &RangeFull) -> &[T] { - self - } - - #[cfg(not(stage0))] #[inline] fn index(&self, _index: RangeFull) -> &[T] { self @@ -622,20 +558,6 @@ impl ops::Index for [T] { #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for [T] { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::Range) -> &mut [T] { - assert!(index.start <= index.end); - assert!(index.end <= self.len()); - unsafe { - from_raw_parts_mut( - self.as_mut_ptr().offset(index.start as isize), - index.end - index.start - ) - } - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::Range) -> &mut [T] { assert!(index.start <= index.end); @@ -650,13 +572,6 @@ impl ops::IndexMut> for [T] { } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for [T] { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::RangeTo) -> &mut [T] { - self.index_mut(&ops::Range{ start: 0, end: index.end }) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::RangeTo) -> &mut [T] { self.index_mut(ops::Range{ start: 0, end: index.end }) @@ -664,14 +579,6 @@ impl ops::IndexMut> for [T] { } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut> for [T] { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::RangeFrom) -> &mut [T] { - let len = self.len(); - self.index_mut(&ops::Range{ start: index.start, end: len }) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::RangeFrom) -> &mut [T] { let len = self.len(); @@ -680,14 +587,6 @@ impl ops::IndexMut> for [T] { } #[stable(feature = "rust1", since = "1.0.0")] impl ops::IndexMut for [T] { - - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, _index: &RangeFull) -> &mut [T] { - self - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, _index: RangeFull) -> &mut [T] { self @@ -875,13 +774,6 @@ unsafe impl<'a, T: Sync> Send for Iter<'a, T> {} impl<'a, T> ops::Index> for Iter<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::Range) -> &[T] { - self.as_slice().index(index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::Range) -> &[T] { self.as_slice().index(index) @@ -892,13 +784,6 @@ impl<'a, T> ops::Index> for Iter<'a, T> { impl<'a, T> ops::Index> for Iter<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeTo) -> &[T] { - self.as_slice().index(index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeTo) -> &[T] { self.as_slice().index(index) @@ -909,13 +794,6 @@ impl<'a, T> ops::Index> for Iter<'a, T> { impl<'a, T> ops::Index> for Iter<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeFrom) -> &[T] { - self.as_slice().index(index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeFrom) -> &[T] { self.as_slice().index(index) @@ -926,13 +804,6 @@ impl<'a, T> ops::Index> for Iter<'a, T> { impl<'a, T> ops::Index for Iter<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, _index: &RangeFull) -> &[T] { - self.as_slice() - } - - #[cfg(not(stage0))] #[inline] fn index(&self, _index: RangeFull) -> &[T] { self.as_slice() @@ -1000,13 +871,6 @@ unsafe impl<'a, T: Send> Send for IterMut<'a, T> {} impl<'a, T> ops::Index> for IterMut<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::Range) -> &[T] { - self.index(&RangeFull).index(index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::Range) -> &[T] { self.index(RangeFull).index(index) @@ -1016,13 +880,6 @@ impl<'a, T> ops::Index> for IterMut<'a, T> { impl<'a, T> ops::Index> for IterMut<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeTo) -> &[T] { - self.index(&RangeFull).index(index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeTo) -> &[T] { self.index(RangeFull).index(index) @@ -1032,13 +889,6 @@ impl<'a, T> ops::Index> for IterMut<'a, T> { impl<'a, T> ops::Index> for IterMut<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeFrom) -> &[T] { - self.index(&RangeFull).index(index) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeFrom) -> &[T] { self.index(RangeFull).index(index) @@ -1048,13 +898,6 @@ impl<'a, T> ops::Index> for IterMut<'a, T> { impl<'a, T> ops::Index for IterMut<'a, T> { type Output = [T]; - #[cfg(stage0)] - #[inline] - fn index(&self, _index: &RangeFull) -> &[T] { - make_slice!(T => &[T]: self.ptr, self.end) - } - - #[cfg(not(stage0))] #[inline] fn index(&self, _index: RangeFull) -> &[T] { make_slice!(T => &[T]: self.ptr, self.end) @@ -1063,13 +906,6 @@ impl<'a, T> ops::Index for IterMut<'a, T> { #[unstable(feature = "core")] impl<'a, T> ops::IndexMut> for IterMut<'a, T> { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::Range) -> &mut [T] { - self.index_mut(&RangeFull).index_mut(index) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::Range) -> &mut [T] { self.index_mut(RangeFull).index_mut(index) @@ -1078,13 +914,6 @@ impl<'a, T> ops::IndexMut> for IterMut<'a, T> { #[unstable(feature = "core")] impl<'a, T> ops::IndexMut> for IterMut<'a, T> { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::RangeTo) -> &mut [T] { - self.index_mut(&RangeFull).index_mut(index) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::RangeTo) -> &mut [T] { self.index_mut(RangeFull).index_mut(index) @@ -1093,13 +922,6 @@ impl<'a, T> ops::IndexMut> for IterMut<'a, T> { #[unstable(feature = "core")] impl<'a, T> ops::IndexMut> for IterMut<'a, T> { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, index: &ops::RangeFrom) -> &mut [T] { - self.index_mut(&RangeFull).index_mut(index) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, index: ops::RangeFrom) -> &mut [T] { self.index_mut(RangeFull).index_mut(index) @@ -1108,13 +930,6 @@ impl<'a, T> ops::IndexMut> for IterMut<'a, T> { #[unstable(feature = "core")] impl<'a, T> ops::IndexMut for IterMut<'a, T> { - #[cfg(stage0)] - #[inline] - fn index_mut(&mut self, _index: &RangeFull) -> &mut [T] { - make_mut_slice!(T => &mut [T]: self.ptr, self.end) - } - - #[cfg(not(stage0))] #[inline] fn index_mut(&mut self, _index: RangeFull) -> &mut [T] { make_mut_slice!(T => &mut [T]: self.ptr, self.end) diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index a629e0308e982..7fe3758ed9554 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -541,17 +541,6 @@ delegate_iter!{exact u8 : Bytes<'a>} #[derive(Copy, Clone)] struct BytesDeref; -#[cfg(stage0)] -impl<'a> Fn<(&'a u8,)> for BytesDeref { - type Output = u8; - - #[inline] - extern "rust-call" fn call(&self, (ptr,): (&'a u8,)) -> u8 { - *ptr - } -} - -#[cfg(not(stage0))] impl<'a> Fn<(&'a u8,)> for BytesDeref { #[inline] extern "rust-call" fn call(&self, (ptr,): (&'a u8,)) -> u8 { @@ -559,7 +548,6 @@ impl<'a> Fn<(&'a u8,)> for BytesDeref { } } -#[cfg(not(stage0))] impl<'a> FnMut<(&'a u8,)> for BytesDeref { #[inline] extern "rust-call" fn call_mut(&mut self, (ptr,): (&'a u8,)) -> u8 { @@ -567,7 +555,6 @@ impl<'a> FnMut<(&'a u8,)> for BytesDeref { } } -#[cfg(not(stage0))] impl<'a> FnOnce<(&'a u8,)> for BytesDeref { type Output = u8; @@ -1319,50 +1306,6 @@ mod traits { /// // byte 100 is outside the string /// // &s[3 .. 100]; /// ``` - #[cfg(stage0)] - #[stable(feature = "rust1", since = "1.0.0")] - impl ops::Index> for str { - type Output = str; - #[inline] - fn index(&self, index: &ops::Range) -> &str { - // is_char_boundary checks that the index is in [0, .len()] - if index.start <= index.end && - self.is_char_boundary(index.start) && - self.is_char_boundary(index.end) { - unsafe { self.slice_unchecked(index.start, index.end) } - } else { - super::slice_error_fail(self, index.start, index.end) - } - } - } - - /// Returns a slice of the given string from the byte range - /// [`begin`..`end`). - /// - /// This operation is `O(1)`. - /// - /// Panics when `begin` and `end` do not point to valid characters - /// or point beyond the last character of the string. - /// - /// # Examples - /// - /// ``` - /// let s = "Löwe 老虎 Léopard"; - /// assert_eq!(&s[0 .. 1], "L"); - /// - /// assert_eq!(&s[1 .. 9], "öwe 老"); - /// - /// // these will panic: - /// // byte 2 lies within `ö`: - /// // &s[2 ..3]; - /// - /// // byte 8 lies within `老` - /// // &s[1 .. 8]; - /// - /// // byte 100 is outside the string - /// // &s[3 .. 100]; - /// ``` - #[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index> for str { type Output = str; @@ -1390,18 +1333,6 @@ mod traits { impl ops::Index> for str { type Output = str; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeTo) -> &str { - // is_char_boundary checks that the index is in [0, .len()] - if self.is_char_boundary(index.end) { - unsafe { self.slice_unchecked(0, index.end) } - } else { - super::slice_error_fail(self, 0, index.end) - } - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeTo) -> &str { // is_char_boundary checks that the index is in [0, .len()] @@ -1423,18 +1354,6 @@ mod traits { impl ops::Index> for str { type Output = str; - #[cfg(stage0)] - #[inline] - fn index(&self, index: &ops::RangeFrom) -> &str { - // is_char_boundary checks that the index is in [0, .len()] - if self.is_char_boundary(index.start) { - unsafe { self.slice_unchecked(index.start, self.len()) } - } else { - super::slice_error_fail(self, index.start, self.len()) - } - } - - #[cfg(not(stage0))] #[inline] fn index(&self, index: ops::RangeFrom) -> &str { // is_char_boundary checks that the index is in [0, .len()] @@ -1450,13 +1369,6 @@ mod traits { impl ops::Index for str { type Output = str; - #[cfg(stage0)] - #[inline] - fn index(&self, _index: &ops::RangeFull) -> &str { - self - } - - #[cfg(not(stage0))] #[inline] fn index(&self, _index: ops::RangeFull) -> &str { self diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs index 7d8789c3cd1a8..b6a8525675e45 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 bb7880161d5d4..8347571a48059 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 7b37a5a9d1c81..8e25ee095a043 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/libserialize/json.rs b/src/libserialize/json.rs index 0d6ed91d52981..d5f494d2ae98e 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1218,16 +1218,6 @@ impl Json { } } -#[cfg(stage0)] -impl<'a> Index<&'a str> for Json { - type Output = Json; - - fn index(&self, idx: & &str) -> &Json { - self.find(*idx).unwrap() - } -} - -#[cfg(not(stage0))] impl<'a> Index<&'a str> for Json { type Output = Json; @@ -1236,19 +1226,6 @@ impl<'a> Index<&'a str> for Json { } } -#[cfg(stage0)] -impl Index for Json { - type Output = Json; - - fn index<'a>(&'a self, idx: &uint) -> &'a Json { - match self { - &Json::Array(ref v) => &v[*idx], - _ => panic!("can only index Json with uint if it is an array") - } - } -} - -#[cfg(not(stage0))] impl Index for Json { type Output = Json; diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index f9558b85825d2..91f53cb2987fb 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1247,22 +1247,6 @@ impl Default for HashMap } } -#[cfg(stage0)] -#[stable(feature = "rust1", since = "1.0.0")] -impl Index for HashMap - where K: Eq + Hash + Borrow, - Q: Eq + Hash, - S: HashState, -{ - type Output = V; - - #[inline] - fn index<'a>(&'a self, index: &Q) -> &'a V { - self.get(index).expect("no entry found for key") - } -} - -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap where K: Eq + Hash + Borrow, diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 5851c6e299809..99cbd26bcd1a8 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -133,18 +133,6 @@ impl<'a> From<&'a OsStr> for OsString { } } -#[cfg(stage0)] -#[stable(feature = "rust1", since = "1.0.0")] -impl ops::Index for OsString { - type Output = OsStr; - - #[inline] - fn index(&self, _index: &ops::RangeFull) -> &OsStr { - unsafe { mem::transmute(self.inner.as_slice()) } - } -} - -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] impl ops::Index for OsString { type Output = OsStr; diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 9f3dae34c7a4b..0d83e4497f7e2 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -634,30 +634,6 @@ impl Wtf8 { /// /// Panics when `begin` and `end` do not point to code point boundaries, /// or point beyond the end of the string. -#[cfg(stage0)] -impl ops::Index> for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, range: &ops::Range) -> &Wtf8 { - // is_code_point_boundary checks that the index is in [0, .len()] - if range.start <= range.end && - is_code_point_boundary(self, range.start) && - is_code_point_boundary(self, range.end) { - unsafe { slice_unchecked(self, range.start, range.end) } - } else { - slice_error_fail(self, range.start, range.end) - } - } -} - -/// Return a slice of the given string for the byte range [`begin`..`end`). -/// -/// # Panics -/// -/// Panics when `begin` and `end` do not point to code point boundaries, -/// or point beyond the end of the string. -#[cfg(not(stage0))] impl ops::Index> for Wtf8 { type Output = Wtf8; @@ -680,28 +656,6 @@ impl ops::Index> for Wtf8 { /// /// Panics when `begin` is not at a code point boundary, /// or is beyond the end of the string. -#[cfg(stage0)] -impl ops::Index> for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, range: &ops::RangeFrom) -> &Wtf8 { - // is_code_point_boundary checks that the index is in [0, .len()] - if is_code_point_boundary(self, range.start) { - unsafe { slice_unchecked(self, range.start, self.len()) } - } else { - slice_error_fail(self, range.start, self.len()) - } - } -} - -/// Return a slice of the given string from byte `begin` to its end. -/// -/// # Panics -/// -/// Panics when `begin` is not at a code point boundary, -/// or is beyond the end of the string. -#[cfg(not(stage0))] impl ops::Index> for Wtf8 { type Output = Wtf8; @@ -722,28 +676,6 @@ impl ops::Index> for Wtf8 { /// /// Panics when `end` is not at a code point boundary, /// or is beyond the end of the string. -#[cfg(stage0)] -impl ops::Index> for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, range: &ops::RangeTo) -> &Wtf8 { - // is_code_point_boundary checks that the index is in [0, .len()] - if is_code_point_boundary(self, range.end) { - unsafe { slice_unchecked(self, 0, range.end) } - } else { - slice_error_fail(self, 0, range.end) - } - } -} - -/// Return a slice of the given string from its beginning to byte `end`. -/// -/// # Panics -/// -/// Panics when `end` is not at a code point boundary, -/// or is beyond the end of the string. -#[cfg(not(stage0))] impl ops::Index> for Wtf8 { type Output = Wtf8; @@ -758,17 +690,6 @@ impl ops::Index> for Wtf8 { } } -#[cfg(stage0)] -impl ops::Index for Wtf8 { - type Output = Wtf8; - - #[inline] - fn index(&self, _range: &ops::RangeFull) -> &Wtf8 { - self - } -} - -#[cfg(not(stage0))] impl ops::Index for Wtf8 { type Output = Wtf8; diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 7c95f16bee924..92795bb200275 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4977,46 +4977,19 @@ impl<'a> Parser<'a> { /// /// # Examples /// - /// extern crate url; - /// extern crate foo = "bar"; //deprecated + /// 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/libunicode/char.rs b/src/libunicode/char.rs index db5a25b9bedca..2aeade5066fde 100644 --- a/src/libunicode/char.rs +++ b/src/libunicode/char.rs @@ -41,430 +41,6 @@ pub use normalize::{decompose_canonical, decompose_compatible, compose}; pub use tables::normalization::canonical_combining_class; pub use tables::UNICODE_VERSION; -#[cfg(stage0)] -/// Functionality for manipulating `char`. -#[stable(feature = "rust1", since = "1.0.0")] -pub trait CharExt { - /// Checks if a `char` parses as a numeric digit in the given radix. - /// - /// Compared to `is_numeric()`, this function only recognizes the characters - /// `0-9`, `a-z` and `A-Z`. - /// - /// # Return value - /// - /// Returns `true` if `c` is a valid digit under `radix`, and `false` - /// otherwise. - /// - /// # Panics - /// - /// Panics if given a radix > 36. - /// - /// # Examples - /// - /// ``` - /// let c = '1'; - /// - /// assert!(c.is_digit(10)); - /// - /// assert!('f'.is_digit(16)); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - fn is_digit(self, radix: u32) -> bool; - - /// Converts a character to the corresponding digit. - /// - /// # Return value - /// - /// If `c` is between '0' and '9', the corresponding value between 0 and - /// 9. If `c` is 'a' or 'A', 10. If `c` is 'b' or 'B', 11, etc. Returns - /// none if the character does not refer to a digit in the given radix. - /// - /// # Panics - /// - /// Panics if given a radix outside the range [0..36]. - /// - /// # Examples - /// - /// ``` - /// let c = '1'; - /// - /// assert_eq!(c.to_digit(10), Some(1)); - /// - /// assert_eq!('f'.to_digit(16), Some(15)); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - fn to_digit(self, radix: u32) -> Option; - - /// Returns an iterator that yields the hexadecimal Unicode escape of a - /// character, as `char`s. - /// - /// All characters are escaped with Rust syntax of the form `\\u{NNNN}` - /// where `NNNN` is the shortest hexadecimal representation of the code - /// point. - /// - /// # Examples - /// - /// ``` - /// for i in '❤'.escape_unicode() { - /// println!("{}", i); - /// } - /// ``` - /// - /// This prints: - /// - /// ```text - /// \ - /// u - /// { - /// 2 - /// 7 - /// 6 - /// 4 - /// } - /// ``` - /// - /// Collecting into a `String`: - /// - /// ``` - /// let heart: String = '❤'.escape_unicode().collect(); - /// - /// assert_eq!(heart, r"\u{2764}"); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - fn escape_unicode(self) -> EscapeUnicode; - - /// Returns an iterator that yields the 'default' ASCII and - /// C++11-like literal escape of a character, as `char`s. - /// - /// The default is chosen with a bias toward producing literals that are - /// legal in a variety of languages, including C++11 and similar C-family - /// languages. The exact rules are: - /// - /// * Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively. - /// * Single-quote, double-quote and backslash chars are backslash- - /// escaped. - /// * Any other chars in the range [0x20,0x7e] are not escaped. - /// * Any other chars are given hex Unicode escapes; see `escape_unicode`. - /// - /// # Examples - /// - /// ``` - /// for i in '"'.escape_default() { - /// println!("{}", i); - /// } - /// ``` - /// - /// This prints: - /// - /// ```text - /// \ - /// " - /// ``` - /// - /// Collecting into a `String`: - /// - /// ``` - /// let quote: String = '"'.escape_default().collect(); - /// - /// assert_eq!(quote, "\\\""); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - fn escape_default(self) -> EscapeDefault; - - /// Returns the number of bytes this character would need if encoded in - /// UTF-8. - /// - /// # Examples - /// - /// ``` - /// let n = 'ß'.len_utf8(); - /// - /// assert_eq!(n, 2); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - fn len_utf8(self) -> usize; - - /// Returns the number of 16-bit code units this character would need if - /// encoded in UTF-16. - /// - /// # Examples - /// - /// ``` - /// let n = 'ß'.len_utf16(); - /// - /// assert_eq!(n, 1); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - fn len_utf16(self) -> usize; - - /// Encodes this character as UTF-8 into the provided byte buffer, and then - /// returns the number of bytes written. - /// - /// If the buffer is not large enough, nothing will be written into it and a - /// `None` will be returned. A buffer of length four is large enough to - /// encode any `char`. - /// - /// # Examples - /// - /// In both of these examples, 'ß' takes two bytes to encode. - /// - /// ``` - /// # #![feature(unicode)] - /// let mut b = [0; 2]; - /// - /// let result = 'ß'.encode_utf8(&mut b); - /// - /// assert_eq!(result, Some(2)); - /// ``` - /// - /// A buffer that's too small: - /// - /// ``` - /// # #![feature(unicode)] - /// let mut b = [0; 1]; - /// - /// let result = 'ß'.encode_utf8(&mut b); - /// - /// assert_eq!(result, None); - /// ``` - #[unstable(feature = "unicode", - reason = "pending decision about Iterator/Writer/Reader")] - fn encode_utf8(self, dst: &mut [u8]) -> Option; - - /// Encodes this character as UTF-16 into the provided `u16` buffer, and - /// then returns the number of `u16`s written. - /// - /// If the buffer is not large enough, nothing will be written into it and a - /// `None` will be returned. A buffer of length 2 is large enough to encode - /// any `char`. - /// - /// # Examples - /// - /// In both of these examples, 'ß' takes one `u16` to encode. - /// - /// ``` - /// # #![feature(unicode)] - /// let mut b = [0; 1]; - /// - /// let result = 'ß'.encode_utf16(&mut b); - /// - /// assert_eq!(result, Some(1)); - /// ``` - /// - /// A buffer that's too small: - /// - /// ``` - /// # #![feature(unicode)] - /// let mut b = [0; 0]; - /// - /// let result = 'ß'.encode_utf8(&mut b); - /// - /// assert_eq!(result, None); - /// ``` - #[unstable(feature = "unicode", - reason = "pending decision about Iterator/Writer/Reader")] - fn encode_utf16(self, dst: &mut [u16]) -> Option; - - /// Returns whether the specified character is considered a Unicode - /// alphabetic code point. - #[stable(feature = "rust1", since = "1.0.0")] - fn is_alphabetic(self) -> bool; - - /// Returns whether the specified character satisfies the 'XID_Start' - /// Unicode property. - /// - /// 'XID_Start' is a Unicode Derived Property specified in - /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), - /// mostly similar to ID_Start but modified for closure under NFKx. - #[unstable(feature = "unicode", - reason = "mainly needed for compiler internals")] - fn is_xid_start(self) -> bool; - - /// Returns whether the specified `char` satisfies the 'XID_Continue' - /// Unicode property. - /// - /// 'XID_Continue' is a Unicode Derived Property specified in - /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), - /// mostly similar to 'ID_Continue' but modified for closure under NFKx. - #[unstable(feature = "unicode", - reason = "mainly needed for compiler internals")] - fn is_xid_continue(self) -> bool; - - /// Indicates whether a character is in lowercase. - /// - /// This is defined according to the terms of the Unicode Derived Core - /// Property `Lowercase`. - #[stable(feature = "rust1", since = "1.0.0")] - fn is_lowercase(self) -> bool; - - /// Indicates whether a character is in uppercase. - /// - /// This is defined according to the terms of the Unicode Derived Core - /// Property `Uppercase`. - #[stable(feature = "rust1", since = "1.0.0")] - fn is_uppercase(self) -> bool; - - /// Indicates whether a character is whitespace. - /// - /// Whitespace is defined in terms of the Unicode Property `White_Space`. - #[stable(feature = "rust1", since = "1.0.0")] - fn is_whitespace(self) -> bool; - - /// Indicates whether a character is alphanumeric. - /// - /// Alphanumericness is defined in terms of the Unicode General Categories - /// 'Nd', 'Nl', 'No' and the Derived Core Property 'Alphabetic'. - #[stable(feature = "rust1", since = "1.0.0")] - fn is_alphanumeric(self) -> bool; - - /// Indicates whether a character is a control code point. - /// - /// Control code points are defined in terms of the Unicode General - /// Category `Cc`. - #[stable(feature = "rust1", since = "1.0.0")] - fn is_control(self) -> bool; - - /// Indicates whether the character is numeric (Nd, Nl, or No). - #[stable(feature = "rust1", since = "1.0.0")] - fn is_numeric(self) -> bool; - - /// Converts a character to its lowercase equivalent. - /// - /// The case-folding performed is the common or simple mapping. See - /// `to_uppercase()` for references and more information. - /// - /// # Return value - /// - /// Returns an iterator which yields the characters corresponding to the - /// lowercase equivalent of the character. If no conversion is possible then - /// the input character is returned. - #[stable(feature = "rust1", since = "1.0.0")] - fn to_lowercase(self) -> ToLowercase; - - /// Converts a character to its uppercase equivalent. - /// - /// The case-folding performed is the common or simple mapping: it maps - /// one Unicode codepoint to its uppercase equivalent according to the - /// Unicode database [1]. The additional [`SpecialCasing.txt`] is not yet - /// considered here, but the iterator returned will soon support this form - /// of case folding. - /// - /// A full reference can be found here [2]. - /// - /// # Return value - /// - /// Returns an iterator which yields the characters corresponding to the - /// uppercase equivalent of the character. If no conversion is possible then - /// the input character is returned. - /// - /// [1]: ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt - /// - /// [`SpecialCasing`.txt`]: ftp://ftp.unicode.org/Public/UNIDATA/SpecialCasing.txt - /// - /// [2]: http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf#G33992 - #[stable(feature = "rust1", since = "1.0.0")] - fn to_uppercase(self) -> ToUppercase; - - /// Returns this character's displayed width in columns, or `None` if it is a - /// control character other than `'\x00'`. - /// - /// `is_cjk` determines behavior for characters in the Ambiguous category: - /// if `is_cjk` is `true`, these are 2 columns wide; otherwise, they are 1. - /// In CJK contexts, `is_cjk` should be `true`, else it should be `false`. - /// [Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/) - /// recommends that these characters be treated as 1 column (i.e., - /// `is_cjk` = `false`) if the context cannot be reliably determined. - #[unstable(feature = "unicode", - reason = "needs expert opinion. is_cjk flag stands out as ugly")] - fn width(self, is_cjk: bool) -> Option; -} - -#[cfg(stage0)] -#[stable(feature = "rust1", since = "1.0.0")] -impl CharExt for char { - #[inline] - fn is_digit(self, radix: u32) -> bool { C::is_digit(self, radix) } - fn to_digit(self, radix: u32) -> Option { C::to_digit(self, radix) } - fn escape_unicode(self) -> EscapeUnicode { C::escape_unicode(self) } - fn escape_default(self) -> EscapeDefault { C::escape_default(self) } - fn len_utf8(self) -> usize { C::len_utf8(self) } - fn len_utf16(self) -> usize { C::len_utf16(self) } - fn encode_utf8(self, dst: &mut [u8]) -> Option { C::encode_utf8(self, dst) } - fn encode_utf16(self, dst: &mut [u16]) -> Option { C::encode_utf16(self, dst) } - - #[inline] - fn is_alphabetic(self) -> bool { - match self { - 'a' ... 'z' | 'A' ... 'Z' => true, - c if c > '\x7f' => derived_property::Alphabetic(c), - _ => false - } - } - - #[inline] - fn is_xid_start(self) -> bool { derived_property::XID_Start(self) } - - #[inline] - fn is_xid_continue(self) -> bool { derived_property::XID_Continue(self) } - - #[inline] - fn is_lowercase(self) -> bool { - match self { - 'a' ... 'z' => true, - c if c > '\x7f' => derived_property::Lowercase(c), - _ => false - } - } - - #[inline] - fn is_uppercase(self) -> bool { - match self { - 'A' ... 'Z' => true, - c if c > '\x7f' => derived_property::Uppercase(c), - _ => false - } - } - - #[inline] - fn is_whitespace(self) -> bool { - match self { - ' ' | '\x09' ... '\x0d' => true, - c if c > '\x7f' => property::White_Space(c), - _ => false - } - } - - #[inline] - fn is_alphanumeric(self) -> bool { - self.is_alphabetic() || self.is_numeric() - } - - #[inline] - fn is_control(self) -> bool { general_category::Cc(self) } - - #[inline] - fn is_numeric(self) -> bool { - match self { - '0' ... '9' => true, - c if c > '\x7f' => general_category::N(c), - _ => false - } - } - - #[inline] - fn to_lowercase(self) -> ToLowercase { - ToLowercase(Some(conversions::to_lower(self))) - } - - #[inline] - fn to_uppercase(self) -> ToUppercase { - ToUppercase(Some(conversions::to_upper(self))) - } - - #[inline] - fn width(self, is_cjk: bool) -> Option { charwidth::width(self, is_cjk) } -} - /// An iterator over the lowercase mapping of a given character, returned from /// the [`to_lowercase` method](../primitive.char.html#method.to_lowercase) on /// characters. diff --git a/src/snapshots.txt b/src/snapshots.txt index 141ddba7db620..8b05f7c895527 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,13 @@ +S 2015-03-25 a923278 + bitrig-x86_64 41de2c7a69a1ac648d3fa3b65e96a29bdc122163 + freebsd-x86_64 cd02c86a9218da73b2a45aff293787010d33bf3e + linux-i386 da50141558eed6dabab97b79b2c6a7de4f2d2c5e + linux-x86_64 bca03458d28d07506bad4b80e5770b2117286244 + macos-i386 522d59b23dd885a45e2c5b33e80e76240bb2d9af + macos-x86_64 82df09d51d73d119a2f4e4d8041879615cb22081 + winnt-i386 5056e8def5ab4f4283b8f3aab160cc10231bb28d + winnt-x86_64 3f6b35ac12625b4b4b42dfd5eee5f6cbf122794e + S 2015-03-17 c64d671 bitrig-x86_64 41de2c7a69a1ac648d3fa3b65e96a29bdc122163 freebsd-x86_64 14ced24e1339a4dd8baa9db69995daa52a948d54 diff --git a/src/test/auxiliary/issue-12133-dylib2.rs b/src/test/auxiliary/issue-12133-dylib2.rs index cf1953005ba44..fa5722ae6a31b 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 f1f16af6f0e3f..c0539aa1b6e20 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 da47115e2b3f4..554170bc13037 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 8294d2b4594cf..bb51417528aef 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 827a9f18f4892..e20618f1ec076 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 27befee6f07f5..57a708542dec3 100644 --- a/src/test/auxiliary/static-function-pointer-aux.rs +++ b/src/test/auxiliary/static-function-pointer-aux.rs @@ -8,8 +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: int) -> int { -x } pub static F: fn(int) -> int = f; diff --git a/src/test/auxiliary/trait_default_method_xc_aux.rs b/src/test/auxiliary/trait_default_method_xc_aux.rs index 7424c21be3da0..a11cff147abff 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: int } pub trait A { 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 29df0fa705e1a..0000000000000 --- 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/borrowck-overloaded-index-autoderef.rs b/src/test/compile-fail/borrowck-overloaded-index-autoderef.rs index 55a6e2ac7b8d6..b726c46d5d533 100644 --- a/src/test/compile-fail/borrowck-overloaded-index-autoderef.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-autoderef.rs @@ -18,19 +18,6 @@ struct Foo { y: isize, } -#[cfg(stage0)] -impl Index for Foo { - type Output = isize; - - fn index<'a>(&'a self, z: &String) -> &'a isize { - if *z == "x" { - &self.x - } else { - &self.y - } - } -} - impl<'a> Index<&'a String> for Foo { type Output = isize; diff --git a/src/test/compile-fail/use-meta-mismatch.rs b/src/test/compile-fail/use-meta-mismatch.rs index 808deea226bfc..6b7b9c8914955 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 42df43934a89c..708d56442fe82 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 30a70fe0b3747..2e39c6690efa6 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 cb89879481bcd..1b83389b29f71 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 7f82878e080ce..5226f7e0f615e 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 766105881cedf..7a285d90b9d6a 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 15982f309c6bb..a459badfa8a3c 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 c1ec837a4b818..583e6be331655 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 eee3cf55052a3..36007c1093297 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 75db47af2463f..3c3a85a34c7cf 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 d4cbd255e34c2..e7ee9e2ccf818 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 3ceb3946f3c0d..3759082db2caa 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 9e5fe4ab8a986..f1f18115825ca 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 0000000000000..783d826a53dab --- /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 193666f826932..2f93b2d1ead01 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/weird-output-filenames/Makefile b/src/test/run-make/weird-output-filenames/Makefile index 2172ed888b142..8b69c68279dca 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 cd79a95dace7a..1541e809b6178 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 6306627df0f8d..e032270e0884d 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 91b24b3b2abac..8367fc110e137 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 948192f4fc075..b2be87be4cb35 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 b1d6f96f0f6d4..3b6614c18faa8 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 c794e45c84522..a108f4dc56874 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/issue-10028.rs b/src/test/run-pass/issue-10028.rs index fdaa71d1cfb4c..53d6f67f119ee 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 f226e25eaa461..14017ee178924 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 e960558e52c8c..a74fdbe3de472 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 56144edb5c744..c6fc5e8b484e0 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 1fc72fd2cbef6..21ed30683f50f 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 535fc3669911a..e5d95874be61f 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 7e5b0c2230141..d47bb818c4946 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 76bae09bd4942..580c487af0de9 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 514cfeab6af1a..79a530785452a 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 8ed8426b8f5da..4c46831418707 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 66cf37eb61fc5..e9fb7945d0400 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-14421.rs b/src/test/run-pass/issue-14421.rs index e6425f7cb7a02..046d888030f0c 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 d3f1858c36324..178a219f5bfc0 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 6556dba653435..f1ef57e44b1d5 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 a0d9eeb9e0bfd..a6b33ca0f13f5 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: 3u }.process_token(); diff --git a/src/test/run-pass/issue-17662.rs b/src/test/run-pass/issue-17662.rs index ce1c077b23c57..ca564ecda28ee 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 2827ab9293642..c4443e2ddf0d5 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 de6a5be83de38..fb8158c6ddc60 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 f284ac90b4e6b..b0b2f068bb74b 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 81c717f817487..277ad3260c514 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 f72e7fbe30a35..16e6c99f0e31d 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 ba2aaee02894d..e553c244c8653 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 a9d04167a41db..45b5f9ca70400 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 e24b69bb0de1f..5981a0148a0af 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 c9196fc66b032..4ad729f1bc60a 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 3180927f74d88..0882203cb1ea5 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 a830de42862df..a17565fa0ac5b 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 284b0ff034815..b39ae5fee9967 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 34e5ee5621b15..e7f09789c5ba0 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 2730f567aa3ba..84f848fc9cdb2 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 5761c8d943848..c8af811d13d8d 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 6f5ded6c475b6..728f91ff45d83 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 3c238d3fe78c6..1a0140882d4d1 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/logging-enabled.rs b/src/test/run-pass/logging-enabled.rs index 24ef02956266b..294d4d1217952 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/priv-impl-prim-ty.rs b/src/test/run-pass/priv-impl-prim-ty.rs index 17fb5aad6d097..aa2db260dd4ae 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 2c92965ee7a67..1243d72af5efb 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 0f7fb31fbae1b..bc379f1a76f7f 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 fc85fc223a467..9659d9943f8c0 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() -> uint; diff --git a/src/test/run-pass/static-function-pointer-xc.rs b/src/test/run-pass/static-function-pointer-xc.rs index f4d6e89d170a7..a0a37e4a9fb8d 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: int) -> int { x } diff --git a/src/test/run-pass/typeid-intrinsic.rs b/src/test/run-pass/typeid-intrinsic.rs index 9dfd25b4fc4e1..14d601fbc9467 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 31a901756717e..0c255c6bd6cb8 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/weak-lang-item.rs b/src/test/run-pass/weak-lang-item.rs index ec346a248a99f..5a567758bf45f 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-trait-lifetime-param.rs b/src/test/run-pass/xcrate-trait-lifetime-param.rs index 016ebc777f1da..62d62839ba31b 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]