Skip to content

Commit 4d86cd1

Browse files
committed
Assume i128 support
1 parent 43c534d commit 4d86cd1

File tree

9 files changed

+6
-29
lines changed

9 files changed

+6
-29
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- uses: dtolnay/rust-toolchain@stable
3131
with:
3232
target: thumbv6m-none-eabi
33-
- run: cargo build --target thumbv6m-none-eabi --no-default-features --features i128
33+
- run: cargo build --target thumbv6m-none-eabi --no-default-features
3434

3535
fmt:
3636
name: Format

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ repository = "https://github.com/rust-num/num-integer"
1010
name = "num-integer"
1111
version = "0.1.45"
1212
readme = "README.md"
13-
build = "build.rs"
1413
exclude = ["/bors.toml", "/ci/*", "/.github/*"]
1514
edition = "2018"
1615
rust-version = "1.31"
@@ -21,11 +20,11 @@ features = ["std"]
2120
[dependencies.num-traits]
2221
version = "0.2.11"
2322
default-features = false
23+
features = ["i128"]
2424

2525
[features]
2626
default = ["std"]
27-
i128 = ["num-traits/i128"]
2827
std = ["num-traits/std"]
2928

30-
[build-dependencies]
31-
autocfg = "1"
29+
# vestigial features, now always in effect
30+
i128 = []

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ default-features = false
3636
There is no functional difference with and without `std` at this time, but
3737
there may be in the future.
3838

39-
Implementations for `i128` and `u128` are only available with Rust 1.26 and
40-
later. The build script automatically detects this, but you can make it
41-
mandatory by enabling the `i128` crate feature.
42-
4339
## Releases
4440

4541
Release notes are available in [RELEASES.md](RELEASES.md).

build.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

ci/test_full.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ if ! check_version $MSRV ; then
2828
fi
2929

3030
FEATURES=()
31-
check_version 1.26 && FEATURES+=(i128)
3231
echo "Testing supported features: ${FEATURES[*]}"
3332

3433
set -x

src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,8 @@ impl_integer_for_isize!(i8, test_integer_i8);
826826
impl_integer_for_isize!(i16, test_integer_i16);
827827
impl_integer_for_isize!(i32, test_integer_i32);
828828
impl_integer_for_isize!(i64, test_integer_i64);
829-
impl_integer_for_isize!(isize, test_integer_isize);
830-
#[cfg(has_i128)]
831829
impl_integer_for_isize!(i128, test_integer_i128);
830+
impl_integer_for_isize!(isize, test_integer_isize);
832831

833832
macro_rules! impl_integer_for_usize {
834833
($T:ty, $test_mod:ident) => {
@@ -1052,9 +1051,8 @@ impl_integer_for_usize!(u8, test_integer_u8);
10521051
impl_integer_for_usize!(u16, test_integer_u16);
10531052
impl_integer_for_usize!(u32, test_integer_u32);
10541053
impl_integer_for_usize!(u64, test_integer_u64);
1055-
impl_integer_for_usize!(usize, test_integer_usize);
1056-
#[cfg(has_i128)]
10571054
impl_integer_for_usize!(u128, test_integer_u128);
1055+
impl_integer_for_usize!(usize, test_integer_usize);
10581056

10591057
/// An iterator over binomial coefficients.
10601058
pub struct IterBinomial<T> {

src/roots.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ signed_roots!(i8, u8);
165165
signed_roots!(i16, u16);
166166
signed_roots!(i32, u32);
167167
signed_roots!(i64, u64);
168-
#[cfg(has_i128)]
169168
signed_roots!(i128, u128);
170169
signed_roots!(isize, usize);
171170

@@ -385,6 +384,5 @@ unsigned_roots!(u8);
385384
unsigned_roots!(u16);
386385
unsigned_roots!(u32);
387386
unsigned_roots!(u64);
388-
#[cfg(has_i128)]
389387
unsigned_roots!(u128);
390388
unsigned_roots!(usize);

tests/average.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,5 @@ test_average!(i8, u8);
9292
test_average!(i16, u16);
9393
test_average!(i32, u32);
9494
test_average!(i64, u64);
95-
#[cfg(has_i128)]
9695
test_average!(i128, u128);
9796
test_average!(isize, usize);

tests/roots.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,5 @@ test_roots!(i8, u8);
264264
test_roots!(i16, u16);
265265
test_roots!(i32, u32);
266266
test_roots!(i64, u64);
267-
#[cfg(has_i128)]
268267
test_roots!(i128, u128);
269268
test_roots!(isize, usize);

0 commit comments

Comments
 (0)