diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-05-29 10:03:40 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-05-29 10:04:08 +0000 |
| commit | a34c26e7ecfbfe3f4fd5fbd4868a0cba5676e6a5 (patch) | |
| tree | ed274505213e5fb6ed3320bd9a5213dd9fca4616 /src/librustdoc/clean/utils.rs | |
| parent | ceb45d55190eb00d30b8762bc4c34cf71c53b637 (diff) | |
| download | rust-a34c26e7ecfbfe3f4fd5fbd4868a0cba5676e6a5.tar.gz rust-a34c26e7ecfbfe3f4fd5fbd4868a0cba5676e6a5.zip | |
Make `body_owned_by` return the body directly.
Almost all callers want this anyway, and now we can use it to also return fed bodies
Diffstat (limited to 'src/librustdoc/clean/utils.rs')
| -rw-r--r-- | src/librustdoc/clean/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/clean/utils.rs b/src/librustdoc/clean/utils.rs index aa923cc6117..803650beaf6 100644 --- a/src/librustdoc/clean/utils.rs +++ b/src/librustdoc/clean/utils.rs @@ -342,7 +342,7 @@ pub(crate) fn print_const(cx: &DocContext<'_>, n: ty::Const<'_>) -> String { match n.kind() { ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, args: _ }) => { let s = if let Some(def) = def.as_local() { - rendered_const(cx.tcx, cx.tcx.hir().body_owned_by(def)) + rendered_const(cx.tcx, &cx.tcx.hir().body_owned_by(def), def) } else { inline::print_inlined_const(cx.tcx, def) }; |
