-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Help for missing trait method suggests unstable code #98562
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
Playground
I expected to see this happen: an error which either just shows the error itself or the compilable sugestion for change.
Instead, this happened: the error is like following:
Now, if I add the code from the
helpblock into the trait, I'll get another error:The first one is the one I'm worried about, since it shows that the suggest was using a nightly-only feature on stable.
Noting also that rust-analyzer seems to do this correctly - it creates an intention to insert
fn sum<I: Iterator<Item = i32>>(_: I) { todo!(); }, which compiles immediately.