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

"internal compiler error: no type for node 81" #11143

Closed
bonsairobo opened this issue Dec 26, 2013 · 0 comments · Fixed by #11449
Closed

"internal compiler error: no type for node 81" #11143

bonsairobo opened this issue Dec 26, 2013 · 0 comments · Fixed by #11449
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@bonsairobo
Copy link

OS: Ubuntu 12.04 x86

rustc -v Collision.rs:

rustc 0.9-pre (b8c87fd 2013-12-24 01:56:30 -0800)
host: i686-unknown-linux-gnu

Full error message:

Collision.rs:30:3: 30:14 error: binary operation + cannot be applied to type Vec2
Collision.rs:30 *v += *move;
^~~~~~~~~~~
error: internal compiler error: no type for node 81: expr move (id=81) in fcx 0xb3970ef8
This message reflects a bug in the Rust compiler.
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
task 'rustc' failed at 'explicit failure', /home/duncan/Code/rust/src/libsyntax/diagnostic.rs:102
task '

' failed at 'explicit failure', /home/duncan/Code/rust/src/librustc/lib.rs:443

Source:

struct Vec2
{
    x: f32,
    y: f32
}

impl Add<Vec2, Vec2> for Vec2
{
    fn add(&self, v2: &Vec2) -> Vec2
    {
        Vec2
        {
            x: self.x + v2.x,
            y: self.y + v2.y
        }
    }
}

struct Polygon
{
    vertices: ~[Vec2]
}

impl Polygon
{
    fn translate(&mut self, move: &Vec2)
    {
        for v in self.vertices.mut_iter()
        {
            *v += *move;
        }
    }
}

fn main()
{
    return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant