- Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-dyn_star`#![feature(dyn_star)]``#![feature(dyn_star)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-dyn_star`#![feature(dyn_star)]``#![feature(dyn_star)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.