mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-26 22:50:56 +00:00
rustfmt
This commit is contained in:
parent
9bda699c80
commit
75f605ccf6
1 changed files with 6 additions and 9 deletions
|
@ -80,18 +80,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeEnumVariant {
|
|||
VariantData::Unit(_) => unreachable!(),
|
||||
};
|
||||
if let Some(snip) = snippet_opt(cx, span) {
|
||||
db.span_suggestion(
|
||||
span,
|
||||
"consider boxing the large fields to reduce the total size of the enum",
|
||||
format!("Box<{}>", snip),
|
||||
);
|
||||
db.span_suggestion(span,
|
||||
"consider boxing the large fields to reduce the total size of \
|
||||
the enum",
|
||||
format!("Box<{}>", snip));
|
||||
return;
|
||||
}
|
||||
}
|
||||
db.span_help(
|
||||
def.variants[i].span,
|
||||
"consider boxing the large fields to reduce the total size of the enum",
|
||||
);
|
||||
db.span_help(def.variants[i].span,
|
||||
"consider boxing the large fields to reduce the total size of the enum");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue