File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use std::intrinsics;
1616#[ derive( Copy , Clone ) ]
1717pub struct Foo ( i64 ) ;
1818
19- pub fn test_cttz ( v : Foo ) -> Foo {
19+ pub fn test_cttz ( v : Foo ) -> u32 {
2020 intrinsics:: cttz ( v)
2121 //~^ ERROR `cttz` intrinsic: expected basic integer type, found `Foo`
2222}
Original file line number Diff line number Diff line change 66mod rusti {
77 extern "rust-intrinsic" {
88 #[ rustc_safe_intrinsic]
9- pub fn ctpop < T > ( x : T ) -> T ;
9+ pub fn ctpop < T > ( x : T ) -> u32 ;
1010 #[ rustc_safe_intrinsic]
11- pub fn ctlz < T > ( x : T ) -> T ;
12- pub fn ctlz_nonzero < T > ( x : T ) -> T ;
11+ pub fn ctlz < T > ( x : T ) -> u32 ;
12+ pub fn ctlz_nonzero < T > ( x : T ) -> u32 ;
1313 #[ rustc_safe_intrinsic]
14- pub fn cttz < T > ( x : T ) -> T ;
15- pub fn cttz_nonzero < T > ( x : T ) -> T ;
14+ pub fn cttz < T > ( x : T ) -> u32 ;
15+ pub fn cttz_nonzero < T > ( x : T ) -> u32 ;
1616 #[ rustc_safe_intrinsic]
1717 pub fn bswap < T > ( x : T ) -> T ;
1818 #[ rustc_safe_intrinsic]
You can’t perform that action at this time.
0 commit comments