rust-lang/rust-clippy

Lint on method/struct fields sharing the same name

Open

#1.481 geöffnet am 27. Jan. 2017

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Rust (1.391 Forks)batch import
A-lintL-styleT-middlegood first issue

Repository-Metriken

Stars
 (10.406 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)

Beschreibung

Would it be possible to lint on the situation in which a struct field shares a name with a struct method? For example, in the following situation:

struct Foo {
  bar: i32 
}

impl Foo {
  fn bar(self);
}

Contributor Guide