diff options
| author | bors <bors@rust-lang.org> | 2024-05-04 00:32:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-04 00:32:27 +0000 |
| commit | 09cd00fea4aecaa6707f122d7e143196b8a12ee2 (patch) | |
| tree | 6a761042886683a93980d152908945b361349519 /src/librustdoc | |
| parent | d2d24e395a1e4fcee62ca17bf4cbddb1f903af97 (diff) | |
| parent | fea1fe7f01e99e0ef9eb6ceac8c97fb17ff3263e (diff) | |
| download | rust-09cd00fea4aecaa6707f122d7e143196b8a12ee2.tar.gz rust-09cd00fea4aecaa6707f122d7e143196b8a12ee2.zip | |
Auto merge of #124401 - oli-obk:some_hir_cleanups, r=cjgillot
Some hir cleanups It seemed odd to not put `AnonConst` in the arena, compared with the other types that we did put into an arena. This way we can also give it a `Span` without growing a lot of other HIR data structures because of the extra field. r? compiler
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index fc4f48262e5..f437c7d319d 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -281,7 +281,10 @@ fn clean_lifetime<'tcx>(lifetime: &hir::Lifetime, cx: &mut DocContext<'tcx>) -> Lifetime(lifetime.ident.name) } -pub(crate) fn clean_const<'tcx>(constant: &hir::ConstArg, cx: &mut DocContext<'tcx>) -> Constant { +pub(crate) fn clean_const<'tcx>( + constant: &hir::ConstArg<'_>, + cx: &mut DocContext<'tcx>, +) -> Constant { let def_id = cx.tcx.hir().body_owner_def_id(constant.value.body).to_def_id(); Constant { type_: Box::new(clean_middle_ty( @@ -2450,7 +2453,7 @@ pub(crate) fn clean_variant_def_with_args<'tcx>( fn clean_variant_data<'tcx>( variant: &hir::VariantData<'tcx>, - disr_expr: &Option<hir::AnonConst>, + disr_expr: &Option<&hir::AnonConst>, cx: &mut DocContext<'tcx>, ) -> Variant { let discriminant = disr_expr |
