1
Fork 0

Reformat use declarations.

The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
This commit is contained in:
Nicholas Nethercote 2024-07-29 08:13:50 +10:00
parent 118f9350c5
commit 84ac80f192
1865 changed files with 8367 additions and 9199 deletions

View file

@ -17,8 +17,23 @@
#![feature(rustdoc_internals)]
// tidy-alphabetical-end
use std::cmp::max;
use std::collections::BTreeMap;
use std::ffi::OsString;
use std::fmt::Write as _;
use std::fs::{self, File};
use std::io::{self, IsTerminal, Read, Write};
use std::panic::{self, catch_unwind, PanicHookInfo};
use std::path::PathBuf;
use std::process::{self, Command, Stdio};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, OnceLock};
use std::time::{Duration, Instant, SystemTime};
use std::{env, str};
use rustc_ast as ast;
use rustc_codegen_ssa::{traits::CodegenBackend, CodegenErrors, CodegenResults};
use rustc_codegen_ssa::traits::CodegenBackend;
use rustc_codegen_ssa::{CodegenErrors, CodegenResults};
use rustc_const_eval::CTRL_C_RECEIVED;
use rustc_data_structures::profiling::{
get_resident_set_size, print_time_passes_entry, TimePassesFormat,
@ -35,8 +50,9 @@ use rustc_lint::unerased_lint_store;
use rustc_metadata::creader::MetadataLoader;
use rustc_metadata::locator;
use rustc_parse::{new_parser_from_file, new_parser_from_source_str, unwrap_or_emit_fatal};
use rustc_session::config::{nightly_options, CG_OPTIONS, Z_OPTIONS};
use rustc_session::config::{ErrorOutputType, Input, OutFileName, OutputType};
use rustc_session::config::{
nightly_options, ErrorOutputType, Input, OutFileName, OutputType, CG_OPTIONS, Z_OPTIONS,
};
use rustc_session::getopts::{self, Matches};
use rustc_session::lint::{Lint, LintId};
use rustc_session::output::collect_crate_types;
@ -46,20 +62,6 @@ use rustc_span::symbol::sym;
use rustc_span::FileName;
use rustc_target::json::ToJson;
use rustc_target::spec::{Target, TargetTriple};
use std::cmp::max;
use std::collections::BTreeMap;
use std::env;
use std::ffi::OsString;
use std::fmt::Write as _;
use std::fs::{self, File};
use std::io::{self, IsTerminal, Read, Write};
use std::panic::{self, catch_unwind, PanicHookInfo};
use std::path::PathBuf;
use std::process::{self, Command, Stdio};
use std::str;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, OnceLock};
use std::time::{Duration, Instant, SystemTime};
use time::OffsetDateTime;
use tracing::trace;
@ -689,7 +691,6 @@ fn print_crate_info(
parse_attrs: bool,
) -> Compilation {
use rustc_session::config::PrintKind::*;
// This import prevents the following code from using the printing macros
// used by the rest of the module. Within this function, we only write to
// the output specified by `sess.io.output_file`.

View file

@ -1,9 +1,10 @@
//! The various pretty-printing routines.
use rustc_ast as ast;
use std::cell::Cell;
use std::fmt::Write;
use rustc_ast_pretty::pprust as pprust_ast;
use rustc_errors::FatalError;
use rustc_hir_pretty as pprust_hir;
use rustc_middle::bug;
use rustc_middle::mir::{write_mir_graphviz, write_mir_pretty};
use rustc_middle::ty::{self, TyCtxt};
@ -12,9 +13,8 @@ use rustc_session::Session;
use rustc_smir::rustc_internal::pretty::write_smir_pretty;
use rustc_span::symbol::Ident;
use rustc_span::FileName;
use std::cell::Cell;
use std::fmt::Write;
use tracing::debug;
use {rustc_ast as ast, rustc_hir_pretty as pprust_hir};
pub use self::PpMode::*;
pub use self::PpSourceMode::*;

View file

@ -1,10 +1,11 @@
//! Signal handler for rustc
//! Primarily used to extract a backtrace from stack overflow
use rustc_interface::util::{DEFAULT_STACK_SIZE, STACK_SIZE};
use std::alloc::{alloc, Layout};
use std::{fmt, mem, ptr};
use rustc_interface::util::{DEFAULT_STACK_SIZE, STACK_SIZE};
extern "C" {
fn backtrace_symbols_fd(buffer: *const *mut libc::c_void, size: libc::c_int, fd: libc::c_int);
}