Skip to main content

self_borrow_mutability

Function self_borrow_mutability 

Source
fn self_borrow_mutability(
    tcx: TyCtxt<'_>,
    def_id: DefId,
    self_local: Local,
) -> Option<Mutability>
Expand description

The mutability (Not / Mut) of the borrow carried by self_local’s type (a &T / &mut T), or None if it is not a reference. self_local is _1 for a method receiver, and any parameter for a free function.