Refine codegen error positions.

This commit is contained in:
Stephen Chung
2021-02-26 20:00:25 +08:00
parent 37fe14ba16
commit 33fa57d95b
9 changed files with 36 additions and 24 deletions

View File

@@ -217,7 +217,7 @@ impl Module {
pub fn exported_name(&self) -> Cow<str> {
if !self.params.name.is_empty() {
self.params.name.as_str().into()
(&self.params.name).into()
} else {
self.module_name().to_string().into()
}