1
Fork 0

compiler: Switch to rustc_abi in hir_pretty, lint_defs, and mir_build

Completely abandon usage of rustc_target in these crates, as
they need no special knowledge of rustc's target tuples.
This commit is contained in:
Jubilee Young 2024-10-30 21:57:40 -07:00
parent eca17022ef
commit 8a0e64078e
15 changed files with 23 additions and 23 deletions

View file

@ -5,9 +5,9 @@ edition = "2021"
[dependencies]
# tidy-alphabetical-start
rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_hir = { path = "../rustc_hir" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
# tidy-alphabetical-end

View file

@ -9,6 +9,7 @@
use std::cell::Cell;
use std::vec;
use rustc_abi::ExternAbi;
use rustc_ast::util::parser::{self, AssocOp, Fixity};
use rustc_ast_pretty::pp::Breaks::{Consistent, Inconsistent};
use rustc_ast_pretty::pp::{self, Breaks};
@ -20,7 +21,6 @@ use rustc_hir::{
use rustc_span::FileName;
use rustc_span::source_map::SourceMap;
use rustc_span::symbol::{Ident, Symbol, kw};
use rustc_target::spec::abi::Abi;
use {rustc_ast as ast, rustc_hir as hir};
pub fn id_to_string(map: &dyn rustc_hir::intravisit::Map<'_>, hir_id: HirId) -> String {
@ -2240,7 +2240,7 @@ impl<'a> State<'a> {
fn print_ty_fn(
&mut self,
abi: Abi,
abi: ExternAbi,
safety: hir::Safety,
decl: &hir::FnDecl<'_>,
name: Option<Symbol>,
@ -2276,7 +2276,7 @@ impl<'a> State<'a> {
self.print_safety(header.safety);
if header.abi != Abi::Rust {
if header.abi != ExternAbi::Rust {
self.word_nbsp("extern");
self.word_nbsp(header.abi.to_string());
}