(This makes it a little easier to add instrumentation of the entry and
exit by adding `debug!` at the beginning and end, though note that the
function body *does* use the `?` operator...)
}
}
- /// Whether this value be written or borrowed mutably.
+ /// Whether this value can be written or borrowed mutably.
/// Returns the root place if the place passed in is a projection.
fn is_mutable<'d>(
&self,
ty::RawPtr(tnm) => {
match tnm.mutbl {
// `*const` raw pointers are not mutable
- hir::MutImmutable => return Err(place),
+ hir::MutImmutable => Err(place),
// `*mut` raw pointers are always mutable, regardless of
// context. The users have to check by themselves.
hir::MutMutable => {
- return Ok(RootPlace {
+ Ok(RootPlace {
place,
is_local_mutation_allowed,
- });
+ })
}
}
}