Skip to content

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

Closed
@Amanieu

Description

@Amanieu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions