Help for missing trait method suggests unstable code #98562
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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
help
block 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.The text was updated successfully, but these errors were encountered: