Skip to content

Commit 4d166cb

Browse files
bors[bot]cuviper
andauthored
Merge #35
35: Trust the "i128" feature, and release 0.1.44 r=cuviper a=cuviper If the "i128" feature is explicity requested, don't bother probing for it. It will still cause a build error if that was set improperly. Co-authored-by: Josh Stone <[email protected]>
2 parents cc05da6 + 1714566 commit 4d166cb

File tree

4 files changed

+31
-8
lines changed

4 files changed

+31
-8
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ documentation = "https://docs.rs/num-integer"
55
homepage = "https://github.com/rust-num/num-integer"
66
keywords = ["mathematics", "numerics"]
77
categories = ["algorithms", "science", "no-std"]
8-
license = "MIT/Apache-2.0"
8+
license = "MIT OR Apache-2.0"
99
repository = "https://github.com/rust-num/num-integer"
1010
name = "num-integer"
11-
version = "0.1.43"
11+
version = "0.1.44"
1212
readme = "README.md"
1313
build = "build.rs"
1414
exclude = ["/bors.toml", "/ci/*", "/.github/*"]

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,25 @@ Implementations for `i128` and `u128` are only available with Rust 1.26 and
4040
later. The build script automatically detects this, but you can make it
4141
mandatory by enabling the `i128` crate feature.
4242

43-
4443
## Releases
4544

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

4847
## Compatibility
4948

5049
The `num-integer` crate is tested for rustc 1.8 and greater.
50+
51+
## License
52+
53+
Licensed under either of
54+
55+
* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
56+
* [MIT license](http://opensource.org/licenses/MIT)
57+
58+
at your option.
59+
60+
### Contribution
61+
62+
Unless you explicitly state otherwise, any contribution intentionally submitted
63+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
64+
dual licensed as above, without any additional terms or conditions.

RELEASES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Release 0.1.44 (2020-10-29)
2+
3+
- [The "i128" feature now bypasses compiler probing][35]. The build script
4+
used to probe anyway and panic if requested support wasn't found, but
5+
sometimes this ran into bad corner cases with `autocfg`.
6+
7+
**Contributors**: @cuviper
8+
9+
[35]: https://github.com/rust-num/num-integer/pull/35
10+
111
# Release 0.1.43 (2020-06-11)
212

313
- [The new `Average` trait][31] computes fast integer averages, rounded up or

build.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ extern crate autocfg;
33
use std::env;
44

55
fn main() {
6-
let ac = autocfg::new();
7-
if ac.probe_type("i128") {
8-
println!("cargo:rustc-cfg=has_i128");
9-
} else if env::var_os("CARGO_FEATURE_I128").is_some() {
10-
panic!("i128 support was not detected!");
6+
// If the "i128" feature is explicity requested, don't bother probing for it.
7+
// It will still cause a build error if that was set improperly.
8+
if env::var_os("CARGO_FEATURE_I128").is_some() || autocfg::new().probe_type("i128") {
9+
autocfg::emit("has_i128");
1110
}
1211

1312
autocfg::rerun_path("build.rs");

0 commit comments

Comments
 (0)