-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closures in const generics cause ICE #63322
Labels
A-closures
Area: Closures (`|…| { … }`)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
F-const_generics
`#![feature(const_generics)]`
glacier
ICE tracked in rust-lang/glacier.
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
jonas-schievink
added
A-closures
Area: Closures (`|…| { … }`)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Aug 6, 2019
Centril
added
F-const_generics
`#![feature(const_generics)]`
requires-nightly
This issue requires a nightly compiler in some way.
labels
Aug 6, 2019
"smaller": #![feature(const_generics)]
trait A {}
struct B;
impl A for B {}
fn test<const T: &'static dyn A>() {
unimplemented!()
}
fn main() {
test::<{ &B }>();
} Error:
|
@rustbot claim |
It shouldn't be, but it currently is. To fix it you need to change |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 28, 2020
…pnkfelix forbid `dyn Trait` in patterns Do not allow `&dyn Trait` as a generic const parameters. This also changes dyn trait in pattern from ICE to error. closes rust-lang#63322 closes rust-lang#70972 r? @eddyb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-closures
Area: Closures (`|…| { … }`)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
F-const_generics
`#![feature(const_generics)]`
glacier
ICE tracked in rust-lang/glacier.
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.
Pretty straightforward. The idea is to plug logic into a template. This seems like something that should/could work.
Playground link: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=7eefeb472380da1061af1be06967d30a
The text was updated successfully, but these errors were encountered: