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 /compiler/rustc_ty_utils/src | |
| 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 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/opaque_types.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/opaque_types.rs b/compiler/rustc_ty_utils/src/opaque_types.rs index ccc522053a6..686f2f04ad9 100644 --- a/compiler/rustc_ty_utils/src/opaque_types.rs +++ b/compiler/rustc_ty_utils/src/opaque_types.rs @@ -109,7 +109,7 @@ impl<'tcx> OpaqueTypeCollector<'tcx> { #[instrument(level = "trace", skip(self))] fn collect_taits_declared_in_body(&mut self) { - let body = self.tcx.hir().body(self.tcx.hir().body_owned_by(self.item)).value; + let body = self.tcx.hir().body_owned_by(self.item).value; struct TaitInBodyFinder<'a, 'tcx> { collector: &'a mut OpaqueTypeCollector<'tcx>, } |
