pub struct Import {
pub package: String,
pub names: Vec<(String, Span)>,
pub listed: bool,
pub span: Span,
pub package_span: Span,
}Expand description
One use form, as the file that wrote it declared it.
use("moji") makes moji::split reachable; use("retsu", [:first, :size]) also makes first and size reachable bare. The form stays in
the program (after the package’s spliced forms) so the check stage can
point at it, and evaluates to nothing (blue_lang_runtime::uses::ResolvedProgram::sexps).
Fields§
§package: String§names: Vec<(String, Span)>The names listed for bare use, each with its :name span. Empty for
use("moji").
listed: boolWhether a list was written at all: use("x", []) lists nothing.
span: SpanThe whole use(...) form.
package_span: SpanThe span of the package-name string.
Trait Implementations§
impl StructuralPartialEq for Import
Auto Trait Implementations§
impl Freeze for Import
impl RefUnwindSafe for Import
impl Send for Import
impl Sync for Import
impl Unpin for Import
impl UnsafeUnpin for Import
impl UnwindSafe for Import
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