diff --git a/src/error.rs b/src/error.rs index 7eebd243c4..2a0bcd9bd5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -278,8 +278,19 @@ impl ErrorMessage { None => (Span::call_site(), Span::call_site()), }; - // compile_error!($message) + // core::compile_error!($message) TokenStream::from_iter(vec![ + TokenTree::Ident(Ident::new("core", start)), + TokenTree::Punct({ + let mut punct = Punct::new(':', Spacing::Joint); + punct.set_span(start); + punct + }), + TokenTree::Punct({ + let mut punct = Punct::new(':', Spacing::Alone); + punct.set_span(start); + punct + }), TokenTree::Ident(Ident::new("compile_error", start)), TokenTree::Punct({ let mut punct = Punct::new('!', Spacing::Alone);