Skip to content

Commit a21f686

Browse files
committed
Adjust some comments on individual use declarations.
When we do the big `use` reformatting there are a tiny number of cases where rustfmt moves a comment from one `use` item to another in an undesirable way. This commit pre-emptively rearranges things to prevent this from happening.
1 parent 890657f commit a21f686

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_data_structures/src/sip128.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//! This is a copy of `core::hash::sip` adapted to providing 128 bit hashes.
22
3-
// This code is very hot and uses lots of arithmetic, avoid overflow checks for performance.
4-
// See https://github.com./rust-lang/rust/pull/119440#issuecomment-1874255727
5-
use rustc_serialize::int_overflow::{DebugStrictAdd, DebugStrictSub};
63
use std::hash::Hasher;
74
use std::mem::{self, MaybeUninit};
85
use std::ptr;
96

7+
// This code is very hot and uses lots of arithmetic, avoid overflow checks for performance.
8+
// See https://github.com./rust-lang/rust/pull/119440#issuecomment-1874255727
9+
use rustc_serialize::int_overflow::{DebugStrictAdd, DebugStrictSub};
10+
1011
#[cfg(test)]
1112
mod tests;
1213

library/alloc/src/testing/crash_test.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// We avoid relying on anything else in the crate, apart from the `Debug` trait.
2-
use crate::fmt::Debug;
1+
use crate::fmt::Debug; // the `Debug` trait is the only thing we use from `crate::fmt`
32
use std::cmp::Ordering;
43
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
54

0 commit comments

Comments
 (0)