#[non_exhaustive]pub struct Lowered {
pub hir: Hir,
pub problems: Vec<Problem>,
}Expand description
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hir: HirThe validated HIR.
problems: Vec<Problem>Every problem, in source order (span start, then discovery).
Implementations§
Source§impl Lowered
impl Lowered
Sourcepub fn has_problems(&self) -> bool
pub fn has_problems(&self) -> bool
Whether any problem was found.
§Examples
use lower_lang::{lower, Arch, MappingBuilder, Pick};
use syntax_lang::Node;
let mut b = MappingBuilder::new();
b.node(K(0), Arch::Module { name: Pick::Absent, items: Pick::Nodes });
let mapping = b.build()?;
let tree = Node::new(K(0), vec![]);
let mut names = intern_lang::Interner::new();
let out = lower(&tree, "", &mapping, &mut names).expect("within budget");
assert!(!out.has_problems());Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lowered
impl RefUnwindSafe for Lowered
impl Send for Lowered
impl Sync for Lowered
impl Unpin for Lowered
impl UnsafeUnpin for Lowered
impl UnwindSafe for Lowered
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