diff options
| author | bors <bors@rust-lang.org> | 2023-07-12 03:31:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-12 03:31:10 +0000 |
| commit | 8ede3aae28fe6e4d52b38157d7bfe0d3bceef225 (patch) | |
| tree | 85d3fab56ef8cd2b9d142ab56a0700d696838eef /compiler/rustc_lint | |
| parent | 7bb61853ad519abd3e5b3edfddc1cf00b1d4437d (diff) | |
| parent | 20f5748a950e9ab13ff4697b3165f9e8b18340c3 (diff) | |
| download | rust-1.71.0.tar.gz rust-1.71.0.zip | |
Auto merge of #113602 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.71.0
[stable] 1.71.0 release, backports This PR adds a last-minute backport of: - #112343: Prevent emitting `missing_docs` for `pub extern crate` - no beta/mainline PR -- dropping empty section from relnotes
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 358d412a4d8..85141836e12 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -548,8 +548,12 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc { fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { // Previously the Impl and Use types have been excluded from missing docs, - // so we will continue to exclude them for compatibility - if let hir::ItemKind::Impl(..) | hir::ItemKind::Use(..) = it.kind { + // so we will continue to exclude them for compatibility. + // + // The documentation on `ExternCrate` is not used at the moment so no need to warn for it. + if let hir::ItemKind::Impl(..) | hir::ItemKind::Use(..) | hir::ItemKind::ExternCrate(_) = + it.kind + { return; } |
