forked from Orchid/orchid
Converted Interner to work with Rc-s
- Interner no longer contains unsafe code - Tokens now hold a reference to the value they represent directly This will enable many future improvements
This commit is contained in:
@@ -21,21 +21,23 @@ impl ProjectError for NotExported {
|
||||
fn description(&self) -> &str {
|
||||
"An import refers to a symbol that exists but isn't exported"
|
||||
}
|
||||
fn positions(&self, i: &Interner) -> BoxedIter<ErrorPosition> {
|
||||
fn positions(&self) -> BoxedIter<ErrorPosition> {
|
||||
Box::new(
|
||||
[
|
||||
ErrorPosition {
|
||||
location: Location::File(Rc::new(i.extern_all(&self.file))),
|
||||
location: Location::File(Rc::new(Interner::extern_all(&self.file))),
|
||||
message: Some(format!(
|
||||
"{} isn't exported",
|
||||
i.extern_all(&self.subpath).join("::")
|
||||
Interner::extern_all(&self.subpath).join("::")
|
||||
)),
|
||||
},
|
||||
ErrorPosition {
|
||||
location: Location::File(Rc::new(i.extern_all(&self.referrer_file))),
|
||||
location: Location::File(Rc::new(Interner::extern_all(
|
||||
&self.referrer_file,
|
||||
))),
|
||||
message: Some(format!(
|
||||
"{} cannot see this symbol",
|
||||
i.extern_all(&self.referrer_subpath).join("::")
|
||||
Interner::extern_all(&self.referrer_subpath).join("::")
|
||||
)),
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user