提交 b7c802b5 编写于 作者: B bors

Auto merge of #5533 - phansch:rustup001, r=matthiaskrgr

rustup to https://github.com/rust-lang/rust/pull/70043

changelog: none
......@@ -45,11 +45,13 @@ fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'tcx>) {
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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册