Skip to content

Commit 35c993e

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 3b712b6 commit 35c993e

File tree

1,071 files changed

+3064
-3001
lines changed

Some content is hidden

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

1,071 files changed

+3064
-3001
lines changed

Diff for: 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() {

Diff for: 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>) {

Diff for: 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>) {

Diff for: 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))]

Diff for: 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

Diff for: 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>) {

Diff for: 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,

Diff for: 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
///

Diff for: 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;

Diff for: app/buck2/bin/buck2.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ use std::time::UNIX_EPOCH;
1919
use buck2::exec;
2020
use buck2::panic;
2121
use buck2::process_context::ProcessContext;
22-
use buck2_build_info::Buck2BuildInfo;
2322
use buck2_build_info::BUCK2_BUILD_INFO;
23+
use buck2_build_info::Buck2BuildInfo;
2424
use buck2_client_ctx::exit_result::ExitResult;
2525
use buck2_client_ctx::restarter::Restarter;
2626
use buck2_client_ctx::stdin::Stdin;
2727
use buck2_client_ctx::stdio;
2828
use buck2_core::buck2_env;
2929
use buck2_core::fs::working_dir::AbsWorkingDir;
30+
use buck2_core::logging::LogConfigurationReloadHandle;
3031
use buck2_core::logging::init_tracing_for_writer;
3132
use buck2_core::logging::log_file::TracingLogFile;
32-
use buck2_core::logging::LogConfigurationReloadHandle;
3333
use buck2_error::conversion::from_any_with_tag;
3434
use buck2_wrapper_common::invocation_id::TraceId;
3535
use dupe::Dupe;

Diff for: app/buck2/src/check_user_allowed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ pub(crate) fn check_user_allowed() -> buck2_error::Result<()> {
2222
use winapi::um::processthreadsapi::GetCurrentProcess;
2323
use winapi::um::processthreadsapi::OpenProcessToken;
2424
use winapi::um::securitybaseapi::GetTokenInformation;
25-
use winapi::um::winnt::TokenElevation;
2625
use winapi::um::winnt::TOKEN_ELEVATION;
2726
use winapi::um::winnt::TOKEN_QUERY;
27+
use winapi::um::winnt::TokenElevation;
2828

2929
let mut handle = ptr::null_mut();
3030
let token_ok = unsafe { OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &mut handle) };

Diff for: app/buck2/src/cli_style.rs

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

10-
use clap::builder::styling;
1110
use clap::builder::Styles;
11+
use clap::builder::styling;
1212

1313
pub(crate) fn get_styles() -> Styles {
1414
let heading = styling::AnsiColor::Yellow.on_default().bold();

Diff for: app/buck2/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ use buck2_common::invocation_paths_result::InvocationPathsResult;
5353
use buck2_common::invocation_roots::get_invocation_paths_result;
5454
use buck2_core::buck2_env;
5555
use buck2_core::fs::paths::file_name::FileNameBuf;
56+
use buck2_error::BuckErrorContext;
5657
use buck2_error::buck2_error;
5758
use buck2_error::conversion::from_any_with_tag;
58-
use buck2_error::BuckErrorContext;
5959
use buck2_event_observer::verbosity::Verbosity;
6060
use buck2_util::threads::thread_spawn_scoped;
6161
use clap::CommandFactory;

Diff for: app/buck2/src/panic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ mod imp {
6060
use backtrace::Backtrace;
6161
use buck2_core::error::StructuredErrorOptions;
6262
use buck2_data::Location;
63+
use buck2_events::BuckEvent;
6364
use buck2_events::metadata;
64-
use buck2_events::sink::remote::new_remote_event_sink_if_enabled;
6565
use buck2_events::sink::remote::ScribeConfig;
66-
use buck2_events::BuckEvent;
66+
use buck2_events::sink::remote::new_remote_event_sink_if_enabled;
6767
use buck2_util::threads::thread_spawn;
6868
use fbinit::FacebookInit;
6969
use tokio::runtime::Builder;

Diff for: app/buck2_action_impl/src/actions/impls/cas_artifact.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ use std::sync::Arc;
1414
use allocative::Allocative;
1515
use async_trait::async_trait;
1616
use buck2_artifact::artifact::build_artifact::BuildArtifact;
17+
use buck2_build_api::actions::Action;
18+
use buck2_build_api::actions::ActionExecutionCtx;
19+
use buck2_build_api::actions::UnregisteredAction;
1720
use buck2_build_api::actions::execute::action_executor::ActionExecutionKind;
1821
use buck2_build_api::actions::execute::action_executor::ActionExecutionMetadata;
1922
use buck2_build_api::actions::execute::action_executor::ActionOutputs;
2023
use buck2_build_api::actions::execute::error::ExecuteError;
21-
use buck2_build_api::actions::Action;
22-
use buck2_build_api::actions::ActionExecutionCtx;
23-
use buck2_build_api::actions::UnregisteredAction;
2424
use buck2_build_api::artifact_groups::ArtifactGroup;
2525
use buck2_common::file_ops::FileDigest;
2626
use buck2_common::file_ops::FileMetadata;
@@ -31,10 +31,10 @@ use buck2_core::execution_types::executor_config::RemoteExecutorUseCase;
3131
use buck2_error::BuckErrorContext;
3232
use buck2_execute::artifact_value::ArtifactValue;
3333
use buck2_execute::digest::CasDigestToReExt;
34-
use buck2_execute::directory::re_directory_to_re_tree;
35-
use buck2_execute::directory::re_tree_to_directory;
3634
use buck2_execute::directory::ActionDirectoryEntry;
3735
use buck2_execute::directory::INTERNER;
36+
use buck2_execute::directory::re_directory_to_re_tree;
37+
use buck2_execute::directory::re_tree_to_directory;
3838
use buck2_execute::execute::command_executor::ActionExecutionTimingData;
3939
use buck2_execute::materialize::materializer::CasDownloadInfo;
4040
use chrono::DateTime;

Diff for: app/buck2_action_impl/src/actions/impls/copy.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ use std::borrow::Cow;
1212
use allocative::Allocative;
1313
use async_trait::async_trait;
1414
use buck2_artifact::artifact::build_artifact::BuildArtifact;
15+
use buck2_build_api::actions::Action;
16+
use buck2_build_api::actions::ActionExecutionCtx;
17+
use buck2_build_api::actions::UnregisteredAction;
1518
use buck2_build_api::actions::box_slice_set::BoxSliceSet;
1619
use buck2_build_api::actions::execute::action_executor::ActionExecutionKind;
1720
use buck2_build_api::actions::execute::action_executor::ActionExecutionMetadata;
1821
use buck2_build_api::actions::execute::action_executor::ActionOutputs;
1922
use buck2_build_api::actions::execute::error::ExecuteError;
20-
use buck2_build_api::actions::Action;
21-
use buck2_build_api::actions::ActionExecutionCtx;
22-
use buck2_build_api::actions::UnregisteredAction;
2323
use buck2_build_api::artifact_groups::ArtifactGroup;
2424
use buck2_core::category::CategoryRef;
2525
use buck2_error::BuckErrorContext;

Diff for: app/buck2_action_impl/src/actions/impls/download_file.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,29 @@ use std::sync::Arc;
1313
use allocative::Allocative;
1414
use async_trait::async_trait;
1515
use buck2_artifact::artifact::build_artifact::BuildArtifact;
16+
use buck2_build_api::actions::Action;
17+
use buck2_build_api::actions::ActionExecutionCtx;
18+
use buck2_build_api::actions::UnregisteredAction;
1619
use buck2_build_api::actions::execute::action_executor::ActionExecutionKind;
1720
use buck2_build_api::actions::execute::action_executor::ActionExecutionMetadata;
1821
use buck2_build_api::actions::execute::action_executor::ActionOutputs;
1922
use buck2_build_api::actions::execute::error::ExecuteError;
20-
use buck2_build_api::actions::Action;
21-
use buck2_build_api::actions::ActionExecutionCtx;
22-
use buck2_build_api::actions::UnregisteredAction;
2323
use buck2_build_api::artifact_groups::ArtifactGroup;
2424
use buck2_common::cas_digest::RawDigest;
2525
use buck2_common::file_ops::FileDigest;
2626
use buck2_common::file_ops::FileMetadata;
2727
use buck2_common::file_ops::TrackedFileDigest;
2828
use buck2_common::io::trace::TracingIoProvider;
2929
use buck2_core::category::CategoryRef;
30-
use buck2_error::conversion::from_any_with_tag;
3130
use buck2_error::BuckErrorContext;
3231
use buck2_error::ErrorTag;
32+
use buck2_error::conversion::from_any_with_tag;
3333
use buck2_execute::artifact_value::ArtifactValue;
3434
use buck2_execute::digest_config::DigestConfig;
3535
use buck2_execute::execute::command_executor::ActionExecutionTimingData;
36+
use buck2_execute::materialize::http::Checksum;
3637
use buck2_execute::materialize::http::http_download;
3738
use buck2_execute::materialize::http::http_head;
38-
use buck2_execute::materialize::http::Checksum;
3939
use buck2_execute::materialize::materializer::HttpDownloadInfo;
4040
use buck2_http::HttpClient;
4141
use dupe::Dupe;

Diff for: app/buck2_action_impl/src/actions/impls/offline.rs

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

1010
use buck2_artifact::artifact::build_artifact::BuildArtifact;
11-
use buck2_build_api::actions::execute::action_executor::ActionOutputs;
1211
use buck2_build_api::actions::ActionExecutionCtx;
12+
use buck2_build_api::actions::execute::action_executor::ActionOutputs;
1313
use buck2_common::file_ops::FileDigestConfig;
1414
use buck2_core::fs::project_rel_path::ProjectRelativePathBuf;
1515
use buck2_execute::artifact_value::ArtifactValue;

0 commit comments

Comments
 (0)