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;
16
16
#[ derive( Copy , Clone ) ]
17
17
pub struct Foo ( i64 ) ;
18
18
19
- pub fn test_cttz ( v : Foo ) -> Foo {
19
+ pub fn test_cttz ( v : Foo ) -> u32 {
20
20
intrinsics:: cttz ( v)
21
21
//~^ ERROR `cttz` intrinsic: expected basic integer type, found `Foo`
22
22
}
Original file line number Diff line number Diff line change 6
6
mod rusti {
7
7
extern "rust-intrinsic" {
8
8
#[ rustc_safe_intrinsic]
9
- pub fn ctpop < T > ( x : T ) -> T ;
9
+ pub fn ctpop < T > ( x : T ) -> u32 ;
10
10
#[ 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 ;
13
13
#[ 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 ;
16
16
#[ rustc_safe_intrinsic]
17
17
pub fn bswap < T > ( x : T ) -> T ;
18
18
#[ rustc_safe_intrinsic]
You can’t perform that action at this time.
0 commit comments