diff options
| author | Michael Goulet <michael@errs.io> | 2023-11-04 16:49:20 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-11-21 17:49:56 +0000 |
| commit | f26e8ff3ac2319b23bc23ba4154e2de49de98a1e (patch) | |
| tree | 8acc69573a5c6ca638cda9718c95f10de1553e0b | |
| parent | 0ff861096449f47956521b40e5e4e88caa7fe27c (diff) | |
| download | rust-f26e8ff3ac2319b23bc23ba4154e2de49de98a1e.tar.gz rust-f26e8ff3ac2319b23bc23ba4154e2de49de98a1e.zip | |
Uplift BoundVar
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_type_ir/src/lib.rs | 7 |
3 files changed, 9 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 2436daf62cf..78c8c1b588e 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -94,7 +94,7 @@ pub use self::parameterized::ParameterizedOverTcx; pub use self::rvalue_scopes::RvalueScopes; pub use self::sty::BoundRegionKind::*; pub use self::sty::{ - AliasTy, Article, Binder, BoundRegion, BoundRegionKind, BoundTy, BoundTyKind, BoundVar, + AliasTy, Article, Binder, BoundRegion, BoundRegionKind, BoundTy, BoundTyKind, BoundVariableKind, CanonicalPolyFnSig, ClauseKind, ClosureArgs, ClosureArgsParts, ConstKind, CoroutineArgs, CoroutineArgsParts, EarlyParamRegion, ExistentialPredicate, ExistentialProjection, ExistentialTraitRef, FnSig, GenSig, InlineConstArgs, diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index ea0e179c00d..9c5b5b69c82 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -32,6 +32,7 @@ use std::fmt; use std::ops::{ControlFlow, Deref, Range}; use ty::util::IntTypeExt; +use rustc_type_ir::BoundVar; use rustc_type_ir::ClauseKind as IrClauseKind; use rustc_type_ir::CollectAndApply; use rustc_type_ir::ConstKind as IrConstKind; @@ -1621,12 +1622,6 @@ impl Atom for RegionVid { } } -rustc_index::newtype_index! { - #[derive(HashStable)] - #[debug_format = "{}"] - pub struct BoundVar {} -} - #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, TyEncodable, TyDecodable)] #[derive(HashStable)] pub struct BoundTy { diff --git a/compiler/rustc_type_ir/src/lib.rs b/compiler/rustc_type_ir/src/lib.rs index acea7aa46f6..d293a9341fe 100644 --- a/compiler/rustc_type_ir/src/lib.rs +++ b/compiler/rustc_type_ir/src/lib.rs @@ -332,3 +332,10 @@ impl UniverseIndex { self.private < other.private } } + +rustc_index::newtype_index! { + #[cfg_attr(feature = "nightly", derive(HashStable_NoContext))] + #[debug_format = "{}"] + #[gate_rustc_only] + pub struct BoundVar {} +} |
