X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fmir%2Fmod.rs;h=f0b52c698819a59c217f6174fd3adfeb1e8499c3;hb=68088026edcd915b34685cb6e619ef911798ed98;hp=a0381889ace06a3faf8cfc1833e2fd4b213fd647;hpb=05ed0814b93345d635abff47339d9f04c0087bc5;p=rust.git diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index a0381889ace..f0b52c69881 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -61,12 +61,14 @@ pub trait HasLocalDecls<'tcx> { } impl<'tcx> HasLocalDecls<'tcx> for LocalDecls<'tcx> { + #[inline] fn local_decls(&self) -> &LocalDecls<'tcx> { self } } impl<'tcx> HasLocalDecls<'tcx> for Body<'tcx> { + #[inline] fn local_decls(&self) -> &LocalDecls<'tcx> { &self.local_decls } @@ -1772,6 +1774,7 @@ pub fn as_local(&self) -> Option { self.as_ref().as_local() } + #[inline] pub fn as_ref(&self) -> PlaceRef<'tcx> { PlaceRef { local: self.local, projection: &self.projection } } @@ -1783,6 +1786,7 @@ pub fn as_ref(&self) -> PlaceRef<'tcx> { /// - (a.b, .c) /// /// Given a place without projections, the iterator is empty. + #[inline] pub fn iter_projections( self, ) -> impl Iterator, PlaceElem<'tcx>)> + DoubleEndedIterator {