diff options
| author | jumbatm <jumbatm@gmail.com> | 2020-02-02 09:47:58 +1000 |
|---|---|---|
| committer | jumbatm <jumbatm@gmail.com> | 2020-02-11 19:49:01 +1000 |
| commit | d246385122ffd7dd6cc5c490b7e648f58c2ff7fd (patch) | |
| tree | a5047dc08e4a896995c406d8fbeff527a38e8290 /src/librustc_privacy | |
| parent | 0634a5007306f3951ec28c0b9986452a91eebda8 (diff) | |
| download | rust-d246385122ffd7dd6cc5c490b7e648f58c2ff7fd.tar.gz rust-d246385122ffd7dd6cc5c490b7e648f58c2ff7fd.zip | |
Run RustFmt
Diffstat (limited to 'src/librustc_privacy')
| -rw-r--r-- | src/librustc_privacy/lib.rs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index 43f92ae69c4..7f51bc25642 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -1786,15 +1786,14 @@ impl SearchInterfaceForPrivateItemsVisitor<'tcx> { self.item_id, self.span, |lint| { - lint.build( - &format!( - "{} `{}` from private dependency '{}' in public \ + lint.build(&format!( + "{} `{}` from private dependency '{}' in public \ interface", - kind, - descr, - self.tcx.crate_name(def_id.krate) - ) - ).emit() + kind, + descr, + self.tcx.crate_name(def_id.krate) + )) + .emit() }, ); } @@ -1818,9 +1817,12 @@ impl SearchInterfaceForPrivateItemsVisitor<'tcx> { err.emit(); } else { let err_code = if kind == "trait" { "E0445" } else { "E0446" }; - self.tcx.struct_span_lint_hir(lint::builtin::PRIVATE_IN_PUBLIC, hir_id, self.span, |lint| { - lint.build(&format!("{} (error {})", msg, err_code)).emit() - }); + self.tcx.struct_span_lint_hir( + lint::builtin::PRIVATE_IN_PUBLIC, + hir_id, + self.span, + |lint| lint.build(&format!("{} (error {})", msg, err_code)).emit(), + ); } } |
