Closed
Description
Sorry, since I don't know what causes this, can't be more specific, and don't know if the other bug reports (currently 4 others) are related or have distinct causes.
Other issues with the same error:
- unique pointers + macros → rust: task failed at 'assertion failed: !bcx.ccx().maps.moves_map.contains(&arg_expr.id)' #6000
- ICE with compound assignment and Drop::finalize #5959
- Assignment operator for BigInt causes ICE #6102
- NumCast::from() crashes compiler #6440
This is as small as I can get the code:
use core::num::Zero;
pub trait MyTrait {
pub fn method(&mut self);
}
pub struct MyStruct<U> {
pub attr: U,
}
pub impl<U: Num> MyStruct<U> {
pub fn other_method(&mut self) {
self.attr += Zero::zero();
}
}
impl MyTrait for MyStruct<f64> {
pub fn method(&mut self) {
self.other_method();
}
}
fn main() {
let x = MyStruct {attr: 0.0f64};
let _ = ~x as ~MyTrait;
}
Metadata
Metadata
Assignees
Labels
No labels