Skip to content

Commit 737e301

Browse files
committed
Adjust compiler for HashMap::get_many_mut stabilization
1 parent 885278b commit 737e301

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

compiler/rustc_session/src/config/cfg.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ impl CheckCfg {
410410
}
411411

412412
if self.exhaustive_values {
413+
#[cfg(not(bootstrap))]
414+
let values = self.expecteds.get_disjoint_mut(VALUES);
415+
#[cfg(bootstrap)]
416+
let values = self.expecteds.get_many_mut(VALUES);
417+
413418
// Get all values map at once otherwise it would be costly.
414419
// (8 values * 220 targets ~= 1760 times, at the time of writing this comment).
415420
let [
@@ -421,7 +426,7 @@ impl CheckCfg {
421426
Some(values_target_os),
422427
Some(values_target_pointer_width),
423428
Some(values_target_vendor),
424-
] = self.expecteds.get_many_mut(VALUES)
429+
] = values
425430
else {
426431
panic!("unable to get all the check-cfg values buckets");
427432
};

compiler/rustc_session/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
3+
#![cfg_attr(bootstrap, feature(map_many_mut))]
34
#![feature(iter_intersperse)]
45
#![feature(let_chains)]
5-
#![feature(map_many_mut)]
66
#![feature(rustc_attrs)]
77
#![warn(unreachable_pub)]
88
// tidy-alphabetical-end

0 commit comments

Comments
 (0)