Skip to content

internal compiler error: Got a fat pointer where a scalar was expected #614

New issue

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

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

Already on GitHub? # to your account

Closed
Amanieu opened this issue Feb 6, 2019 · 1 comment
Closed

Comments

@Amanieu
Copy link
Member

Amanieu commented Feb 6, 2019

The following code causes an internal error in miri:

use std::rc::Rc;
use std::fmt::Debug;

fn main() {
    let p = Rc::new(1) as Rc<Debug>;
    let a: *const Debug = &*p;
    let r = Rc::into_raw(p);
    a == r;
}
error: internal compiler error: src/librustc_mir/interpret/operand.rs:73: Got a fat pointer where a scalar was expected
@RalfJung
Copy link
Member

This will be fixed by #623

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants