-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37bf8f8
commit b1b8649
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#![feature(intrinsics)] | ||
#![feature(rustc_attrs)] | ||
|
||
extern "rust-intrinsic" { | ||
fn size_of<T>() -> usize; //~ ERROR intrinsic safety mismatch | ||
|
||
#[rustc_safe_intrinsic] | ||
fn assume(b: bool); //~ ERROR intrinsic safety mismatch | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `size_of` | ||
--> $DIR/safe-intrinsic-mismatch.rs:5:5 | ||
| | ||
LL | fn size_of<T>() -> usize; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `assume` | ||
--> $DIR/safe-intrinsic-mismatch.rs:8:5 | ||
| | ||
LL | fn assume(b: bool); | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|