Skip to content

Commit

Permalink
Auto merge of #30351 - tamird:remove-range-inclusive, r=alexcrichton
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Dec 13, 2015
2 parents 2841cc0 + d477708 commit 110df04
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 35 deletions.
3 changes: 3 additions & 0 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
11 changes: 11 additions & 0 deletions src/libcollectionstest/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,17 @@ fn test_vec_default() {
t!(Vec<i32>);
}

#[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() {
Expand Down
8 changes: 8 additions & 0 deletions src/libcoretest/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> = u8::from_str_radix("1000", 10).ok();
assert_eq!(u, None);
let s : Option<i16> = i16::from_str_radix("80000", 10).ok();
assert_eq!(s, None);
}

#[test]
fn test_int_from_str_overflow() {
let mut i8_val: i8 = 127;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,10 +923,10 @@ pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(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<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()> {
fs_imp::symlink(src.as_ref(), dst.as_ref())
}
Expand Down
7 changes: 0 additions & 7 deletions src/libsyntax/ext/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ast::Expr>) -> P<ast::Expr> {
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)
Expand Down
7 changes: 0 additions & 7 deletions src/libsyntax/util/small_vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,6 @@ impl<T> SmallVector<T> {
}
}

/// 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<T> {
self.into_iter()
}

pub fn len(&self) -> usize {
match self.repr {
Zero => 0,
Expand Down
20 changes: 0 additions & 20 deletions src/test/run-pass/issue-24956.rs

This file was deleted.

0 comments on commit 110df04

Please sign in to comment.