From 154eba64b9e845f58ab4214cfcb6f202dfa5c210 Mon Sep 17 00:00:00 2001 From: lcnr <rust@lcnr.de> Date: Fri, 3 Jun 2022 19:34:24 +0200 Subject: [PATCH] publicly export `ty::subst` in `ty` it feels arbitrary to have `Ty` and `Const` directly in that module and to not have `GenericArg` and `GenericArgKind` there. Writing `ty::GenericArg` can also feel clearer than importing it. Using `ty::subst::GenericArg` however is ugly. --- compiler/rustc_middle/src/ty/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 48ac7ecdf05..7f0f3755c4b 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -22,7 +22,6 @@ use crate::mir::{Body, GeneratorLayout}; use crate::traits::{self, Reveal}; use crate::ty; use crate::ty::fast_reject::SimplifiedType; -use crate::ty::subst::{GenericArg, InternalSubsts, Subst, SubstsRef}; use crate::ty::util::Discr; pub use adt::*; pub use assoc::*; @@ -44,6 +43,7 @@ use rustc_session::cstore::CrateStoreDyn; use rustc_span::symbol::{kw, sym, Ident, Symbol}; use rustc_span::Span; use rustc_target::abi::Align; +pub use subst::*; pub use vtable::*; use std::fmt::Debug;