diff options
| author | bors <bors@rust-lang.org> | 2023-03-24 18:40:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-24 18:40:19 +0000 |
| commit | 80a933042e4e07ee9d9c20897d4fab595766fef6 (patch) | |
| tree | a4f766b70383a271ff11540d7723d4619b644039 /src/tools/clippy/tests/ui/unnecessary_struct_initialization.stderr | |
| parent | 31d74fb24bb16317e09f936fbf46590599b02940 (diff) | |
| parent | 50475e864881eb15c01afac83c7aad5e5ff96437 (diff) | |
| download | rust-80a933042e4e07ee9d9c20897d4fab595766fef6.tar.gz rust-80a933042e4e07ee9d9c20897d4fab595766fef6.zip | |
Auto merge of #109566 - flip1995:clippyup, r=Manishearth
Update Clippy r? `@Manishearth` One day late, sorry :neutral_face:
Diffstat (limited to 'src/tools/clippy/tests/ui/unnecessary_struct_initialization.stderr')
| -rw-r--r-- | src/tools/clippy/tests/ui/unnecessary_struct_initialization.stderr | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/unnecessary_struct_initialization.stderr b/src/tools/clippy/tests/ui/unnecessary_struct_initialization.stderr new file mode 100644 index 00000000000..ca497057702 --- /dev/null +++ b/src/tools/clippy/tests/ui/unnecessary_struct_initialization.stderr @@ -0,0 +1,46 @@ +error: unnecessary struct building + --> $DIR/unnecessary_struct_initialization.rs:34:9 + | +LL | Self { ..*self } + | ^^^^^^^^^^^^^^^^ help: replace with: `*self` + | + = note: `-D clippy::unnecessary-struct-initialization` implied by `-D warnings` + +error: unnecessary struct building + --> $DIR/unnecessary_struct_initialization.rs:41:17 + | +LL | let mut b = S { ..a }; + | ^^^^^^^^^ help: replace with: `a` + +error: unnecessary struct building + --> $DIR/unnecessary_struct_initialization.rs:44:18 + | +LL | let c = &mut S { ..b }; + | ^^^^^^^^^ help: replace with: `b` + +error: unnecessary struct building + --> $DIR/unnecessary_struct_initialization.rs:52:14 + | +LL | let g = &S { ..f }; + | ^^^^^^^^^ help: replace with: `f` + +error: unnecessary struct building + --> $DIR/unnecessary_struct_initialization.rs:55:18 + | +LL | let h = &mut S { + | __________________^ +LL | | ..*Box::new(S { f: String::from("foo") }) +LL | | }; + | |_____^ help: replace with: `*Box::new(S { f: String::from("foo") })` + +error: unnecessary struct building + --> $DIR/unnecessary_struct_initialization.rs:74:18 + | +LL | let p = &mut T { + | __________________^ +LL | | ..*Box::new(T { f: 5 }) +LL | | }; + | |_____^ help: replace with: `*Box::new(T { f: 5 })` + +error: aborting due to 6 previous errors + |
