Skip to content

Commit 3b038a5

Browse files
committed
Remove #![feature(alloc)]
1 parent 18ce640 commit 3b038a5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ sudo: false
3737
# Tests run on rand:
3838
# - test no_std support, but only the unit tests:
3939
# `cargo test --tests --no-default-features`
40+
# - test no_std support, including the alloc feature:
41+
# cargo test --tests --no-default-features --features=alloc
4042
# - run unit tests and doctests with all features which are available on stable:
4143
# `cargo test --features=serde1,log`
4244
# - test examples:
4345
# `cargo test --examples`
4446
# Additional tests on nightly:
4547
# - run unit tests and doctests with all features which are available on nightly:
4648
# `cargo test --all-features`
47-
# - test no_std support, including the nightly alloc feature:
48-
# cargo test --tests --no-default-features --features=alloc
4949
# - run benchmarks as tests:
5050
# `cargo test --benches --features=nightly`
5151
# Tests on subcrates:
@@ -137,7 +137,7 @@ matrix:
137137
before_script:
138138
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
139139
script:
140-
# Differs from standard script: alloc feature, all features, doc build
140+
# Differs from standard script: all features, doc build
141141
- cargo test --tests --no-default-features --features=alloc
142142
- cargo test --all-features
143143
- cargo test --benches --features=nightly
@@ -167,7 +167,7 @@ matrix:
167167
- cargo --list | egrep "^\s*deadlinks$" -q || cargo install cargo-deadlinks
168168
- cargo deadlinks -V
169169
script:
170-
# Differs from standard script: alloc feature, all features, doc build
170+
# Differs from standard script: all features, doc build
171171
- cargo test --tests --no-default-features --features=alloc
172172
- cargo test --all-features
173173
- cargo test --benches --features=nightly
@@ -276,11 +276,13 @@ before_install:
276276
script:
277277
- cargo test --tests --no-default-features
278278
- cargo test --tests --no-default-features --features getrandom
279+
- cargo test --tests --no-default-features --features=alloc
279280
# TODO: add simd_support feature:
280281
- cargo test --features=serde1,log
281282
- cargo test --examples
282283
- cargo test --manifest-path rand_core/Cargo.toml
283284
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
285+
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc
284286
- cargo test --manifest-path rand_distr/Cargo.toml
285287
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
286288
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1

rand_core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#![allow(clippy::unreadable_literal)]
3939

4040
#![cfg_attr(not(feature="std"), no_std)]
41-
#![cfg_attr(all(feature="alloc", not(feature="std")), feature(alloc))]
4241

4342

4443
use core::default::Default;

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
5151

5252
#![cfg_attr(not(feature="std"), no_std)]
53-
#![cfg_attr(all(feature="alloc", not(feature="std")), feature(alloc))]
5453
#![cfg_attr(all(feature="simd_support", feature="nightly"), feature(stdsimd))]
5554

5655
#![allow(clippy::excessive_precision, clippy::unreadable_literal, clippy::float_cmp)]
@@ -438,7 +437,7 @@ macro_rules! impl_as_byte_slice {
438437
}
439438
}
440439
}
441-
440+
442441
impl AsByteSliceMut for [Wrapping<$t>] {
443442
fn as_byte_slice_mut(&mut self) -> &mut [u8] {
444443
if self.len() == 0 {
@@ -602,7 +601,7 @@ mod test {
602601
rng.fill(&mut array[..]);
603602
assert_eq!(array, [x as u32, (x >> 32) as u32]);
604603
assert_eq!(rng.next_u32(), x as u32);
605-
604+
606605
// Check equivalence using wrapped arrays
607606
let mut warray = [Wrapping(0u32); 2];
608607
rng.fill(&mut warray[..]);

0 commit comments

Comments
 (0)