Skip to content

Commit

Permalink
Auto merge of #5533 - phansch:rustup001, r=matthiaskrgr
Browse files Browse the repository at this point in the history
rustup to rust-lang/rust#70043

changelog: none
  • Loading branch information
bors committed Apr 26, 2020
2 parents 07dd5fa + 5b1622b commit b7c802b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clippy_lints/src/redundant_pub_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantPubCrate {
if !cx.access_levels.is_exported(item.hir_id) {
if let Some(false) = self.is_exported.last() {
let span = item.span.with_hi(item.ident.span.hi());
let def_id = cx.tcx.hir().local_def_id(item.hir_id);
let descr = cx.tcx.def_kind(def_id).descr(def_id.to_def_id());
span_lint_and_then(
cx,
REDUNDANT_PUB_CRATE,
span,
&format!("pub(crate) {} inside private module", item.kind.descr()),
&format!("pub(crate) {} inside private module", descr),
|diag| {
diag.span_suggestion(
item.vis.span,
Expand Down

0 comments on commit b7c802b

Please sign in to comment.