-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Fn traits with array args no longer work with const_generics enabled #67753
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-const-generics
Area: const generics (parameters and arguments)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-const_generics
`#![feature(const_generics)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
(discovered by @jcoglan) |
cc @nikomatsakis @eddyb @varkor Simplified: #![feature(const_generics)]
fn main() {
takes_closure_of_array(|_| {});
}
fn takes_closure_of_array<F>(f: F)
where
F: FnOnce([i32; 0]),
{
f([]);
} |
Isn't this expected fallout? |
This is an expected consequence of #66883. |
Seems like #60471 is what's supposed to eventually fix this? |
triage: P-medium (nightly-only regression on feature that is known to have bugs) |
I can't reproduce on master, this may have gotten fixed? (Note that the playground is severely outdated, a fix is underway for that though) |
tmandry
added a commit
to tmandry/rust
that referenced
this issue
Jan 17, 2020
…ntril Add regression test for integer literals in generic arguments in where clauses Closes rust-lang#67753.
tmandry
added a commit
to tmandry/rust
that referenced
this issue
Jan 18, 2020
…ntril Add regression test for integer literals in generic arguments in where clauses Closes rust-lang#67753.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-const_generics
`#![feature(const_generics)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
(playpen)
Gives the error:
This compiles fine with const_generics not enabled, and is a regression
cc @Centril @oli-obk
The text was updated successfully, but these errors were encountered: