Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the UnifyKey and UnifyValue imports non-nightly #139426

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4581,6 +4581,7 @@ version = "0.0.0"
dependencies = [
"bitflags",
"derive-where",
"ena",
"indexmap",
"rustc-hash 1.1.0",
"rustc_ast_ir",
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_type_ir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2024"
# tidy-alphabetical-start
bitflags = "2.4.1"
derive-where = "1.2.7"
ena = "0.14.3"
indexmap = "2.0.0"
rustc-hash = "1.1.0"
rustc_ast_ir = { path = "../rustc_ast_ir", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_type_ir/src/data_structures/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::hash::BuildHasherDefault;

pub use ena::unify::{NoError, UnifyKey, UnifyValue};
use rustc_hash::FxHasher;
pub use rustc_hash::{FxHashMap as HashMap, FxHashSet as HashSet};

Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_type_ir/src/ty_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ use rustc_ast_ir::Mutability;
#[cfg(feature = "nightly")]
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
#[cfg(feature = "nightly")]
use rustc_data_structures::unify::{NoError, UnifyKey, UnifyValue};
#[cfg(feature = "nightly")]
use rustc_macros::{Decodable_NoContext, Encodable_NoContext, HashStable_NoContext};
use rustc_type_ir::data_structures::{NoError, UnifyKey, UnifyValue};
use rustc_type_ir_macros::{Lift_Generic, TypeFoldable_Generic, TypeVisitable_Generic};

use self::TyKind::*;
Expand Down Expand Up @@ -796,7 +795,6 @@ pub enum InferTy {

/// Raw `TyVid` are used as the unification key for `sub_relations`;
/// they carry no values.
#[cfg(feature = "nightly")]
impl UnifyKey for TyVid {
type Value = ();
#[inline]
Expand All @@ -812,7 +810,6 @@ impl UnifyKey for TyVid {
}
}

#[cfg(feature = "nightly")]
impl UnifyValue for IntVarValue {
type Error = NoError;

Expand All @@ -832,7 +829,6 @@ impl UnifyValue for IntVarValue {
}
}

#[cfg(feature = "nightly")]
impl UnifyKey for IntVid {
type Value = IntVarValue;
#[inline] // make this function eligible for inlining - it is quite hot.
Expand All @@ -848,7 +844,6 @@ impl UnifyKey for IntVid {
}
}

#[cfg(feature = "nightly")]
impl UnifyValue for FloatVarValue {
type Error = NoError;

Expand All @@ -866,7 +861,6 @@ impl UnifyValue for FloatVarValue {
}
}

#[cfg(feature = "nightly")]
impl UnifyKey for FloatVid {
type Value = FloatVarValue;
#[inline]
Expand Down
Loading