Skip to content

Commit 0057c7d

Browse files
Skip discriminant computation
1 parent a30a5f0 commit 0057c7d

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

Diff for: 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",

Diff for: compiler/rustc_type_ir/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ edition = "2021"
66
[dependencies]
77
# tidy-alphabetical-start
88
bitflags = "1.2.1"
9+
derivative = { git = "https://github.com/compiler-errors/rust-derivative.git", branch = "eq" }
910
rustc_data_structures = { path = "../rustc_data_structures" }
1011
rustc_index = { path = "../rustc_index" }
1112
rustc_macros = { path = "../rustc_macros" }
1213
rustc_serialize = { path = "../rustc_serialize" }
1314
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
14-
derivative = "2.2.0"
1515
# tidy-alphabetical-end

Diff for: compiler/rustc_type_ir/src/const_kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use self::ConstKind::*;
1414

1515
/// Represents a constant in Rust.
1616
#[derive(derivative::Derivative)]
17-
#[derivative(PartialEq(bound = ""), Eq(bound = ""))]
17+
#[derivative(PartialEq(skip_discriminant = "true", bound = ""), Eq(bound = ""))]
1818
pub enum ConstKind<I: Interner> {
1919
/// A const generic parameter.
2020
Param(I::ParamConst),

Diff for: compiler/rustc_type_ir/src/predicate_kind.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{TyDecoder, TyEncoder};
1313
/// A clause is something that can appear in where bounds or be inferred
1414
/// by implied bounds.
1515
#[derive(derivative::Derivative)]
16-
#[derivative(PartialEq(bound = ""), Eq(bound = ""))]
16+
#[derivative(PartialEq(skip_discriminant = "true", bound = ""), Eq(bound = ""))]
1717
pub enum ClauseKind<I: Interner> {
1818
/// Corresponds to `where Foo: Bar<A, B, C>`. `Foo` here would be
1919
/// the `Self` type of the trait reference and `A`, `B`, and `C`
@@ -235,7 +235,7 @@ where
235235
}
236236

237237
#[derive(derivative::Derivative)]
238-
#[derivative(PartialEq(bound = ""), Eq(bound = ""))]
238+
#[derivative(PartialEq(skip_discriminant = "true", bound = ""), Eq(bound = ""))]
239239
pub enum PredicateKind<I: Interner> {
240240
/// Prove a clause
241241
Clause(ClauseKind<I>),

Diff for: compiler/rustc_type_ir/src/ty_kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub enum AliasKind {
115115
/// converted to this representation using `AstConv::ast_ty_to_ty`.
116116
#[rustc_diagnostic_item = "IrTyKind"]
117117
#[derive(derivative::Derivative)]
118-
#[derivative(PartialEq(bound = ""), Eq(bound = ""))]
118+
#[derivative(PartialEq(skip_discriminant = "true", bound = ""), Eq(bound = ""))]
119119
pub enum TyKind<I: Interner> {
120120
/// The primitive boolean type. Written as `bool`.
121121
Bool,

Diff for: 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)