Rollup merge of #102113 - RalfJung:opty-assert-mem, r=oli-obk

OpTy: fix a method taking self rather than &self

r? `@oli-obk`
This commit is contained in:
Matthias Krüger 2022-09-22 21:34:49 +02:00 committed by GitHub
commit 41ad726110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,7 @@ impl<'tcx, Prov: Provenance> PlaceTy<'tcx, Prov> {
#[inline(always)]
#[cfg_attr(debug_assertions, track_caller)] // only in debug builds due to perf (see #98980)
pub fn assert_mem_place(self) -> MPlaceTy<'tcx, Prov> {
pub fn assert_mem_place(&self) -> MPlaceTy<'tcx, Prov> {
self.try_as_mplace().unwrap()
}
}