-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Can't implement Drop on type with const_evaluatable_checked where bound #79248
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-destructors
Area: Destructors (`Drop`, …)
C-bug
Category: This is a bug.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
rustbot
added
A-const-generics
Area: const generics (parameters and arguments)
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Nov 20, 2020
Also, is it expected that the where bounds need to be repeated in each of the type's trait impls? |
Yes, bounds on type definitions need to be repeated in impls, at least until implied bounds are introduced. |
Is anyone aware of a way to work around this issue at the moment? |
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this issue
Aug 6, 2021
permit drop impls with generic constants in where clauses Fixes rust-lang#79248 `==` is not sufficient to check for equality between unevaluated consts which causes the above issue because the const in `[(); N - 1]:` on the impl and the const in `[(); N - 1]:` on the struct def are not seen as equal. Any predicate that can contain an unevaluated const cant use `==` here as it will cause us to incorrectly emit an error. I dont know much about chalk but it seems like we ought to be relating the `TypeWellFormedFromEnv` instead of `==` as it contains a `Ty` so I added that too... r? `````@lcnr`````
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-generics
Area: const generics (parameters and arguments)
A-destructors
Area: Destructors (`Drop`, …)
C-bug
Category: This is a bug.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This issue seems to be specific to the
Drop
trait.rustc --version --verbose
:@rustbot label A-const-generics F-const_evaluatable_checked T-compiler
The text was updated successfully, but these errors were encountered: