diff options
| author | bors <bors@rust-lang.org> | 2014-10-02 23:42:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-02 23:42:31 +0000 |
| commit | d0af3feebb57bc58c52de69ab51f92dc7082500b (patch) | |
| tree | d39de6be5866c0f0f37f9f3219b8217c873d8b52 /src/libnum | |
| parent | b2d4eb186e99b66051be9089f836c66a558dd995 (diff) | |
| parent | d2ea0315e09cbd495a67c9e3d5053b57e2b5a8b7 (diff) | |
| download | rust-d0af3feebb57bc58c52de69ab51f92dc7082500b.tar.gz rust-d0af3feebb57bc58c52de69ab51f92dc7082500b.zip | |
auto merge of #17715 : aturon/rust/revert-slice-ops-libs, r=alexcrichton
This PR reverts https://github.com/rust-lang/rust/pull/17620, which caused a significant regression for slices. As discussed with @alexcrichton, all of the public-facing changes of the earlier PR need to be rolled back, and it's not clear that we should move the libraries over to this new notation yet anyway (especially given its feature-gated status). Closes #17710
Diffstat (limited to 'src/libnum')
| -rw-r--r-- | src/libnum/bigint.rs | 4 | ||||
| -rw-r--r-- | src/libnum/lib.rs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/libnum/bigint.rs b/src/libnum/bigint.rs index c5722419f3e..efa3402073f 100644 --- a/src/libnum/bigint.rs +++ b/src/libnum/bigint.rs @@ -735,7 +735,7 @@ impl BigUint { let mut power: BigUint = One::one(); loop { let start = cmp::max(end, unit_len) - unit_len; - match uint::parse_bytes(buf[start..end], radix) { + match uint::parse_bytes(buf.slice(start, end), radix) { Some(d) => { let d: Option<BigUint> = FromPrimitive::from_uint(d); match d { @@ -1406,7 +1406,7 @@ impl BigInt { sign = Minus; start = 1; } - return BigUint::parse_bytes(buf[start..], radix) + return BigUint::parse_bytes(buf.slice(start, buf.len()), radix) .map(|bu| BigInt::from_biguint(sign, bu)); } diff --git a/src/libnum/lib.rs b/src/libnum/lib.rs index fa41cf37112..17071d22dee 100644 --- a/src/libnum/lib.rs +++ b/src/libnum/lib.rs @@ -43,8 +43,7 @@ //! //! [newt]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method -#![allow(unknown_features)] -#![feature(macro_rules, slicing_syntax)] +#![feature(macro_rules)] #![feature(default_type_params)] #![crate_name = "num"] |
