Just to show a clippy bug

```sh
$ cargo clippy                                                                                  ~/src/clippy_test [2:10:20]
    Checking clippy_test v0.1.0 ($HOME/src/clippy_test)
error: unnecessary structure name repetition
 --> src/lib.rs:4:10
  |
4 | pub enum AnArbitraryName {
  |          ^^^^^^^^^^^^^^^ help: use the applicable keyword: `Self`
  |
  = note: `-D clippy::use-self` implied by `-D clippy::nursery`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self

error: could not compile `clippy_test` due to previous error
```
main
finga 3 months ago
commit 3018304f30
  1. 7
      .cargo/config
  2. 2
      .gitignore
  3. 13
      Cargo.toml
  4. 8
      src/lib.rs

@ -0,0 +1,7 @@
[target.'cfg(feature = "cargo-clippy")']
rustflags = [
"-Dwarnings",
"-Dclippy::pedantic",
"-Dclippy::nursery",
"-Dclippy::cargo",
]

2
.gitignore vendored

@ -0,0 +1,2 @@
/target
/Cargo.lock

@ -0,0 +1,13 @@
[package]
name = "clippy_test"
version = "0.1.0"
edition = "2021"
description = "An example crate for showing a clippy bug."
license = "GPL-3.0-or-later"
readme = "not applicable"
repository = "https://github.com/finga/clippy_test"
keywords = ["clippy_test"]
categories = ["clippy_test"]
[dependencies]
serde = { version = "1", features = ["derive"] }

@ -0,0 +1,8 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize)]
pub enum AnArbitraryName {
Field0,
Field1,
Field2,
}
Loading…
Cancel
Save