Skip to content

Commit bb7bd9c

Browse files
committed
Fixup things for perf run
1 parent 1d448af commit bb7bd9c

File tree

10 files changed

+86
-70
lines changed

10 files changed

+86
-70
lines changed

Cargo.lock

+15-8
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ dependencies = [
13761376
"fluent-syntax",
13771377
"intl-memoizer",
13781378
"intl_pluralrules",
1379-
"rustc-hash",
1379+
"rustc-hash 1.1.0",
13801380
"self_cell 0.10.3",
13811381
"smallvec",
13821382
"unic-langid",
@@ -2077,7 +2077,7 @@ dependencies = [
20772077
"anyhow",
20782078
"clap",
20792079
"fs-err",
2080-
"rustc-hash",
2080+
"rustc-hash 1.1.0",
20812081
"rustdoc-json-types",
20822082
"serde",
20832083
"serde_json",
@@ -2409,7 +2409,7 @@ dependencies = [
24092409
"memmap2",
24102410
"parking_lot",
24112411
"perf-event-open-sys",
2412-
"rustc-hash",
2412+
"rustc-hash 1.1.0",
24132413
"smallvec",
24142414
]
24152415

@@ -3019,7 +3019,7 @@ checksum = "c4e8e505342045d397d0b6674dcb82d6faf5cf40484d30eeb88fc82ef14e903f"
30193019
dependencies = [
30203020
"datafrog",
30213021
"log",
3022-
"rustc-hash",
3022+
"rustc-hash 1.1.0",
30233023
]
30243024

30253025
[[package]]
@@ -3450,6 +3450,12 @@ version = "1.1.0"
34503450
source = "registry+https://github.com/rust-lang/crates.io-index"
34513451
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
34523452

3453+
[[package]]
3454+
name = "rustc-hash"
3455+
version = "2.0.0"
3456+
source = "registry+https://github.com/rust-lang/crates.io-index"
3457+
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
3458+
34533459
[[package]]
34543460
name = "rustc-main"
34553461
version = "0.0.0"
@@ -3827,6 +3833,7 @@ dependencies = [
38273833
"memmap2",
38283834
"parking_lot",
38293835
"portable-atomic",
3836+
"rustc-hash 2.0.0",
38303837
"rustc-rayon",
38313838
"rustc_arena",
38323839
"rustc_graphviz",
@@ -4514,7 +4521,7 @@ dependencies = [
45144521
name = "rustc_pattern_analysis"
45154522
version = "0.0.0"
45164523
dependencies = [
4517-
"rustc-hash",
4524+
"rustc-hash 1.1.0",
45184525
"rustc_apfloat",
45194526
"rustc_arena",
45204527
"rustc_data_structures",
@@ -4906,7 +4913,7 @@ name = "rustdoc-json-types"
49064913
version = "0.1.0"
49074914
dependencies = [
49084915
"bincode",
4909-
"rustc-hash",
4916+
"rustc-hash 1.1.0",
49104917
"serde",
49114918
"serde_json",
49124919
]
@@ -5634,7 +5641,7 @@ dependencies = [
56345641
"ignore",
56355642
"miropt-test-tools",
56365643
"regex",
5637-
"rustc-hash",
5644+
"rustc-hash 1.1.0",
56385645
"semver",
56395646
"similar",
56405647
"termcolor",
@@ -5888,7 +5895,7 @@ version = "0.5.0"
58885895
source = "registry+https://github.com/rust-lang/crates.io-index"
58895896
checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f"
58905897
dependencies = [
5891-
"rustc-hash",
5898+
"rustc-hash 1.1.0",
58925899
]
58935900

58945901
[[package]]

compiler/rustc_data_structures/Cargo.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ bitflags = "2.4.1"
1010
either = "1.0"
1111
elsa = "=1.7.1"
1212
ena = "0.14.3"
13-
gxhash = "3.4.1"
1413
indexmap = { version = "2.0.0" }
1514
jobserver_crate = { version = "0.1.28", package = "jobserver" }
1615
measureme = "11"
@@ -53,6 +52,12 @@ memmap2 = "0.2.1"
5352
[target.'cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "sparc"))'.dependencies]
5453
portable-atomic = "1.5.1"
5554

55+
[target.'cfg(not(all(target_feature = "sse2", target_feature = "aes")))'.dependencies]
56+
rustc-hash = "2.0.0"
57+
58+
[target.'cfg(all(target_feature = "sse2", target_feature = "aes"))'.dependencies]
59+
gxhash = "3.4.1"
60+
5661
[features]
5762
# tidy-alphabetical-start
5863
rustc_use_parallel_compiler = ["indexmap/rustc-rayon", "rustc-rayon"]
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("cargo::rustc-flags=-Ctarget-cpu=native")
3+
}

compiler/rustc_data_structures/src/gx.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
use std::{
2-
collections::{HashMap, HashSet},
3-
hash::BuildHasherDefault,
4-
};
1+
use std::hash::BuildHasherDefault;
52

6-
// pub use rustc_hash::{GxHashMap, GxHashSet, GxHasher};
3+
#[cfg(not(all(target_feature = "sse2", target_feature = "aes")))]
4+
pub use rustc_hash::{FxHashMap as GxHashMap, FxHashSet as GxHashSet, FxHasher as GxHasher};
75

6+
#[cfg(all(target_feature = "sse2", target_feature = "aes"))]
87
pub use gxhash::GxHasher;
98

109
pub type StdEntry<'a, K, V> = std::collections::hash_map::Entry<'a, K, V>;
1110

12-
pub type GxHashMap<K, V> = HashMap<K, V, BuildHasherDefault<GxHasher>>;
13-
pub type GxHashSet<T> = HashSet<T, BuildHasherDefault<GxHasher>>;
11+
#[cfg(all(target_feature = "sse2", target_feature = "aes"))]
12+
pub type GxHashMap<K, V> = std::collections::HashMap<K, V, BuildHasherDefault<GxHasher>>;
13+
#[cfg(all(target_feature = "sse2", target_feature = "aes"))]
14+
pub type GxHashSet<T> = std::collections::HashSet<T, BuildHasherDefault<GxHasher>>;
1415

1516
pub type GxIndexMap<K, V> = indexmap::IndexMap<K, V, BuildHasherDefault<GxHasher>>;
1617
pub type GxIndexSet<V> = indexmap::IndexSet<V, BuildHasherDefault<GxHasher>>;

compiler/rustc_hir_typeck/src/method/suggest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2907,7 +2907,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
29072907
ty::Adt(def, _) => Some(def.did()),
29082908
_ => None,
29092909
})
2910-
.collect::<FxIndexSet<_>>();
2910+
.collect::<GxIndexSet<_>>();
29112911
let mut foreign_spans: MultiSpan = foreign_def_ids
29122912
.iter()
29132913
.filter_map(|def_id| {

tests/ui/generic-associated-types/self-outlives-lint.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,6 @@ LL | type Bar<'b>;
108108
= note: this bound is currently required to ensure that impls have maximum flexibility
109109
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
110110

111-
error: missing required bound on `Iterator`
112-
--> $DIR/self-outlives-lint.rs:142:5
113-
|
114-
LL | type Iterator<'a>: Iterator<Item = Self::Item<'a>>;
115-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
116-
| |
117-
| help: add the required where clause: `where Self: 'a`
118-
|
119-
= note: this bound is currently required to ensure that impls have maximum flexibility
120-
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
121-
122111
error: missing required bound on `Item`
123112
--> $DIR/self-outlives-lint.rs:140:5
124113
|
@@ -130,6 +119,17 @@ LL | type Item<'a>;
130119
= note: this bound is currently required to ensure that impls have maximum flexibility
131120
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
132121

122+
error: missing required bound on `Iterator`
123+
--> $DIR/self-outlives-lint.rs:142:5
124+
|
125+
LL | type Iterator<'a>: Iterator<Item = Self::Item<'a>>;
126+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
127+
| |
128+
| help: add the required where clause: `where Self: 'a`
129+
|
130+
= note: this bound is currently required to ensure that impls have maximum flexibility
131+
= note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
132+
133133
error: missing required bound on `Item`
134134
--> $DIR/self-outlives-lint.rs:148:5
135135
|

tests/ui/lint/unused/unused-macro-rules-compile-error.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ note: the lint level is defined here
1010
LL | #![deny(unused_macro_rules)]
1111
| ^^^^^^^^^^^^^^^^^^
1212

13-
error: rule #3 of macro `num2` is never used
14-
--> $DIR/unused-macro-rules-compile-error.rs:22:5
15-
|
16-
LL | (two_) => { compile_error! };
17-
| ^^^^^^
18-
1913
error: rule #2 of macro `num2` is never used
2014
--> $DIR/unused-macro-rules-compile-error.rs:20:5
2115
|
2216
LL | (two) => { fn compile_error() {} };
2317
| ^^^^^
2418

19+
error: rule #3 of macro `num2` is never used
20+
--> $DIR/unused-macro-rules-compile-error.rs:22:5
21+
|
22+
LL | (two_) => { compile_error! };
23+
| ^^^^^^
24+
2525
error: aborting due to 3 previous errors
2626

tests/ui/lint/unused/unused-macro-rules-decl.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
error: rule #4 of macro `num` is never used
2-
--> $DIR/unused-macro-rules-decl.rs:11:5
1+
error: rule #2 of macro `num` is never used
2+
--> $DIR/unused-macro-rules-decl.rs:9:5
33
|
4-
LL | (four) => { 4 },
5-
| ^^^^^^
4+
LL | (two) => { 2 },
5+
| ^^^^^
66
|
77
note: the lint level is defined here
88
--> $DIR/unused-macro-rules-decl.rs:2:9
99
|
1010
LL | #![deny(unused_macro_rules)]
1111
| ^^^^^^^^^^^^^^^^^^
1212

13-
error: rule #2 of macro `num` is never used
14-
--> $DIR/unused-macro-rules-decl.rs:9:5
13+
error: rule #4 of macro `num` is never used
14+
--> $DIR/unused-macro-rules-decl.rs:11:5
1515
|
16-
LL | (two) => { 2 },
17-
| ^^^^^
16+
LL | (four) => { 4 },
17+
| ^^^^^^
1818

1919
error: rule #3 of macro `num_rec` is never used
2020
--> $DIR/unused-macro-rules-decl.rs:31:5

tests/ui/lint/unused/unused-macro-rules.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
error: rule #4 of macro `num` is never used
2-
--> $DIR/unused-macro-rules.rs:10:5
1+
error: rule #2 of macro `num` is never used
2+
--> $DIR/unused-macro-rules.rs:8:5
33
|
4-
LL | (four) => { 4 };
5-
| ^^^^^^
4+
LL | (two) => { 2 };
5+
| ^^^^^
66
|
77
note: the lint level is defined here
88
--> $DIR/unused-macro-rules.rs:1:9
99
|
1010
LL | #![deny(unused_macro_rules)]
1111
| ^^^^^^^^^^^^^^^^^^
1212

13-
error: rule #2 of macro `num` is never used
14-
--> $DIR/unused-macro-rules.rs:8:5
13+
error: rule #4 of macro `num` is never used
14+
--> $DIR/unused-macro-rules.rs:10:5
1515
|
16-
LL | (two) => { 2 };
17-
| ^^^^^
16+
LL | (four) => { 4 };
17+
| ^^^^^^
1818

1919
error: rule #3 of macro `num_rec` is never used
2020
--> $DIR/unused-macro-rules.rs:30:5

0 commit comments

Comments
 (0)