Broken fix suggestion for no_mangle_with_rust_abi #13656
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
Summary
The fix suggestion for this lint proposes putting a fix where it shouldn't be if there's an occurrence of the string
fn
anywhere before thefn
keyword.Reproducer
This code suggests putting
extern "C"
in-betweenr#
andfn
, instead of)
andfn
:This is caused by it being implemented with a naive string replacement.
Version
rustc 1.84.0-nightly (b8c8287a2 2024-11-03)
binary: rustc
commit-hash: b8c8287a229cd79604aa84c25e1235fc78cd5f2e
commit-date: 2024-11-03
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.3
Additional Labels
@rustbot label I-suggestion-causes-error
The text was updated successfully, but these errors were encountered: