1
Fork 0

compiler: start using rustc_ast_lowering in rustc_passes

This commit is contained in:
Jubilee Young 2025-02-05 11:18:18 -08:00
parent 3f50076fb3
commit 90c50f0164
5 changed files with 8 additions and 5 deletions

View file

@ -7,6 +7,7 @@ edition = "2021"
# tidy-alphabetical-start
rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" }
rustc_ast_lowering = { path = "../rustc_ast_lowering" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
rustc_data_structures = { path = "../rustc_data_structures" }

View file

@ -4,6 +4,7 @@
use std::mem::replace;
use std::num::NonZero;
use rustc_ast_lowering::stability::extern_abi_stability;
use rustc_attr_parsing::{
self as attr, ConstStability, DeprecatedSince, Stability, StabilityLevel, StableSince,
UnstableReason, VERSION_PLACEHOLDER,
@ -1027,8 +1028,8 @@ impl<'tcx> Visitor<'tcx> for CheckTraitImplStable<'tcx> {
if let TyKind::Never = t.kind {
self.fully_stable = false;
}
if let TyKind::BareFn(f) = t.kind {
if rustc_target::spec::abi::is_stable(f.abi.name()).is_err() {
if let TyKind::BareFn(function) = t.kind {
if extern_abi_stability(function.abi).is_err() {
self.fully_stable = false;
}
}