-
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
Suggest setting associated types on type errors #63711
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
estebank
added
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
A-diagnostics
Area: Messages for errors, warnings, and lints
P-medium
Medium priority
A-associated-items
Area: Associated items (types, constants & functions)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
labels
Aug 19, 2019
Related case from https://twitter.com/ShekoHex/status/1165248106767814657: use std::net::ToSocketAddrs;
pub struct Config<A>
where
A: ToSocketAddrs,
{
addr: A,
}
impl<A> Default for Config<A>
where
A: ToSocketAddrs,
{
fn default() -> Self {
Self {
addr: "127.0.0.1:1883",
}
}
}
fn start<A: ToSocketAddrs>(addr: A) {}
|
Centril
added a commit
to Centril/rust
that referenced
this issue
Sep 21, 2019
…-obk Add explanation to type mismatch involving type params and assoc types CC rust-lang#63711
estebank
added
the
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
label
Oct 5, 2019
Triage, current output for these cases:
|
Centril
added a commit
to Centril/rust
that referenced
this issue
Dec 20, 2019
Tweak errors for missing associated types and type parameters * On `dyn Trait` missing associated types, provide a structured suggestion for them * On missing type parameters, provide structured suggestion for them * Point at trait definition when missing required type parameter * Tweak output of E0658 * Tweak wording of E0719 * Account for `Trait1 + Trait2` case Fix rust-lang#66380, fix rust-lang#60595. CC rust-lang#63711.
bors
added a commit
that referenced
this issue
Dec 26, 2019
Tweak errors for missing associated types and type parameters * On `dyn Trait` missing associated types, provide a structured suggestion for them * On missing type parameters, provide structured suggestion for them * Point at trait definition when missing required type parameter * Tweak output of E0658 * Tweak wording of E0719 * Account for `Trait1 + Trait2` case Fix #66380, fix #60595. CC #63711.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code is missing a constraint for
TryInto<Error=TryIntoError>
:which causes the following error:
This should be closer to
or
CC reporter @minggfeng
The text was updated successfully, but these errors were encountered: