Skip to content

Commit 27710d2

Browse files
authored
Rollup merge of #66820 - dtolnay:fmt3, r=Dylan-DPC
Format libstd with rustfmt (Same strategy as #66691.) This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd *that are not involved in any currently open PR* to minimize merge conflicts, and are not part of libstd/os (#66818) or libstd/sys (#66819). The list of files involved in open PRs was determined by querying GitHub's GraphQL API [with this script](https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8). With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libstd. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
2 parents 77b5a05 + 9ad0850 commit 27710d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2899
-2662
lines changed

src/libstd/ascii.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#![stable(feature = "rust1", since = "1.0.0")]
1818

1919
#[stable(feature = "rust1", since = "1.0.0")]
20-
pub use core::ascii::{EscapeDefault, escape_default};
20+
pub use core::ascii::{escape_default, EscapeDefault};
2121

2222
/// Extension methods for ASCII-subset only operations.
2323
///

src/libstd/backtrace.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ use crate::env;
9595
use crate::fmt;
9696
use crate::sync::atomic::{AtomicUsize, Ordering::SeqCst};
9797
use crate::sync::Mutex;
98-
use crate::sys_common::backtrace::{output_filename, lock};
98+
use crate::sys_common::backtrace::{lock, output_filename};
9999
use crate::vec::Vec;
100-
use backtrace_rs as backtrace;
101100
use backtrace::BytesOrWideString;
101+
use backtrace_rs as backtrace;
102102

103103
/// A captured OS thread stack backtrace.
104104
///

src/libstd/benches/hash/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![cfg(test)]
22

3-
use test::Bencher;
43
use std::collections::HashMap;
4+
use test::Bencher;
55

66
#[bench]
77
fn new_drop(b: &mut Bencher) {

src/libstd/collections/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -413,20 +413,20 @@
413413
#[doc(hidden)]
414414
pub use crate::ops::Bound;
415415
#[stable(feature = "rust1", since = "1.0.0")]
416-
pub use alloc_crate::collections::{BinaryHeap, BTreeMap, BTreeSet};
417-
#[stable(feature = "rust1", since = "1.0.0")]
418-
pub use alloc_crate::collections::{LinkedList, VecDeque};
419-
#[stable(feature = "rust1", since = "1.0.0")]
420416
pub use alloc_crate::collections::{binary_heap, btree_map, btree_set};
421417
#[stable(feature = "rust1", since = "1.0.0")]
422418
pub use alloc_crate::collections::{linked_list, vec_deque};
419+
#[stable(feature = "rust1", since = "1.0.0")]
420+
pub use alloc_crate::collections::{BTreeMap, BTreeSet, BinaryHeap};
421+
#[stable(feature = "rust1", since = "1.0.0")]
422+
pub use alloc_crate::collections::{LinkedList, VecDeque};
423423

424424
#[stable(feature = "rust1", since = "1.0.0")]
425425
pub use self::hash_map::HashMap;
426426
#[stable(feature = "rust1", since = "1.0.0")]
427427
pub use self::hash_set::HashSet;
428428

429-
#[unstable(feature = "try_reserve", reason = "new API", issue="48043")]
429+
#[unstable(feature = "try_reserve", reason = "new API", issue = "48043")]
430430
pub use alloc_crate::collections::TryReserveError;
431431

432432
mod hash;

0 commit comments

Comments
 (0)