forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
27 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,9 @@ | ||
// Test for https://github.com/rust-lang/rust/issues/34123 | ||
// ICE: intrinsic .. being reified | ||
|
||
#![feature(intrinsics)] | ||
|
||
fn main(){ | ||
let transmute = std::intrinsics::transmute; | ||
let assign: unsafe extern "rust-intrinsic" fn(*const i32) -> *mut i32 = transmute; | ||
} |
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,18 @@ | ||
error[E0308]: cannot coerce intrinsics to function pointers | ||
--> intrinsic_ice.rs:8:77 | ||
| | ||
L | let assign: unsafe extern "rust-intrinsic" fn(*const i32) -> *mut i32 = transmute; | ||
| --------------------------------------------------------- ^^^^^^^^^ cannot coerce intrinsics to function pointers | ||
| | | ||
| expected due to this | ||
| | ||
= note: expected fn pointer `unsafe extern "rust-intrinsic" fn(*const i32) -> *mut i32` | ||
found fn item `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}` | ||
help: use parentheses to call this function | ||
| | ||
L | let assign: unsafe extern "rust-intrinsic" fn(*const i32) -> *mut i32 = transmute(...); | ||
| ^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |