use std::rc::Rc; // The type for labels throughout the AST // It owns the data because otherwise lifetimes would make recursive imports impossible #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Label(Rc); impl From for Label { fn from(s: String) -> Self { let s: &str = &s; Label(s.into()) } } impl<'a> From<&'a str> for Label { fn from(s: &'a str) -> Self { Label(Rc::from(s)) } } impl From