-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Inference disrupted by trait bound that is redundant with a HRTB #41617
Labels
A-inference
Area: Type inference
A-lifetimes
Area: Lifetimes / regions
A-traits
Area: Trait system
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Comments
This may be a consequence of #21974. |
add search keywords: higher ranked lifetime bound |
If this is unlikely to be fixed soon, can we at least make the error message better? It's unclear what type annotations could be added and where, and as @dtolnay writes, the fix is actually to be less restrictive. |
jonas-schievink
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Jun 7, 2020
dlubarov
added a commit
to 0xPolygonZero/plonky
that referenced
this issue
Sep 25, 2020
Since Field is already a subtrait of `Serialize` and `DeserializeOwned`, we don't need serde to add its own bounds `where F: Serialize`. The redundant bounds would normally be harmless, but they cause an error due to a compiler bug: rust-lang/rust#41617
dlubarov
added a commit
to 0xPolygonZero/plonky
that referenced
this issue
Sep 25, 2020
Since `Field` is already a subtrait of `Serialize` and `DeserializeOwned`, we don't need serde to add its own bounds `where F: Serialize`. The redundant bounds would normally be harmless, but they cause an error due to a compiler bug: rust-lang/rust#41617
dlubarov
added a commit
to 0xPolygonZero/plonky
that referenced
this issue
Sep 25, 2020
Since `Field` is already a subtrait of `Serialize` and `DeserializeOwned`, we don't need serde to add its own bounds like `where F: Serialize`. The redundant bounds would normally be harmless, but they cause an error due to a compiler bug: rust-lang/rust#41617
dlubarov
added a commit
to 0xPolygonZero/plonky
that referenced
this issue
Sep 26, 2020
* Prevent Serde from adding redundant bounds on `F` Since `Field` is already a subtrait of `Serialize` and `DeserializeOwned`, we don't need serde to add its own bounds like `where F: Serialize`. The redundant bounds would normally be harmless, but they cause an error due to a compiler bug: rust-lang/rust#41617 * Added FFT+MSM precomputations to the VK serialization + Move to serde_cbor. * Remove unused import. * Use struct destructuring Co-authored-by: wborgeaud <williamborgeaud@gmail.com>
fmease
added
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
A-traits
Area: Trait system
T-types
Relevant to the types team, which will review and decide on the PR/issue.
labels
Sep 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-inference
Area: Type inference
A-lifetimes
Area: Lifetimes / regions
A-traits
Area: Trait system
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
This compiles:
This following does not. It seems like the impl already has
T: for<'b> Trait<'b>
so addingT: Trait<'a>
should not affect the behavior.This currently affects the following and many people have run into it. The workaround is to remove the bound (rust-lang/rust-clippy#1689).
The text was updated successfully, but these errors were encountered: