Commit 34fab5c
authored
Allow multiline suggestions in
I recently got a `map-unwrap-or` warning with no suggestion, and was
very confused because I couldn't tell what the lint was flagging.
It turned out the "else" part had multiple lines, so the lint decided
not to include a suggestion.
Please look at this PR's stderr file, and decide whether you like it.
Then look at [its
predecessor](https://github.com/rust-lang/rust-clippy/blob/24e16f992c2dda1904fe8d4a94b391513832ce60/tests/ui/map_unwrap_or.stderr),
and decide whether you like it.
IMHO, the one with the suggestions is much more informative, even if not
as pretty.
changelog: Allow multiline suggestions in `map-unwrap-or`map-unwrap-or (#16114)File tree
2 files changed
+32
-9
lines changed- clippy_lints/src/methods
- tests/ui
2 files changed
+32
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 54 | + | |
| 55 | + | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
| |||
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 67 | | |
74 | 68 | | |
75 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
| |||
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
141 | 155 | | |
142 | 156 | | |
143 | 157 | | |
| |||
161 | 175 | | |
162 | 176 | | |
163 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
164 | 186 | | |
165 | 187 | | |
166 | 188 | | |
| |||
172 | 194 | | |
173 | 195 | | |
174 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
175 | 204 | | |
176 | 205 | | |
177 | 206 | | |
| |||
0 commit comments