Skip to content

Commit

Permalink
Adjust some comments on individual use declarations.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nnethercote committed Jun 21, 2024
1 parent 890657f commit a21f686
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions compiler/rustc_data_structures/src/sip128.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
//! This is a copy of `core::hash::sip` adapted to providing 128 bit hashes.

// This code is very hot and uses lots of arithmetic, avoid overflow checks for performance.
// See https://github.com/rust-lang/rust/pull/119440#issuecomment-1874255727
use rustc_serialize::int_overflow::{DebugStrictAdd, DebugStrictSub};
use std::hash::Hasher;
use std::mem::{self, MaybeUninit};
use std::ptr;

// This code is very hot and uses lots of arithmetic, avoid overflow checks for performance.
// See https://github.com/rust-lang/rust/pull/119440#issuecomment-1874255727
use rustc_serialize::int_overflow::{DebugStrictAdd, DebugStrictSub};

#[cfg(test)]
mod tests;

Expand Down
3 changes: 1 addition & 2 deletions library/alloc/src/testing/crash_test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// We avoid relying on anything else in the crate, apart from the `Debug` trait.
use crate::fmt::Debug;
use crate::fmt::Debug; // the `Debug` trait is the only thing we use from `crate::fmt`
use std::cmp::Ordering;
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};

Expand Down

0 comments on commit a21f686

Please sign in to comment.