File tree Expand file tree Collapse file tree
tests/ui/layout/align-type Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // test that invalid alignments put into Align fail
2- //~? ERROR unknown layout
1+ // test that invalid alignments put into Align fail\
32#![ feature( align_type) ]
43
54use std:: mem:: Align ;
@@ -8,10 +7,12 @@ const MAX_SUPPORTED_ALIGN: usize = 1 << 29;
87
98const _: ( ) = {
109 // not power of two
11- align_of :: < Align < 3 > > ( ) ;
10+ align_of :: < Align < 3 > > ( ) ; //~? ERROR unknown layout
11+ } ;
1212
13+ const _: ( ) = {
1314 // too big
14- align_of :: < Align < { MAX_SUPPORTED_ALIGN * 2 } > > ( ) ;
15+ align_of :: < Align < { MAX_SUPPORTED_ALIGN * 2 } > > ( ) ; //~? ERROR unknown layout
1516} ;
1617
1718fn main ( ) { }
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ error[E0080]: the type `Align<3>` has an unknown layout
33 |
44 = note: evaluation of `<std::mem::Align<3> as std::mem::SizedTypeProperties>::ALIGN` failed here
55
6- error: aborting due to 1 previous error
6+ error[E0080]: the type `Align<1073741824>` has an unknown layout
7+ --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
8+ |
9+ = note: evaluation of `<std::mem::Align<1073741824> as std::mem::SizedTypeProperties>::ALIGN` failed here
10+
11+ error: aborting due to 2 previous errors
712
813For more information about this error, try `rustc --explain E0080`.
You can’t perform that action at this time.
0 commit comments