Skip to content

Commit

Permalink
Auto merge of rust-lang#120497 - compiler-errors:modulize, r=lcnr
Browse files Browse the repository at this point in the history
Move predicate, region, and const stuff into their own modules in middle

This PR mostly moves things around, and in a few cases adds some `ty::` to the beginning of names to avoid one-off imports.

I don't mean this to be the most *thorough* move/refactor. I just generally wanted to begin to split up `ty/mod.rs` and `ty/sty.rs` which are huge and hard to distinguish, and have a lot of non-ty stuff in them.

r? lcnr
  • Loading branch information
bors committed Feb 5, 2024
2 parents 4d87c4a + 233b213 commit 991a9dc
Show file tree
Hide file tree
Showing 5 changed files with 1,491 additions and 1,456 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_middle/src/ty/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_hir::def_id::LocalDefId;
use rustc_macros::HashStable;
use rustc_type_ir::ConstKind as IrConstKind;
use rustc_type_ir::{ConstTy, IntoKind, TypeFlags, WithCachedTypeInfo};

mod int;
Expand All @@ -19,7 +20,7 @@ use rustc_span::Span;
use rustc_span::DUMMY_SP;
pub use valtree::*;

use super::sty::ConstKind;
pub type ConstKind<'tcx> = IrConstKind<TyCtxt<'tcx>>;

/// Use this rather than `ConstData`, whenever possible.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, HashStable)]
Expand Down
Loading

0 comments on commit 991a9dc

Please sign in to comment.