1
Fork 0

Rollup merge of #81738 - camelid:misc-small-diag-cleanup, r=lcnr

Miscellaneous small diagnostics cleanup
This commit is contained in:
Jonas Schievink 2021-02-06 17:01:49 +01:00 committed by GitHub
commit 96e843ce6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 20 additions and 20 deletions

View file

@ -838,7 +838,7 @@ fn missing_items_err(
// Obtain the level of indentation ending in `sugg_sp`.
let indentation = tcx.sess.source_map().span_to_margin(sugg_sp).unwrap_or(0);
// Make the whitespace that will make the suggestion have the right indentation.
let padding: String = (0..indentation).map(|_| " ").collect();
let padding: String = std::iter::repeat(" ").take(indentation).collect();
for trait_item in missing_items {
let snippet = suggestion_signature(&trait_item, tcx);