Skip to content

Commit 5b1a8bc

Browse files
diliopfacebook-github-bot
authored andcommitted
upgrade to nightly-2025-04-14
Summary: As per the title - to review, the `rustfmt`-specific changes are isolated under `fbsource/tools/third-party/rustfmt` and the rest are codemodded allow-large-files ignore-conflict-markers Reviewed By: capickett Differential Revision: D73041643 fbshipit-source-id: 14092a58e4439d689ff7eea9cfbd9477071809e4
1 parent 736637b commit 5b1a8bc

File tree

302 files changed

+1036
-1017
lines changed

Some content is hidden

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

302 files changed

+1036
-1017
lines changed

allocative/allocative/src/flamegraph.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
* of this source tree.
88
*/
99

10-
use std::collections::hash_map;
1110
use std::collections::HashMap;
1211
use std::collections::HashSet;
12+
use std::collections::hash_map;
1313
use std::fmt::Write as _;
1414
use std::mem;
1515
use std::ops::Index;
1616
use std::ops::IndexMut;
1717

18+
use crate::Allocative;
1819
use crate::global_root::roots;
1920
use crate::key::Key;
2021
use crate::visitor::NodeKind;
2122
use crate::visitor::Visitor;
2223
use crate::visitor::VisitorImpl;
23-
use crate::Allocative;
2424

