diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 9bb5ec808194c..9aab6c93c8210 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -110,6 +110,9 @@ pub use core::slice::{Iter, IterMut}; pub use core::slice::{SplitMut, ChunksMut, Split}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut}; +#[unstable(feature = "slice_bytes", issue = "27740")] +#[allow(deprecated)] +pub use core::slice::bytes; #[stable(feature = "rust1", since = "1.0.0")] pub use core::slice::{from_raw_parts, from_raw_parts_mut}; diff --git a/src/libcollectionstest/slice.rs b/src/libcollectionstest/slice.rs index f86c016921ecc..80dcd48fbfaa9 100644 --- a/src/libcollectionstest/slice.rs +++ b/src/libcollectionstest/slice.rs @@ -866,6 +866,17 @@ fn test_vec_default() { t!(Vec); } +#[test] +fn test_bytes_set_memory() { + use std::slice::bytes::MutableByteVector; + + let mut values = [1,2,3,4,5]; + values[0..5].set_memory(0xAB); + assert!(values == [0xAB, 0xAB, 0xAB, 0xAB, 0xAB]); + values[2..4].set_memory(0xFF); + assert!(values == [0xAB, 0xAB, 0xFF, 0xFF, 0xAB]); +} + #[test] #[should_panic] fn test_overflow_does_not_cause_segfault() { diff --git a/src/libcoretest/num/mod.rs b/src/libcoretest/num/mod.rs index 09f2e3265034b..fba56db32bb4c 100644 --- a/src/libcoretest/num/mod.rs +++ b/src/libcoretest/num/mod.rs @@ -54,6 +54,14 @@ mod tests { use core::option::Option::{Some, None}; use core::num::Float; + #[test] + fn from_str_issue7588() { + let u : Option = u8::from_str_radix("1000", 10).ok(); + assert_eq!(u, None); + let s : Option = i16::from_str_radix("80000", 10).ok(); + assert_eq!(s, None); + } + #[test] fn test_int_from_str_overflow() { let mut i8_val: i8 = 127; diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 25a05efd02666..715749f50d4e4 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -923,10 +923,10 @@ pub fn hard_link, Q: AsRef>(src: P, dst: Q) -> io::Result<( /// # Ok(()) /// # } /// ``` +#[stable(feature = "rust1", since = "1.0.0")] #[rustc_deprecated(since = "1.1.0", reason = "replaced with std::os::unix::fs::symlink and \ std::os::windows::fs::{symlink_file, symlink_dir}")] -#[stable(feature = "rust1", since = "1.0.0")] pub fn soft_link, Q: AsRef>(src: P, dst: Q) -> io::Result<()> { fs_imp::symlink(src.as_ref(), dst.as_ref()) } diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 3b613922bc947..22315454f8907 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -601,13 +601,6 @@ impl<'a> ExtCtxt<'a> { } } - #[unstable(feature = "rustc_private", issue = "0")] - #[rustc_deprecated(since = "1.0.0", - reason = "Replaced with `expander().fold_expr()`")] - pub fn expand_expr(&mut self, e: P) -> P { - self.expander().fold_expr(e) - } - /// Returns a `Folder` for deeply expanding all macros in an AST node. pub fn expander<'b>(&'b mut self) -> expand::MacroExpander<'b, 'a> { expand::MacroExpander::new(self) diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index ee183d7f3e96a..8b07b21c578c9 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -127,13 +127,6 @@ impl SmallVector { } } - /// Deprecated: use `into_iter`. - #[unstable(feature = "rustc_private", issue = "0")] - #[rustc_deprecated(since = "1.0.0", reason = "use into_iter")] - pub fn move_iter(self) -> IntoIter { - self.into_iter() - } - pub fn len(&self) -> usize { match self.repr { Zero => 0, diff --git a/src/test/run-pass/issue-24956.rs b/src/test/run-pass/issue-24956.rs deleted file mode 100644 index 501b713d520cd..0000000000000 --- a/src/test/run-pass/issue-24956.rs +++ /dev/null @@ -1,20 +0,0 @@ -// 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. -// -// 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. - -struct Foo(bool); -const NEW_FALSE: bool = false; -const STATIC_FOO: Foo = Foo(NEW_FALSE); - -pub fn main() { - match (Foo(false)) { - STATIC_FOO => 3, - _ => 11 - }; -}