-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
#[derive(Debug)]
enum BtNode {
Node(u32,Box<BtNode>,Box<BtNode>),
Leaf(u32),
}
impl BtNode {
fn stringify(&self) -> String {
match *self {
BtNode::Leaf(val) => { format!("Leaf: {}",val) }
BtNode::Node(val,ref l,ref r) => {format!("Node: {} {:?} {:?}", val,l,r) }
}
}
fn setLeft(&self, Box<BtNode> left) -> &BtNode {
match *self {
BtNode::Leaf(val) => { }
BtNode::Node(val,ref l,ref r) => { l = left }
}
return self;
}
}
fn main() {
let node = Box::new( BtNode::Node( 1, Box::new(BtNode::Leaf(0)), Box::new(BtNode::Leaf(0)) )) ;
let node2 = Box::new( BtNode::Node( 2, Box::new(BtNode::Leaf(0)), Box::new(BtNode::Leaf(0)) )) ;
let root = Box::new( BtNode::Node( 0, node, node2 ) );
}14:26 error: internal compiler error: ident only path should have been covered already
Metadata
Metadata
Assignees
Labels
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️