Skip to content

Commit 57c49d6

Browse files
committed
Auto merge of #109786 - estebank:tweak-add-line-sugg, r=compiler-errors
Tweak output for 'add line' suggestion Closes #108174
2 parents a7fb6ec + e18a88f commit 57c49d6

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

tests/ui/crashes/ice-6252.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LL | _n: PhantomData,
66
|
77
help: consider importing one of these items
88
|
9-
LL | use core::marker::PhantomData;
9+
LL + use core::marker::PhantomData;
1010
|
11-
LL | use serde::__private::PhantomData;
11+
LL + use serde::__private::PhantomData;
1212
|
13-
LL | use std::marker::PhantomData;
13+
LL + use std::marker::PhantomData;
1414
|
1515

1616
error[E0412]: cannot find type `VAL` in this scope

tests/ui/derivable_impls.stderr

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ LL | | }
1414
= help: remove the manual implementation...
1515
help: ...and instead derive it
1616
|
17-
LL | #[derive(Default)]
17+
LL + #[derive(Default)]
18+
LL | struct FooDefault<'a> {
1819
|
1920

2021
error: this `impl` can be derived
@@ -30,7 +31,8 @@ LL | | }
3031
= help: remove the manual implementation...
3132
help: ...and instead derive it
3233
|
33-
LL | #[derive(Default)]
34+
LL + #[derive(Default)]
35+
LL | struct TupleDefault(bool, i32, u64);
3436
|
3537

3638
error: this `impl` can be derived
@@ -46,7 +48,8 @@ LL | | }
4648
= help: remove the manual implementation...
4749
help: ...and instead derive it
4850
|
49-
LL | #[derive(Default)]
51+
LL + #[derive(Default)]
52+
LL | struct StrDefault<'a>(&'a str);
5053
|
5154

5255
error: this `impl` can be derived
@@ -62,7 +65,8 @@ LL | | }
6265
= help: remove the manual implementation...
6366
help: ...and instead derive it
6467
|
65-
LL | #[derive(Default)]
68+
LL + #[derive(Default)]
69+
LL | struct Y(u32);
6670
|
6771

6872
error: this `impl` can be derived
@@ -78,7 +82,8 @@ LL | | }
7882
= help: remove the manual implementation...
7983
help: ...and instead derive it
8084
|
81-
LL | #[derive(Default)]
85+
LL + #[derive(Default)]
86+
LL | struct WithoutSelfCurly {
8287
|
8388

8489
error: this `impl` can be derived
@@ -94,7 +99,8 @@ LL | | }
9499
= help: remove the manual implementation...
95100
help: ...and instead derive it
96101
|
97-
LL | #[derive(Default)]
102+
LL + #[derive(Default)]
103+
LL | struct WithoutSelfParan(bool);
98104
|
99105

100106
error: this `impl` can be derived
@@ -110,7 +116,8 @@ LL | | }
110116
= help: remove the manual implementation...
111117
help: ...and instead derive it
112118
|
113-
LL | #[derive(Default)]
119+
LL + #[derive(Default)]
120+
LL | pub struct RepeatDefault1 {
114121
|
115122

116123
error: this `impl` can be derived
@@ -126,7 +133,8 @@ LL | | }
126133
= help: remove the manual implementation...
127134
help: ...and instead derive it...
128135
|
129-
LL | #[derive(Default)]
136+
LL + #[derive(Default)]
137+
LL | pub enum SimpleEnum {
130138
|
131139
help: ...and mark the default variant
132140
|

0 commit comments

Comments
 (0)