Compile error after applying clippy::identity_op
#13924
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
I was writing tests for preinterpet on this draft PR and encountered the following error after running clippy:
The code
The code which tripped up clippy was a little artificial, as it was a test case for building partial expressions from token streams inside macros. In particular, it was the following code:
The full error
Reproducer
I tried this code:
Where the
assert_preinterpret_eq!
macro was defined as:In this WIP branch in this repo.
You can probably substitute the following to reproduce the issue, without using preinterpret:
I expected to see this happen: Clippy ignored it
Instead, this happened: Clippy attempted to fix it and got a compile error.
Version
Additional Labels
@rustbot label +
l-suggestion-causes-error
The text was updated successfully, but these errors were encountered: