comparison between borrowed pointers hits ICE #3091

Closed
nikomatsakis opened this Issue Aug 2, 2012 · 4 comments

Projects

None yet

3 participants

@nikomatsakis
fn main() {
    let x = 1;
    let y = 1;
    assert &x == &y;
}

yields "error: internal compiler error: non-scalar type passed to compare_scalar_types"

I imagine this should work the same as @1 == @1

@catamorphism

I'll see if this is fixable easily.

@catamorphism catamorphism was assigned Aug 2, 2012
@jruderman

Are you trying to compare the addresses or the ints?

@nikomatsakis

the ints, although it's a good question. but that's how we behave with @T and ~T

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment