typenum: fix FTBFS on i386
Ximin Luo
4 years ago
|
0 |
rust-typenum (1.10.0-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
|
|
1 |
|
|
2 |
* Team upload.
|
|
3 |
* Package typenum 1.10.0 from crates.io using debcargo 2.2.10
|
|
4 |
* Add patch that fixes FTBFS on i386.
|
|
5 |
|
|
6 |
-- Ximin Luo <infinity0@debian.org> Sat, 18 May 2019 19:11:45 -0700
|
|
7 |
|
0 | 8 |
rust-typenum (1.10.0-1) unstable; urgency=medium
|
1 | 9 |
|
2 | 10 |
* Package typenum 1.10.0 from crates.io using debcargo 2.2.1
|
24 | 24 |
|
25 | 25 |
Files: debian/*
|
26 | 26 |
Copyright:
|
27 | |
2018 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
|
28 | |
2018 FIXME (overlay) Your Name <Your Email>
|
|
27 |
2018-2019 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
|
|
28 |
2018-2019 kpcyrd <git@rxv.cc>
|
29 | 29 |
License: MIT or Apache-2.0
|
30 | 30 |
|
31 | 31 |
License: Apache-2.0
|
0 | 0 |
overlay = "."
|
|
1 |
uploaders = ["kpcyrd <git@rxv.cc>"]
|
|
0 |
From 0d5196feadafa77c727f517d747ffcf3fd0e8ba9 Mon Sep 17 00:00:00 2001
|
|
1 |
From: Michael Hudson-Doyle <michael.hudson@canonical.com>
|
|
2 |
Date: Wed, 13 Mar 2019 15:55:30 +1300
|
|
3 |
Subject: [PATCH] round result of (highest as f64).log(2.0)
|
|
4 |
|
|
5 |
Even though (1024f64).log(2.0) has an exact, representable, value, with rustc 1.32 on i386 it comes out as +9.999999999999999985 with optimization enabled. And the rustc doesn't like having two defintions for U1024 etc.
|
|
6 |
---
|
|
7 |
build/main.rs | 2 +-
|
|
8 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
9 |
|
|
10 |
diff --git a/build/main.rs b/build/main.rs
|
|
11 |
index 16b0ffe2f..b7939f993 100644
|
|
12 |
--- a/build/main.rs
|
|
13 |
+++ b/build/main.rs
|
|
14 |
@@ -81,7 +81,7 @@ pub fn no_std() {}
|
|
15 |
fn main() {
|
|
16 |
let highest: u64 = 1024;
|
|
17 |
|
|
18 |
- let first2: u32 = (highest as f64).log(2.0) as u32 + 1;
|
|
19 |
+ let first2: u32 = (highest as f64).log(2.0).round() as u32 + 1;
|
|
20 |
let first10: u32 = (highest as f64).log(10.0) as u32 + 1;
|
|
21 |
let uints = (0..(highest + 1))
|
|
22 |
.chain((first2..64).map(|i| 2u64.pow(i)))
|