Skip to content

Commit

Permalink
Freeze the lint output for field_reassign_with_default
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Lunnikivi committed Nov 1, 2019
1 parent ac1800f commit 3de7e14
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/ui/field_reassign_with_default.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error: field assignment outside of initializer for an instance created with Default::default()
--> $DIR/field_reassign_with_default.rs:17:5
|
LL | a.i = 42;
| ^^^^^^^^^
|
= note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
note: consider initializing the variable immutably with `A { i: 42, ..Default::default() }`
--> $DIR/field_reassign_with_default.rs:16:5
|
LL | let mut a: A = Default::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

0 comments on commit 3de7e14

Please sign in to comment.