5 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1
1
// run-fail
2
2
// check-run-results
3
- // normalize-stderr-test "panicking\.rs:\d+:\d+:" -> "panicking.rs:"
3
+ // exec-env:RUST_BACKTRACE=0
4
+ // normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
4
5
#![ feature( extern_types) ]
5
6
6
7
extern "C" {
Original file line number Diff line number Diff line change 1
- thread 'main' panicked at library/core/src/panicking.rs:
1
+ thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
2
2
attempted to compute the size or alignment of extern type `Opaque`
3
3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4
4
thread caused non-unwinding panic. aborting.
Original file line number Diff line number Diff line change 1
- thread 'main' panicked at library/core/src/panicking.rs:
1
+ thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
2
2
attempted to compute the size or alignment of extern type `A`
3
3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4
4
thread caused non-unwinding panic. aborting.
Original file line number Diff line number Diff line change 1
1
// run-fail
2
2
// check-run-results
3
- // normalize-stderr-test "panicking\.rs:\d+:\d+:" -> "panicking.rs:"
3
+ // exec-env:RUST_BACKTRACE=0
4
+ // normalize-stderr-test: "(core/src/panicking\.rs):[0-9]+:[0-9]+" -> "$1:$$LINE:$$COL"
5
+ // revisions: size align
4
6
#![ feature( extern_types) ]
5
7
6
8
use std:: mem:: { align_of_val, size_of_val} ;
@@ -13,6 +15,9 @@ fn main() {
13
15
let x: & A = unsafe { & * ( 1usize as * const A ) } ;
14
16
15
17
// These don't have a dynamic size, so this should panic.
16
- assert_eq ! ( size_of_val( x) , 0 ) ;
17
- assert_eq ! ( align_of_val( x) , 1 ) ;
18
+ if cfg ! ( size) {
19
+ assert_eq ! ( size_of_val( x) , 0 ) ;
20
+ } else {
21
+ assert_eq ! ( align_of_val( x) , 1 ) ;
22
+ }
18
23
}
Original file line number Diff line number Diff line change
1
+ thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
2
+ attempted to compute the size or alignment of extern type `A`
3
+ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4
+ thread caused non-unwinding panic. aborting.
0 commit comments