Update crates/hir_def/src/nameres/collector.rs

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
brandondong 2021-03-15 11:16:58 -07:00 committed by GitHub
parent 2df637f419
commit ebb10da563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1486,7 +1486,7 @@ impl ModCollector<'_, '_> {
self.def_collector.def_map.diagnostics.push(DefDiagnostic::macro_error(
self.module_id,
MacroCallKind::FnLike(ast_id.ast_id),
error.map(|e| e.to_string()).unwrap_or_else(|| String::from("macro error")),
error.unwrap().to_string(),
));
return;
}