File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/test/run-make-fulldeps/intrinsic-unreachable Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- #![ feature( llvm_asm) ]
21#![ crate_type="lib" ]
2+ use std:: arch:: asm;
33
44#[ deny( unreachable_code) ]
55pub fn exit ( n : usize ) -> i32 {
66 unsafe {
77 // Pretend this asm is an exit() syscall.
8- llvm_asm ! ( "" :: "r" ( n) :: "volatile" ) ;
9- // Can't actually reach this point, but rustc doesn't know that.
8+ asm ! ( "/*{0}*/" , in( reg) n) ;
109 }
1110 // This return value is just here to generate some extra code for a return
1211 // value, making it easier for the test script to detect whether the
Original file line number Diff line number Diff line change 1- #![ feature( llvm_asm , core_intrinsics) ]
1+ #![ feature( core_intrinsics) ]
22#![ crate_type="lib" ]
3+ use std:: arch:: asm;
34
45use std:: intrinsics;
56
67#[ allow( unreachable_code) ]
78pub fn exit ( n : usize ) -> i32 {
89 unsafe {
910 // Pretend this asm is an exit() syscall.
10- llvm_asm ! ( "" :: "r" ( n ) :: "volatile" ) ;
11+ asm ! ( "/*{0}*/" , in ( reg ) n ) ;
1112 intrinsics:: unreachable ( )
1213 }
1314 // This return value is just here to generate some extra code for a return
You can’t perform that action at this time.
0 commit comments