-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
When running following code:
#![feature(associated_consts)]
trait HasNumber<T> {
const Number: usize;
}
enum One {}
enum Two {}
enum Foo {}
impl<T> HasNumber<T> for One {
const Number: usize = 1;
}
impl<T> HasNumber<T> for Two {
const Number: usize = 2;
}
On playground nightly and beta channels I get the following error:
<anon>:3:5: 3:25 error: internal compiler error: Encountered error `Unimplemented` when trying to select an implementation for constant trait item reference.
<anon>:3 const Number: usize;
^~~~~~~~~~~~~~~~~~~~
I expected to not get that error.
Metadata
Metadata
Assignees
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️