2525
/// Node in flamegraph tree.
2626
///
@@ -496,11 +496,11 @@ impl VisitorImpl for FlameGraphBuilder {
496496

497497
#[cfg(test)]
498498
mod tests {
499+
use crate::FlameGraph;
499500
use crate::flamegraph::FlameGraphBuilder;
500501
use crate::flamegraph::Tree;
501502
use crate::flamegraph::Trees;
502503
use crate::key::Key;
503-
use crate::FlameGraph;
504504

505505
#[test]
506506
fn test_empty() {

allocative/allocative/src/impls/num_bigint.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ use std::mem;
1414
use num_bigint::BigInt;
1515
use num_bigint::BigUint;
1616

17-
use crate::impls::common::DATA_NAME;
18-
use crate::impls::common::PTR_NAME;
1917
use crate::Allocative;
2018
use crate::Visitor;
19+
use crate::impls::common::DATA_NAME;
20+
use crate::impls::common::PTR_NAME;
2121

2222
impl Allocative for BigInt {
2323
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {

allocative/allocative/src/impls/std/cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use std::cell::OnceCell;
1111
use std::cell::RefCell;
1212
use std::sync::OnceLock;
1313

14-
use crate::impls::common::DATA_NAME;
1514
use crate::Allocative;
1615
use crate::Visitor;
16+
use crate::impls::common::DATA_NAME;
1717

1818
impl<T: Allocative> Allocative for RefCell<T> {
1919
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {

allocative/allocative/src/impls/std/sync.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ use std::alloc::Layout;
1111
use std::mem;
1212
use std::rc;
1313
use std::rc::Rc;
14+
use std::sync::Arc;
15+
use std::sync::Mutex;
16+
use std::sync::RwLock;
17+
use std::sync::Weak;
1418
use std::sync::atomic::AtomicBool;
19+
use std::sync::atomic::AtomicI8;
1520
use std::sync::atomic::AtomicI16;
1621
use std::sync::atomic::AtomicI32;
1722
use std::sync::atomic::AtomicI64;
18-
use std::sync::atomic::AtomicI8;
1923
use std::sync::atomic::AtomicIsize;
24+
use std::sync::atomic::AtomicU8;
2025
use std::sync::atomic::AtomicU16;
2126
use std::sync::atomic::AtomicU32;
2227
use std::sync::atomic::AtomicU64;
23-
use std::sync::atomic::AtomicU8;
2428
use std::sync::atomic::AtomicUsize;
25-
use std::sync::Arc;
26-
use std::sync::Mutex;
27-
use std::sync::RwLock;
28-
use std::sync::Weak;
2929

3030
use crate::allocative_trait::Allocative;
3131
use crate::impls::common::PTR_NAME;
@@ -220,8 +220,8 @@ mod tests {
220220
use std::sync::Arc;
221221

222222
use crate as allocative;
223-
use crate::golden::golden_test;
224223
use crate::Allocative;
224+
use crate::golden::golden_test;
225225

226226
#[derive(Allocative)]
227227
#[repr(align(64))]

allocative/allocative/src/impls/std/unsorted.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ use std::convert::Infallible;
1212
use std::ffi::OsStr;
1313
use std::marker::PhantomData;
1414
use std::mem;
15+
use std::num::NonZeroI8;
1516
use std::num::NonZeroI16;
1617
use std::num::NonZeroI32;
1718
use std::num::NonZeroI64;
18-
use std::num::NonZeroI8;
1919
use std::num::NonZeroIsize;
20+
use std::num::NonZeroU8;
2021
use std::num::NonZeroU16;
2122
use std::num::NonZeroU32;
2223
use std::num::NonZeroU64;
23-
use std::num::NonZeroU8;
2424
use std::num::NonZeroUsize;
2525
use std::path::PathBuf;
2626

allocative/allocative/src/impls/triomphe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ use triomphe::HeaderSlice;
1818
use triomphe::HeaderWithLength;
1919
use triomphe::ThinArc;
2020

21-
use crate::impls::common::PTR_NAME;
2221
use crate::Allocative;
2322
use crate::Key;
2423
use crate::Visitor;
24+
use crate::impls::common::PTR_NAME;
2525

2626
impl<H: Allocative, T: Allocative + ?Sized> Allocative for HeaderSlice<H, T> {
2727
fn visit<'a, 'b: 'a>(&self, visitor: &'a mut Visitor<'b>) {

allocative/allocative/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ mod size_of;
5757
mod test_derive;
5858
mod visitor;
5959

60-
pub use allocative_derive::root;
6160
pub use allocative_derive::Allocative;
61+
pub use allocative_derive::root;
6262

6363
pub use crate::allocative_trait::Allocative;
6464
pub use crate::flamegraph::FlameGraph;
@@ -82,9 +82,9 @@ pub mod __macro_refs {
8282
/// The main use case is manual implementations of [`Allocative`], like so:
8383
///
8484
/// ```
85-
/// use allocative::ident_key;
8685
/// use allocative::Allocative;
8786
/// use allocative::Visitor;
87+
/// use allocative::ident_key;
8888
///
8989
/// struct MyStruct {
9090
/// foo: usize,

allocative/allocative/src/size_of.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* of this source tree.
88
*/
99

10-
use crate::visitor::NodeKind;
11-
use crate::visitor::VisitorImpl;
1210
use crate::Allocative;
1311
use crate::Key;
1412
use crate::Visitor;
13+
use crate::visitor::NodeKind;
14+
use crate::visitor::VisitorImpl;
1515

1616
/// Size of data allocated in unique pointers in the struct.
1717
///

allocative/allocative_derive/src/derive_allocative.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99

1010
use proc_macro2::Ident;
1111
use proc_macro2::Span;
12-
use quote::quote_spanned;
1312
use quote::ToTokens;
14-
use syn::parse::ParseStream;
15-
use syn::spanned::Spanned;
13+
use quote::quote_spanned;
1614
use syn::Attribute;
1715
use syn::Data;
1816
use syn::DataEnum;
@@ -28,6 +26,8 @@ use syn::LitStr;
2826
use syn::Path;
2927
use syn::Token;
3028
use syn::Variant;
29+
use syn::parse::ParseStream;
30+
use syn::spanned::Spanned;
3131

3232
const fn hash(s: &str) -> u64 {
3333
let mut hash = 0xcbf29ce484222325;

gazebo/dupe_derive/src/clone.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
use quote::quote;
11-
use syn::parse_macro_input;
1211
use syn::DeriveInput;
12+
use syn::parse_macro_input;
1313

1414
use crate::util::duplicate_impl;
1515

gazebo/dupe_derive/src/copy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99

1010
use quote::quote;
11-
use syn::parse_macro_input;
1211
use syn::DeriveInput;
12+
use syn::parse_macro_input;
1313

1414
pub fn derive_copy_(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
1515
let input = parse_macro_input!(input as DeriveInput);

gazebo/dupe_derive/src/dupe.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
use proc_macro2::TokenStream;
1111
use quote::quote;
12-
use syn::parse_macro_input;
13-
use syn::parse_quote;
1412
use syn::DeriveInput;
1513
use syn::Ident;
1614
use syn::Type;
1715
use syn::TypeParamBound;
16+
use syn::parse_macro_input;
17+
use syn::parse_quote;
1818

1919
use crate::util::add_trait_bounds;
2020
use crate::util::extract_all_field_tys;

gazebo/dupe_derive/src/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use std::iter;
1212
use proc_macro2::TokenStream;
1313
use quote::quote;
1414
use quote::quote_spanned;
15-
use syn::spanned::Spanned;
1615
use syn::Data;
1716
use syn::DataEnum;
1817
use syn::DataStruct;
@@ -24,6 +23,7 @@ use syn::Index;
2423
use syn::Type;
2524
use syn::TypeParamBound;
2625
use syn::Variant;
26+
use syn::spanned::Spanned;
2727

2828
// Add a bound to every type parameter.
2929
pub(crate) fn add_trait_bounds(mut generics: Generics, bound: &TypeParamBound) -> Generics {

gazebo/gazebo_derive/src/default.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
use proc_macro2::TokenStream;
1111
use quote::quote;
1212
use quote::quote_spanned;
13-
use syn::spanned::Spanned;
1413
use syn::Data;
1514
use syn::DataStruct;
1615
use syn::DeriveInput;
1716
use syn::Fields;
17+
use syn::spanned::Spanned;
1818

1919
pub fn derive_default_(input: DeriveInput) -> proc_macro::TokenStream {
2020
let (impl_generics, ty_generics, where_clause) = input.generics.split_for_impl();

gazebo/gazebo_derive/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#[allow(unused_extern_crates)] // proc_macro is very special
1414
extern crate proc_macro;
1515

16-
use syn::parse_macro_input;
1716
use syn::DeriveInput;
17+
use syn::parse_macro_input;
1818

1919
mod default;
2020
mod variant;

gazebo/gazebo_derive/src/variant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
use proc_macro2::Span;
1111
use quote::quote;
12-
use syn::spanned::Spanned;
1312
use syn::Data;
1413
use syn::DeriveInput;
1514
use syn::Fields;
1615
use syn::Ident;
16+
use syn::spanned::Spanned;
1717

1818
pub(crate) fn derive_variant_names(input: DeriveInput) -> syn::Result<proc_macro::TokenStream> {
1919
if let Data::Enum(data_enum) = input.data {

gazebo/strong_hash_derive/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
use proc_macro::TokenStream;
1111
use quote::quote;
12-
use syn::parse_macro_input;
13-
use syn::spanned::Spanned;
1412
use syn::DeriveInput;
1513
use syn::Fields;
1614
use syn::Ident;
15+
use syn::parse_macro_input;
16+
use syn::spanned::Spanned;
1717

1818
#[proc_macro_derive(StrongHash)]
1919
pub fn derive_hash(input: TokenStream) -> TokenStream {

starlark/src/__derive_refs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
//! `starlark::__derive_refs::foo`.
2323
2424
pub mod serde {
25-
pub use serde::ser::Error;
2625
pub use serde::Serialize;
2726
pub use serde::Serializer;
27+
pub use serde::ser::Error;
2828
}
2929
pub use inventory;
3030
pub mod components;

starlark/src/__derive_refs/param_spec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
use dupe::Dupe;
1919

20+
use crate::typing::ParamSpec;
21+
use crate::typing::Ty;
2022
use crate::typing::callable_param::ParamIsRequired;
2123
use crate::typing::macro_support::unpack_args_item_ty;
2224
use crate::typing::macro_support::unpack_kwargs_value_ty;
23-
use crate::typing::ParamSpec;
24-
use crate::typing::Ty;
2525
use crate::util::arc_str::ArcStr;
2626
use crate::values::FrozenValue;
2727

starlark/src/analysis/dubious.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ use starlark_syntax::syntax::ast::Stmt;
2525
use starlark_syntax::syntax::module::AstModuleFields;
2626
use thiserror::Error;
2727

28+
use crate::analysis::EvalSeverity;
2829
use crate::analysis::types::LintT;
2930
use crate::analysis::types::LintWarning;
30-
use crate::analysis::EvalSeverity;
3131
use crate::codemap::CodeMap;
3232
use crate::codemap::FileSpan;
3333
use crate::codemap::Span;

starlark/src/analysis/flow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ use starlark_syntax::syntax::ast::Stmt;
2626
use starlark_syntax::syntax::module::AstModuleFields;
2727
use thiserror::Error;
2828

29+
use crate::analysis::EvalSeverity;
2930
use crate::analysis::types::LintT;
3031
use crate::analysis::types::LintWarning;
31-
use crate::analysis::EvalSeverity;
3232
use crate::codemap::CodeMap;
3333
use crate::codemap::ResolvedFileSpan;
3434
use crate::codemap::Span;

starlark/src/analysis/incompatible.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ use starlark_syntax::syntax::ast::Stmt;
3232
use starlark_syntax::syntax::module::AstModuleFields;
3333
use thiserror::Error;
3434

35+
use crate::analysis::EvalSeverity;
3536
use crate::analysis::types::LintT;
3637
use crate::analysis::types::LintWarning;
37-
use crate::analysis::EvalSeverity;
3838
use crate::codemap::CodeMap;
3939
use crate::codemap::FileSpan;
4040
use crate::codemap::Span;

starlark/src/analysis/names.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
// But it does as things stand.
2424

2525
use std::cmp;
26-
use std::collections::hash_map::Entry;
2726
use std::collections::HashMap;
2827
use std::collections::HashSet;
28+
use std::collections::hash_map::Entry;
2929
use std::mem;
3030

3131
use dupe::Dupe;
@@ -46,9 +46,9 @@ use starlark_syntax::syntax::ast::Stmt;
4646
use starlark_syntax::syntax::module::AstModuleFields;
4747
use thiserror::Error;
4848

49+
use crate::analysis::EvalSeverity;
4950
use crate::analysis::types::LintT;
5051
use crate::analysis::types::LintWarning;
51-
use crate::analysis::EvalSeverity;
5252
use crate::codemap::CodeMap;
5353
use crate::codemap::Span;
5454
use crate::codemap::Spanned;

starlark/src/analysis/performance.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ use starlark_syntax::syntax::ast::Expr;
2121
use starlark_syntax::syntax::module::AstModuleFields;
2222
use thiserror::Error;
2323

24+
use crate::analysis::EvalSeverity;
2425
use crate::analysis::types::LintT;
2526
use crate::analysis::types::LintWarning;
26-
use crate::analysis::EvalSeverity;
2727
use crate::codemap::CodeMap;
2828
use crate::syntax::AstModule;
2929

starlark/src/analysis/underscore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ use starlark_syntax::syntax::ast::Stmt;
2727
use starlark_syntax::syntax::module::AstModuleFields;
2828
use thiserror::Error;
2929

30+
use crate::analysis::EvalSeverity;
3031
use crate::analysis::types::LintT;
3132
use crate::analysis::types::LintWarning;
32-
use crate::analysis::EvalSeverity;
3333
use crate::codemap::CodeMap;
3434
use crate::syntax::AstModule;
3535

0 commit comments

Comments
 (0)