Make the tests green as they should on 32-bit architectures
On 32-bit architectures, the size calculations on two of the tests wrap-around in typeck, which gives the relevant arrays a size of 0, which is (correctly) successfully allocated.
This commit is contained in:
parent
50db061173
commit
3ce5a9539f
@ -11,5 +11,5 @@
|
||||
// error-pattern: too big for the current
|
||||
|
||||
fn main() {
|
||||
let fat : [u8, ..1<<61] = [0, ..1<<61];
|
||||
let fat : [u8, ..(1<<61)+(1<<31)] = [0, ..(1<<61)+(1<<31)];
|
||||
}
|
||||
|
@ -10,8 +10,16 @@
|
||||
|
||||
// error-pattern: too big for the current architecture
|
||||
|
||||
#[cfg(target_word_size = "64")]
|
||||
fn main() {
|
||||
let n = 0u;
|
||||
let a = box [&n,..0xF000000000000000u];
|
||||
println!("{}", a[0xFFFFFFu]);
|
||||
}
|
||||
|
||||
#[cfg(target_word_size = "32")]
|
||||
fn main() {
|
||||
let n = 0u;
|
||||
let a = box [&n,..0xFFFFFFFFu];
|
||||
println!("{}", a[0xFFFFFFu]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user