pub struct FileAsm {
pub template: StrId,
pub span: Span,
}Expand description
One asm written at file scope, outside any function.
Its own type rather than an Asm with empty lists, because the two are different things
under the same keyword. A statement’s template refers to operands by number and is one
instruction of a function; a file-scope one has no operands to refer to, so % in it means
nothing in particular, and what it says is what the translation unit itself contains. Keeping
them apart is what lets the walk over the tree read the template as written rather than as a
format string with nothing filled into it.
Fields§
§template: StrIdThe template, as the program wrote it.
span: SpanWhere it was written, for the messages about what is in it.
Trait Implementations§
impl Copy for FileAsm
impl Eq for FileAsm
impl StructuralPartialEq for FileAsm
Auto Trait Implementations§
impl Freeze for FileAsm
impl RefUnwindSafe for FileAsm
impl Send for FileAsm
impl Sync for FileAsm
impl Unpin for FileAsm
impl UnsafeUnpin for FileAsm
impl UnwindSafe for FileAsm
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