summary refs log tree commit diff
path: root/src/librustdoc/visit_ast.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-16 21:37:51 +0000
committerbors <bors@rust-lang.org>2023-04-16 21:37:51 +0000
commit84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc (patch)
tree45864520870b60ee1bb662685becc5f0b4804744 /src/librustdoc/visit_ast.rs
parentf18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc (diff)
parentc2c413f56eca868a5b5335ba21efa08368735d01 (diff)
downloadrust-1.69.0.tar.gz
rust-1.69.0.zip
Auto merge of #110413 - pietroalbini:pa-1.69.0-stable, r=pietroalbini 1.69.0
[stable] Prepare Rust 1.69.0

Last minute backports:

*  #109643
* #110135
* #109938
* #109937
* #109266

This PR also bumps the channel to stable, and backports the release notes from master.

r? `@ghost`
cc `@rust-lang/release`
Diffstat (limited to 'src/librustdoc/visit_ast.rs')
-rw-r--r--src/librustdoc/visit_ast.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs
index 277201e4de9..157e042e401 100644
--- a/src/librustdoc/visit_ast.rs
+++ b/src/librustdoc/visit_ast.rs
@@ -398,12 +398,20 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
             | hir::ItemKind::Struct(..)
             | hir::ItemKind::Union(..)
             | hir::ItemKind::TyAlias(..)
-            | hir::ItemKind::OpaqueTy(..)
+            | hir::ItemKind::OpaqueTy(hir::OpaqueTy {
+                origin: hir::OpaqueTyOrigin::TyAlias, ..
+            })
             | hir::ItemKind::Static(..)
             | hir::ItemKind::Trait(..)
             | hir::ItemKind::TraitAlias(..) => {
                 self.add_to_current_mod(item, renamed, import_id);
             }
+            hir::ItemKind::OpaqueTy(hir::OpaqueTy {
+                origin: hir::OpaqueTyOrigin::AsyncFn(_) | hir::OpaqueTyOrigin::FnReturn(_),
+                ..
+            }) => {
+                // return-position impl traits are never nameable, and should never be documented.
+            }
             hir::ItemKind::Const(..) => {
                 // Underscore constants do not correspond to a nameable item and
                 // so are never useful in documentation.