File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( intrinsics) ]
2
+ #![ feature( rustc_attrs) ]
3
+
4
+ extern "rust-intrinsic" {
5
+ fn size_of < T > ( ) -> usize ; //~ ERROR intrinsic safety mismatch
6
+
7
+ #[ rustc_safe_intrinsic]
8
+ fn assume ( b : bool ) ; //~ ERROR intrinsic safety mismatch
9
+ }
10
+
11
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of`
2
+ --> $DIR/safe-intrinsic-mismatch.rs:5:5
3
+ |
4
+ LL | fn size_of<T>() -> usize;
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
6
+
7
+ error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume`
8
+ --> $DIR/safe-intrinsic-mismatch.rs:8:5
9
+ |
10
+ LL | fn assume(b: bool);
11
+ | ^^^^^^^^^^^^^^^^^^
12
+
13
+ error: aborting due to 2 previous errors
14
+
You can’t perform that action at this time.
0 commit comments