We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2cff68 commit cd962e6Copy full SHA for cd962e6
compiler/rustc_errors/src/emitter.rs
@@ -268,10 +268,7 @@ pub trait Emitter: Translate {
268
SuggestionStyle::ShowAlways,
269
].contains(&sugg.style)
270
{
271
- // Don't trim the substitution if it's only whitespace changes
272
- let substitution = &sugg.substitutions[0].parts[0].snippet;
273
- let substitution =
274
- if substitution.trim().is_empty() { substitution } else { substitution.trim() };
+ let substitution = &sugg.substitutions[0].parts[0].snippet.trim();
275
let msg = if substitution.is_empty() || sugg.style.hide_inline() {
276
// This substitution is only removal OR we explicitly don't want to show the
277
// code inline (`hide_inline`). Therefore, we don't show the substitution.
0 commit comments