-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE when using const generics with associated items #70273
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
F-const_generics
`#![feature(const_generics)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
managed to reduce the test case a bit. |
Also happens for this code using a function instead of an associated type: Code#![feature(const_generics)]
trait T<const A: usize> {
fn f();
}
struct S;
impl T<0usize> for S {
fn f() {}
}
fn main() {
let _err = <S as T<0usize>>::f();
} Error output
|
@rustbot claim |
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 24, 2020
…r=eddyb correctly handle const params in type_of extends rust-lang#70223, retry of rust-lang#70276 fixes rust-lang#70273 r? @eddyb cc @varkor
Centril
added a commit
to Centril/rust
that referenced
this issue
Mar 24, 2020
…r=eddyb correctly handle const params in type_of extends rust-lang#70223, retry of rust-lang#70276 fixes rust-lang#70273 r? @eddyb cc @varkor
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
F-const_generics
`#![feature(const_generics)]`
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
This issue has been assigned to @lcnr via this comment.
The text was updated successfully, but these errors were encountered: