Closed
Description
Example:
#![feature(dyn_star)]
#![allow(incomplete_features)]
trait AddOne {
fn add1(&mut self) -> usize;
}
impl AddOne for usize {
fn add1(&mut self) -> usize {
*self += 1;
*self
}
}
fn add_one(i: &mut dyn* AddOne) -> usize {
i.add1()
}
fn main() {
let x = 42 as dyn* AddOne;
println!("{}", add_one(&mut x));
println!("{}", add_one(&mut x));
}
This fails with the following ICE:
error: internal compiler error: compiler/rustc_trait_selection/src/traits/select/confirmation.rs:1148:18: impossible case reached