Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/nameres/diagnostics.rs')
-rw-r--r--crates/hir-def/src/nameres/diagnostics.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir-def/src/nameres/diagnostics.rs b/crates/hir-def/src/nameres/diagnostics.rs
index b5a302dbca..8c7fdaaf58 100644
--- a/crates/hir-def/src/nameres/diagnostics.rs
+++ b/crates/hir-def/src/nameres/diagnostics.rs
@@ -117,14 +117,11 @@ impl DefDiagnostic {
pub(crate) fn macro_expansion_parse_error(
container: LocalModuleId,
ast: MacroCallKind,
- errors: &[SyntaxError],
+ errors: Box<[SyntaxError]>,
) -> Self {
Self {
in_module: container,
- kind: DefDiagnosticKind::MacroExpansionParseError {
- ast,
- errors: errors.to_vec().into_boxed_slice(),
- },
+ kind: DefDiagnosticKind::MacroExpansionParseError { ast, errors },
}
}