diff options
| author | bors <bors@rust-lang.org> | 2024-08-11 05:54:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-11 05:54:39 +0000 |
| commit | c9bd03cb724e13cca96ad320733046cbdb16fbbe (patch) | |
| tree | cf76b0affb89c687c33b929c4905f25d8adc1b5f /compiler/rustc_data_structures/src | |
| parent | 730d5d4095a264ef5f7c0a0781eea68c15431d45 (diff) | |
| parent | 2c88eb9805c172f436ac3694b7059db5f4748804 (diff) | |
| download | rust-c9bd03cb724e13cca96ad320733046cbdb16fbbe.tar.gz rust-c9bd03cb724e13cca96ad320733046cbdb16fbbe.zip | |
Auto merge of #128959 - matthiaskrgr:rollup-6jdqi3l, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #120314 (core: optimise Debug impl for ascii::Char) - #128536 (Preliminary cleanup of `WitnessPat` hoisting/printing) - #128592 (Promote aarch64-apple-darwin to Tier 1) - #128762 (Use more slice patterns inside the compiler) - #128875 (rm `import.used`) - #128882 (make LocalWaker::will_wake consistent with Waker::will_wake) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/transitive_relation.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/transitive_relation.rs b/compiler/rustc_data_structures/src/transitive_relation.rs index 26b00e0af3a..e81ebb9a4be 100644 --- a/compiler/rustc_data_structures/src/transitive_relation.rs +++ b/compiler/rustc_data_structures/src/transitive_relation.rs @@ -203,9 +203,9 @@ impl<T: Eq + Hash + Copy> TransitiveRelation<T> { /// exists). See `postdom_upper_bound` for details. pub fn mutual_immediate_postdominator(&self, mut mubs: Vec<T>) -> Option<T> { loop { - match mubs.len() { - 0 => return None, - 1 => return Some(mubs[0]), + match mubs[..] { + [] => return None, + [mub] => return Some(mub), _ => { let m = mubs.pop().unwrap(); let n = mubs.pop().unwrap(); |
