-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
This code:
#![feature(globs)]
use std::ops::Add;
struct MyInt { a : int }
impl Add for MyInt {
fn add(self, rhs:Self) -> Self { MyInt { a : self.a + rhs.a } }
}
fn main(){}Causes seg-fault:
<anon>:7:1: 9:2 error: internal compiler error: impl `VtableImpl(impl_def_id=DefId { krate: 0, node: 10 }:MyInt.Add, substs=Substs[types=[[];[];[]], regions=[[];[];[]]], nested=[[];[];[]])` did not contain projection for `Obligation(predicate=<MyInt as TraitRef(MyInt, core::ops::Add)>::Output,depth=0)`
<anon>:7 impl Add for MyInt {
<anon>:8 fn add(self, rhs:Self) -> Self { MyInt { a : self.a + rhs.a } }
<anon>:9 }
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:123
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️