Commit 838330b
internal: suppress
Changes how `[pin_]init!` handles `InitializerKind::Value` to avoid
creating a local variable that can cause `non_snake_case` lint.
Allows `non_snake_case` lint on local variables generated elsewhere
in `[pin_]init!`.
Since the same warning will be reported by the compiler on the struct
definition, having the extra warning for the generated local variables
is unnecessary and confusing.
Reported-by: Gary Guo <gary@garyguo.net>
Link: #125
Closes: https://lore.kernel.org/rust-for-linux/DGTBJBIVFZ2K.2F1ZEFGY0G7NK@garyguo.net/
Fixes: db96c51 ("add references to previously initialized fields")
Signed-off-by: Mirko Adzic <adzicmirko97@gmail.com>non_snake_case lint in [pin_]init!
1 parent 7c66b8a commit 838330b
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
| |||
0 commit comments