Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE when reifying intrinsic #52584

Closed
bjorn3 opened this issue Jul 21, 2018 · 2 comments
Closed

ICE when reifying intrinsic #52584

bjorn3 opened this issue Jul 21, 2018 · 2 comments

Comments

@bjorn3
Copy link
Member

bjorn3 commented Jul 21, 2018

It would be nice to just give a regular error.

#![feature(intrinsics)]

use std::intrinsics::copy;

fn main() {
    unsafe {
        let copy2: unsafe extern "rust-intrinsic" fn(*const u8, *mut u8, usize) = copy::<u8>;
        copy2(0 as *const u8, 0 as *mut u8, 0);
    }
}

(Playground)

Errors:

   Compiling playground v0.0.1 (file:///playground)
error: internal compiler error: librustc_mir/monomorphize/collector.rs:705: intrinsic DefId(2/1:301 ~ core[7fff]::intrinsics[0]::[1]::copy[0]) being reified

thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:557:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to previous error


note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.29.0-nightly (12ed235ad 2018-07-18) running on x86_64-unknown-linux-gnu

note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `playground`.

To learn more, run the command again with --verbose.

@wesleywiser
Copy link
Member

I think this is a dup of #34123

@bjorn3
Copy link
Member Author

bjorn3 commented Jul 21, 2018

Yes

@bjorn3 bjorn3 closed this as completed Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants