pub struct NameUsage {
pub used: bool,
pub needs_mut: bool,
pub addr_taken_before_assign: bool,
/* private fields */
}Expand description
1 つの名前 (パラメータまたは局所変数) の使用状況
Fields§
§used: bool読み書きいずれかで 1 回でも参照されたか
needs_mut: bool再代入・複合代入・増減・AddrOf があり mut 宣言が必要か
addr_taken_before_assign: bool無条件の初期化 (宣言時初期化子 or 無条件文脈の単純代入) より前に
アドレスを取られたか。未初期化宣言でこれが立つ場合、deferred
initialization (let x: T;) では E0381 になるため zeroed 初期化が必要
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NameUsage
impl RefUnwindSafe for NameUsage
impl Send for NameUsage
impl Sync for NameUsage
impl Unpin for NameUsage
impl UnsafeUnpin for NameUsage
impl UnwindSafe for NameUsage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more