Skip to content

Commit 78bf0f9

Browse files
Skip discriminant computation
1 parent 4843835 commit 78bf0f9

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

Cargo.lock

+1-2
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,7 @@ dependencies = [
10141014
[[package]]
10151015
name = "derivative"
10161016
version = "2.2.0"
1017-
source = "registry+https://github.com/rust-lang/crates.io-index"
1018-
checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
1017+
source = "git+https://github.com/compiler-errors/rust-derivative.git?branch=eq#d1f5d08ebcec06f0acea2957efba632b7ddf8666"
10191018
dependencies = [
10201019
"proc-macro2",
10211020
"quote",

compiler/rustc_type_ir/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66
[dependencies]
77
# tidy-alphabetical-start
88
bitflags = "1.2.1"
9-
derivative = "2.2.0"
9+
derivative = { git = "https://github.com/compiler-errors/rust-derivative.git", branch = "eq" }
1010
rustc_data_structures = { path = "../rustc_data_structures" }
1111
rustc_index = { path = "../rustc_index" }
1212
rustc_macros = { path = "../rustc_macros" }

compiler/rustc_type_ir/src/const_kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use self::ConstKind::*;
1919
Ord(bound = ""),
2020
Ord = "feature_allow_slow_enum",
2121
Hash(bound = ""),
22-
PartialEq(bound = ""),
22+
PartialEq(skip_discriminant = "true", bound = ""),
2323
Eq(bound = "")
2424
)]
2525
pub enum ConstKind<I: Interner> {

compiler/rustc_type_ir/src/predicate_kind.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ use crate::{TyDecoder, TyEncoder};
1212
/// A clause is something that can appear in where bounds or be inferred
1313
/// by implied bounds.
1414
#[derive(derivative::Derivative)]
15-
#[derivative(Clone(bound = ""), Hash(bound = ""), PartialEq(bound = ""), Eq(bound = ""))]
15+
#[derivative(
16+
Clone(bound = ""),
17+
Hash(bound = ""),
18+
PartialEq(skip_discriminant = "true", bound = ""),
19+
Eq(bound = "")
20+
)]
1621
pub enum ClauseKind<I: Interner> {
1722
/// Corresponds to `where Foo: Bar<A, B, C>`. `Foo` here would be
1823
/// the `Self` type of the trait reference and `A`, `B`, and `C`
@@ -202,7 +207,7 @@ where
202207
}
203208

204209
#[derive(derivative::Derivative)]
205-
#[derivative(Clone(bound = ""), Hash(bound = ""), PartialEq(bound = ""), Eq(bound = ""))]
210+
#[derivative(Clone(bound = ""), Hash(bound = ""), PartialEq(skip_discriminant = "true", , bound = ""), Eq(bound = ""))]
206211
pub enum PredicateKind<I: Interner> {
207212
/// Prove a clause
208213
Clause(ClauseKind<I>),

compiler/rustc_type_ir/src/ty_kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ pub enum AliasKind {
121121
Ord(bound = ""),
122122
Ord = "feature_allow_slow_enum",
123123
Hash(bound = ""),
124-
PartialEq(bound = ""),
124+
PartialEq(skip_discriminant = "true", bound = ""),
125125
Eq(bound = "")
126126
)]
127127
pub enum TyKind<I: Interner> {

src/tools/tidy/src/extdeps.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ use std::fs;
44
use std::path::Path;
55

66
/// List of allowed sources for packages.
7-
const ALLOWED_SOURCES: &[&str] = &["\"registry+https://github.com/rust-lang/crates.io-index\""];
7+
const ALLOWED_SOURCES: &[&str] = &[
8+
"\"registry+https://github.com/rust-lang/crates.io-index\"",
9+
"\"git+https://github.com/compiler-errors/rust-derivative.git?branch=eq#d1f5d08ebcec06f0acea2957efba632b7ddf8666\"",
10+
];
811

912
/// Checks for external package sources. `root` is the path to the directory that contains the
1013
/// workspace `Cargo.toml`.

0 commit comments

Comments
 (0)