about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-04-28 02:40:36 +0200
committerGitHub <noreply@github.com>2022-04-28 02:40:36 +0200
commit4c628bbb1c266a8513b364dca5ae7e311a1e0777 (patch)
tree6a052354aee525e972374b8a8c1e79833e4c2f20 /src
parent6f6fe3e651832796b2454dad5adafe9e21a09498 (diff)
parentf697955c1eb72e3dac6b6aafa411e58cb8d18706 (diff)
Rollup merge of #96471 - BoxyUwU:let_else_considered_harmful, r=lcnr
replace let else with `?`

r? `@oli-obk`
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index a070cef2272..476a89523a5 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1305,7 +1305,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
 fn maybe_expand_private_type_alias(cx: &mut DocContext<'_>, path: &hir::Path<'_>) -> Option<Type> {
     let Res::Def(DefKind::TyAlias, def_id) = path.res else { return None };
     // Substitute private type aliases
-    let Some(def_id) = def_id.as_local() else { return None };
+    let def_id = def_id.as_local()?;
     let alias = if !cx.cache.access_levels.is_exported(def_id.to_def_id()) {
         &cx.tcx.hir().expect_item(def_id).kind
     } else {