comparison between borrowed pointers hits ICE #3091

nikomatsakis opened this Issue Aug 2, 2012 · 4 comments


None yet

3 participants

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


I'll see if this is fixable easily.

@catamorphism catamorphism was assigned Aug 2, 2012

Are you trying to compare the addresses or the ints?


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


Fixed in 948172b

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