implicit_return
suggestion is invalid syntax
#6940
Labels
C-bug
Category: Clippy is not doing the correct thing
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
I tried this code (from this file, Archive):
I would expect the
implicit_return
lint to suggest the last line be changed to:Instead, the
implicit_return
lint produced the suggestion:A
return
before the body isn't accepted by the compiler and seems broken to me.Meta
For reference,
clippy
was invoked with:cargo clippy -V
: clippy 0.1.51 (73f48e5 2021-03-18)cargo +stable clippy -V
: clippy 0.0.212 (cb75ad5 2021-02-10)rustc -Vv
:The text was updated successfully, but these errors were encountered: