Skip to content

Commit 110df04

Browse files
committed
Auto merge of #30351 - tamird:remove-range-inclusive, r=alexcrichton
r? @alexcrichton
2 parents 2841cc0 + d477708 commit 110df04

File tree

7 files changed

+23
-35
lines changed

7 files changed

+23
-35
lines changed

src/libcollections/slice.rs

+3
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ pub use core::slice::{Iter, IterMut};
110110
pub use core::slice::{SplitMut, ChunksMut, Split};
111111
#[stable(feature = "rust1", since = "1.0.0")]
112112
pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut};
113+
#[unstable(feature = "slice_bytes", issue = "27740")]
114+
#[allow(deprecated)]
115+
pub use core::slice::bytes;
113116
#[stable(feature = "rust1", since = "1.0.0")]
114117
pub use core::slice::{from_raw_parts, from_raw_parts_mut};
115118

src/libcollectionstest/slice.rs

+11
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,17 @@ fn test_vec_default() {
866866
t!(Vec<i32>);
867867
}
868868

869+
#[test]
870+
fn test_bytes_set_memory() {
871+
use std::slice::bytes::MutableByteVector;
872+
873+
let mut values = [1,2,3,4,5];
874+
values[0..5].set_memory(0xAB);
875+
assert!(values == [0xAB, 0xAB, 0xAB, 0xAB, 0xAB]);
876+
values[2..4].set_memory(0xFF);
877+
assert!(values == [0xAB, 0xAB, 0xFF, 0xFF, 0xAB]);
878+
}
879+
869880
#[test]
870881
#[should_panic]
871882
fn test_overflow_does_not_cause_segfault() {

src/libcoretest/num/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ mod tests {
5454
use core::option::Option::{Some, None};
5555
use core::num::Float;
5656

57+
#[test]
58+
fn from_str_issue7588() {
59+
let u : Option<u8> = u8::from_str_radix("1000", 10).ok();
60+
assert_eq!(u, None);
61+
let s : Option<i16> = i16::from_str_radix("80000", 10).ok();
62+
assert_eq!(s, None);
63+
}
64+
5765
#[test]
5866
fn test_int_from_str_overflow() {
5967
let mut i8_val: i8 = 127;

src/libstd/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -923,10 +923,10 @@ pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<(
923923
/// # Ok(())
924924
/// # }
925925
/// ```
926+
#[stable(feature = "rust1", since = "1.0.0")]
926927
#[rustc_deprecated(since = "1.1.0",
927928
reason = "replaced with std::os::unix::fs::symlink and \
928929
std::os::windows::fs::{symlink_file, symlink_dir}")]
929-
#[stable(feature = "rust1", since = "1.0.0")]
930930
pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()> {
931931
fs_imp::symlink(src.as_ref(), dst.as_ref())
932932
}

src/libsyntax/ext/base.rs

-7
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,6 @@ impl<'a> ExtCtxt<'a> {
601601
}
602602
}
603603

604-
#[unstable(feature = "rustc_private", issue = "0")]
605-
#[rustc_deprecated(since = "1.0.0",
606-
reason = "Replaced with `expander().fold_expr()`")]
607-
pub fn expand_expr(&mut self, e: P<ast::Expr>) -> P<ast::Expr> {
608-
self.expander().fold_expr(e)
609-
}
610-
611604
/// Returns a `Folder` for deeply expanding all macros in an AST node.
612605
pub fn expander<'b>(&'b mut self) -> expand::MacroExpander<'b, 'a> {
613606
expand::MacroExpander::new(self)

src/libsyntax/util/small_vector.rs

-7
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,6 @@ impl<T> SmallVector<T> {
127127
}
128128
}
129129

130-
/// Deprecated: use `into_iter`.
131-
#[unstable(feature = "rustc_private", issue = "0")]
132-
#[rustc_deprecated(since = "1.0.0", reason = "use into_iter")]
133-
pub fn move_iter(self) -> IntoIter<T> {
134-
self.into_iter()
135-
}
136-
137130
pub fn len(&self) -> usize {
138131
match self.repr {
139132
Zero => 0,

src/test/run-pass/issue-24956.rs

-20
This file was deleted.

0 commit comments

Comments
 (0)