Incorrect suggestion of function_item_references
lint
#78571
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The
function_item_references
lint suggests a wrong function item cast.I tried this code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d46c30ab809202ea2b88891e529da4f9
The compiler suggests this:
However, following the suggestion causes a compiler error:
I would expect the compiler suggests
size_of::<Left> as fn() -> _
instead.Meta
rustc --version --verbose
: (2020-10-29 6bdae9e) from playgroundcc #76269
The text was updated successfully, but these errors were encountered: