Skip to content

Commit b7c802b

Browse files
committed
Auto merge of rust-lang#5533 - phansch:rustup001, r=matthiaskrgr
rustup to rust-lang/rust#70043 changelog: none
2 parents 07dd5fa + 5b1622b commit b7c802b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_lints/src/redundant_pub_crate.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for RedundantPubCrate {
4545
if !cx.access_levels.is_exported(item.hir_id) {
4646
if let Some(false) = self.is_exported.last() {
4747
let span = item.span.with_hi(item.ident.span.hi());
48+
let def_id = cx.tcx.hir().local_def_id(item.hir_id);
49+
let descr = cx.tcx.def_kind(def_id).descr(def_id.to_def_id());
4850
span_lint_and_then(
4951
cx,
5052
REDUNDANT_PUB_CRATE,
5153
span,
52-
&format!("pub(crate) {} inside private module", item.kind.descr()),
54+
&format!("pub(crate) {} inside private module", descr),
5355
|diag| {
5456
diag.span_suggestion(
5557
item.vis.span,

0 commit comments

Comments
 (0)