pub struct CharLit {
pub value: i64,
pub kind: StrKind,
pub text: String,
}Expand description
A decoded character constant.
Fields§
§value: i64The value of the constant.
For a plain single-character constant this is the unsigned value of the
execution character (so '\xff' is 255); whether that is later
interpreted as -1 is up to sema, which knows the signedness of
char. Multi-character constants are packed big-endian, as GCC does.
kind: StrKindWhich prefix the constant was written with, which is what fixes its
type: 'x' is an int, L'x' a wchar_t, u'x' a char16_t,
U'x' a char32_t and u8'x' a char8_t.
text: StringThe exact source spelling, including quotes.
Trait Implementations§
impl Eq for CharLit
impl StructuralPartialEq for CharLit
Auto Trait Implementations§
impl Freeze for CharLit
impl RefUnwindSafe for CharLit
impl Send for CharLit
impl Sync for CharLit
impl Unpin for CharLit
impl UnsafeUnpin for CharLit
impl UnwindSafe for CharLit
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