Move some functions from rustc_expand to rustc_builtin_macros.

These functions are only used in `rustc_builtin_macros`, so it makes
sense for them to live there. This allows them to be changed from `pub`
to `pub(crate)`.
This commit is contained in:
Nicholas Nethercote
2024-04-26 08:44:23 +10:00
parent e2d2b1c698
commit 8dc84fa7d1
14 changed files with 234 additions and 237 deletions

View File

@@ -1,11 +1,10 @@
use crate::errors;
use crate::util::get_exprs_from_tts;
use rustc_ast::{ptr::P, token, tokenstream::TokenStream, ExprKind, LitIntType, LitKind, UintTy};
use rustc_expand::base::get_exprs_from_tts;
use rustc_expand::base::{DummyResult, ExpandResult, ExtCtxt, MacEager, MacroExpanderResult};
use rustc_session::errors::report_lit_error;
use rustc_span::{ErrorGuaranteed, Span};
use crate::errors;
/// Emits errors for literal expressions that are invalid inside and outside of an array.
fn invalid_type_err(
cx: &ExtCtxt<'_>,