pub enum NullLet {
NullType,
Nullable,
}Expand description
What let x = null (no annotation) gives x (ISSUES P17).
§Examples
use typeck_lang::NullLet;
assert_ne!(NullLet::NullType, NullLet::Nullable);Variants§
NullType
The type of the literal, null: the variable can only ever hold
null (the 0.2 convention).
Nullable
T? for a T inferred from the variable’s later uses (an
assignment x = 5 makes it i64?). Under a profile without null
safety, T itself.
Trait Implementations§
impl Copy for NullLet
impl Eq for NullLet
impl StructuralPartialEq for NullLet
Auto Trait Implementations§
impl Freeze for NullLet
impl RefUnwindSafe for NullLet
impl Send for NullLet
impl Sync for NullLet
impl Unpin for NullLet
impl UnsafeUnpin for NullLet
impl UnwindSafe for NullLet
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