File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
//@ignore-32bit
2
2
3
3
fn main ( ) {
4
- let _fat: [ u8 ; ( 1 << 61 ) + ( 1 << 31 ) ] ; //~ ERROR: post-monomorphization error
5
- _fat = [ 0 ; ( 1u64 << 61 ) as usize + ( 1u64 << 31 ) as usize ] ;
4
+ let _fat: [ u8 ; ( 1 << 61 ) + ( 1 << 31 ) ] ; // ideally we'd error here, but we avoid computing the layout until absolutely necessary
5
+ _fat = [ 0 ; ( 1u64 << 61 ) as usize + ( 1u64 << 31 ) as usize ] ; //~ ERROR: post-monomorphization error
6
6
}
Original file line number Diff line number Diff line change 1
1
error: post-monomorphization error: values of the type `[u8; 2305843011361177600]` are too big for the current architecture
2
2
--> $DIR/type-too-large.rs:LL:CC
3
3
|
4
- LL | let _fat: [u8 ; (1 << 61) + (1 << 31)];
5
- | ^^^^ values of the type `[u8; 2305843011361177600]` are too big for the current architecture
4
+ LL | _fat = [0 ; (1u64 << 61) as usize + (1u64 << 31) as usize ];
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ values of the type `[u8; 2305843011361177600]` are too big for the current architecture
6
6
|
7
7
= note: inside `main` at $DIR/type-too-large.rs:LL:CC
8
8
You can’t perform that action at this time.
0 commit comments