summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_builtin_macros/src/global_allocator.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_builtin_macros/src/global_allocator.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/global_allocator.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/global_allocator.rs b/compiler/rustc_builtin_macros/src/global_allocator.rs
index f0d378d12..577247193 100644
--- a/compiler/rustc_builtin_macros/src/global_allocator.rs
+++ b/compiler/rustc_builtin_macros/src/global_allocator.rs
@@ -1,5 +1,6 @@
use crate::util::check_builtin_macro_attribute;
+use crate::errors;
use rustc_ast::expand::allocator::{
global_fn_name, AllocatorMethod, AllocatorTy, ALLOCATOR_METHODS,
};
@@ -34,7 +35,7 @@ pub fn expand(
{
(item, true, ecx.with_def_site_ctxt(ty.span))
} else {
- ecx.sess.parse_sess.span_diagnostic.span_err(item.span(), "allocators must be statics");
+ ecx.sess.parse_sess.span_diagnostic.emit_err(errors::AllocMustStatics{span: item.span()});
return vec![orig_item];
};