Closed
Description
overflow.rs
:
pub struct Deg { d : f64 }
pub trait Angle : Equiv< Self > { }
impl Angle for Deg { }
impl< T : Angle > Equiv< T > for T {
fn equiv( &self, other : &T ) -> bool {
return true;
}
}
pub fn main() { }
compiling:
$ rustc -v
rustc 0.9
host: x86_64-unknown-linux-gnu
$ rustc overflow.rs
overflow.rs:9:1: 13:2 error: cannot provide an extension implementation where both trait and type are not defined in this crate
overflow.rs:9 impl< T : Angle > Equiv< T > for T {
overflow.rs:10 fn equiv( &self, other : &T ) -> bool {
overflow.rs:11 return self.normalize() == other.normalize();
overflow.rs:12 }
overflow.rs:13 }
task 'rustc' has overflowed its stack
Illegal instruction (core dumped)