Skip to content

Commit f60a7c2

Browse files
committed
UGLY hack around an ICE bc of stage0
Current stage0 with version "1.14.0-beta.1 (d4aea2d 2016-11-15)" suffers from issue 37686. You can confirm this on master by running ./x.py test --stage 0 src/test/run-pass --test-args 37686 Add this workaround until there is a fix. No idea how it works, but it does work.
1 parent e64e93e commit f60a7c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/librustc_const_math/int.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ macro_rules! bounds {
5252
}
5353
}
5454

55+
// SNAP: remove this hack to work once stage0 ships with a fix
56+
// The code below is a workaround for an ICE (issue #37686).
57+
// It does its job without being used by any other code.
58+
// It was reasonably minified. Removing it will make the ICE surface.
59+
#[cfg(stage0)]
60+
#[allow(dead_code)]
61+
const PREVENT_ICE: (i8, i16, i32) = (::std::i8::MIN, ::std::i16::MIN, ::std::i32::MIN);
62+
5563
mod ubounds {
5664
#![allow(dead_code)]
5765
use rustc_i128::{u128, i128};

0 commit comments

Comments
 (0)