1
Fork 0

Remove rustc_transmute's dependence on rustc_macros.

This commit is contained in:
Nicholas Nethercote 2025-02-28 16:38:07 +11:00
parent 5f58985f5d
commit 43e017fd01
3 changed files with 1 additions and 5 deletions

View file

@ -4500,7 +4500,6 @@ dependencies = [
"rustc_abi", "rustc_abi",
"rustc_data_structures", "rustc_data_structures",
"rustc_hir", "rustc_hir",
"rustc_macros",
"rustc_middle", "rustc_middle",
"rustc_span", "rustc_span",
"tracing", "tracing",

View file

@ -8,7 +8,6 @@ edition = "2024"
rustc_abi = { path = "../rustc_abi", optional = true } rustc_abi = { path = "../rustc_abi", optional = true }
rustc_data_structures = { path = "../rustc_data_structures" } rustc_data_structures = { path = "../rustc_data_structures" }
rustc_hir = { path = "../rustc_hir", optional = true } rustc_hir = { path = "../rustc_hir", optional = true }
rustc_macros = { path = "../rustc_macros", optional = true }
rustc_middle = { path = "../rustc_middle", optional = true } rustc_middle = { path = "../rustc_middle", optional = true }
rustc_span = { path = "../rustc_span", optional = true } rustc_span = { path = "../rustc_span", optional = true }
tracing = "0.1" tracing = "0.1"
@ -18,7 +17,6 @@ tracing = "0.1"
rustc = [ rustc = [
"dep:rustc_abi", "dep:rustc_abi",
"dep:rustc_hir", "dep:rustc_hir",
"dep:rustc_macros",
"dep:rustc_middle", "dep:rustc_middle",
"dep:rustc_span", "dep:rustc_span",
] ]

View file

@ -81,14 +81,13 @@ pub enum Reason<T> {
#[cfg(feature = "rustc")] #[cfg(feature = "rustc")]
mod rustc { mod rustc {
use rustc_hir::lang_items::LangItem; use rustc_hir::lang_items::LangItem;
use rustc_macros::TypeVisitable;
use rustc_middle::traits::ObligationCause; use rustc_middle::traits::ObligationCause;
use rustc_middle::ty::{Const, ParamEnv, Ty, TyCtxt}; use rustc_middle::ty::{Const, ParamEnv, Ty, TyCtxt};
use super::*; use super::*;
/// The source and destination types of a transmutation. /// The source and destination types of a transmutation.
#[derive(TypeVisitable, Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub struct Types<'tcx> { pub struct Types<'tcx> {
/// The source type. /// The source type.
pub src: Ty<'tcx>, pub src: Ty<'tcx>,