1
Fork 0

Reformat using the new identifier sorting from rustfmt

This commit is contained in:
Michael Goulet 2024-09-22 19:05:04 -04:00
parent 1173204b36
commit c682aa162b
1455 changed files with 7152 additions and 8384 deletions

View file

@ -2,8 +2,8 @@ use std::cmp;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::Lock;
use rustc_span::def_id::DefId;
use rustc_span::Symbol;
use rustc_span::def_id::DefId;
use rustc_target::abi::{Align, Size};
#[derive(Clone, PartialEq, Eq, Hash, Debug)]

View file

@ -20,10 +20,10 @@ use rustc_errors::emitter::HumanReadableErrorType;
use rustc_errors::{ColorConfig, DiagArgValue, DiagCtxtFlags, IntoDiagArg};
use rustc_feature::UnstableFeatures;
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
use rustc_span::edition::{Edition, DEFAULT_EDITION, EDITION_NAME_LIST, LATEST_STABLE_EDITION};
use rustc_span::edition::{DEFAULT_EDITION, EDITION_NAME_LIST, Edition, LATEST_STABLE_EDITION};
use rustc_span::source_map::FilePathMapping;
use rustc_span::{
sym, FileName, FileNameDisplayPreference, RealFileName, SourceFileHashAlgorithm, Symbol,
FileName, FileNameDisplayPreference, RealFileName, SourceFileHashAlgorithm, Symbol, sym,
};
use rustc_target::spec::{
FramePointer, LinkSelfContainedComponents, LinkerFeatures, SplitDebuginfo, Target, TargetTriple,
@ -34,7 +34,7 @@ use crate::errors::FileWriteFail;
pub use crate::options::*;
use crate::search_paths::SearchPath;
use crate::utils::{CanonicalizedPath, NativeLib, NativeLibKind};
use crate::{filesearch, lint, EarlyDiagCtxt, HashStableContext, Session};
use crate::{EarlyDiagCtxt, HashStableContext, Session, filesearch, lint};
mod cfg;
pub mod sigpipe;
@ -3004,8 +3004,8 @@ pub(crate) mod dep_tracking {
use rustc_data_structures::stable_hasher::Hash64;
use rustc_errors::LanguageIdentifier;
use rustc_feature::UnstableFeatures;
use rustc_span::edition::Edition;
use rustc_span::RealFileName;
use rustc_span::edition::Edition;
use rustc_target::spec::{
CodeModel, FramePointer, MergeFunctions, OnBrokenPipe, PanicStrategy, RelocModel,
RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TargetTriple, TlsModel, WasmCAbi,

View file

@ -25,14 +25,14 @@ use std::iter;
use rustc_ast::ast;
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexSet};
use rustc_lint_defs::builtin::EXPLICIT_BUILTIN_CFGS_IN_FLAGS;
use rustc_lint_defs::BuiltinLintDiag;
use rustc_span::symbol::{sym, Symbol};
use rustc_lint_defs::builtin::EXPLICIT_BUILTIN_CFGS_IN_FLAGS;
use rustc_span::symbol::{Symbol, sym};
use rustc_target::abi::Align;
use rustc_target::spec::{PanicStrategy, RelocModel, SanitizerSet, Target, TargetTriple, TARGETS};
use rustc_target::spec::{PanicStrategy, RelocModel, SanitizerSet, TARGETS, Target, TargetTriple};
use crate::config::{CrateType, FmtDebug};
use crate::Session;
use crate::config::{CrateType, FmtDebug};
/// The parsed `--cfg` options that define the compilation environment of the
/// crate, used to drive conditional compilation.

View file

@ -8,12 +8,12 @@ use std::path::PathBuf;
use rustc_ast as ast;
use rustc_data_structures::sync::{self, AppendOnlyIndexVec, FreezeLock};
use rustc_hir::def_id::{
CrateNum, DefId, LocalDefId, StableCrateId, StableCrateIdMap, LOCAL_CRATE,
CrateNum, DefId, LOCAL_CRATE, LocalDefId, StableCrateId, StableCrateIdMap,
};
use rustc_hir::definitions::{DefKey, DefPath, DefPathHash, Definitions};
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
use rustc_span::symbol::Symbol;
use rustc_span::Span;
use rustc_span::symbol::Symbol;
use rustc_target::spec::abi::Abi;
use crate::search_paths::PathKind;

View file

@ -4,7 +4,7 @@ use std::path::{Path, PathBuf};
use std::{env, fs};
use rustc_fs_util::{fix_windows_verbatim_for_gcc, try_canonicalize};
use smallvec::{smallvec, SmallVec};
use smallvec::{SmallVec, smallvec};
use crate::search_paths::{PathKind, SearchPath};
@ -121,11 +121,11 @@ fn current_dll_path() -> Result<PathBuf, String> {
use std::io;
use std::os::windows::prelude::*;
use windows::core::PCWSTR;
use windows::Win32::Foundation::HMODULE;
use windows::Win32::System::LibraryLoader::{
GetModuleFileNameW, GetModuleHandleExW, GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, GetModuleFileNameW, GetModuleHandleExW,
};
use windows::core::PCWSTR;
let mut module = HMODULE::default();
unsafe {

View file

@ -20,7 +20,7 @@ use rustc_target::spec::{
use crate::config::*;
use crate::search_paths::SearchPath;
use crate::utils::NativeLib;
use crate::{lint, EarlyDiagCtxt};
use crate::{EarlyDiagCtxt, lint};
macro_rules! insert {
($opt_name:ident, $opt_expr:expr, $sub_hashes:expr) => {

View file

@ -7,12 +7,12 @@ use rustc_errors::FatalError;
use rustc_span::symbol::sym;
use rustc_span::{Span, Symbol};
use crate::Session;
use crate::config::{self, CrateType, Input, OutFileName, OutputFilenames, OutputType};
use crate::errors::{
self, CrateNameDoesNotMatch, CrateNameEmpty, CrateNameInvalid, FileIsNotWriteable,
InvalidCharacterInCrateName, InvalidCrateNameHelp,
};
use crate::Session;
pub fn out_filename(
sess: &Session,

View file

@ -7,17 +7,18 @@ use rustc_ast::attr::AttrIdGenerator;
use rustc_ast::node_id::NodeId;
use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet};
use rustc_data_structures::sync::{AppendOnlyVec, Lock, Lrc};
use rustc_errors::emitter::{stderr_destination, HumanEmitter, SilentEmitter};
use rustc_errors::emitter::{HumanEmitter, SilentEmitter, stderr_destination};
use rustc_errors::{
fallback_fluent_bundle, ColorConfig, Diag, DiagCtxt, DiagCtxtHandle, DiagMessage,
EmissionGuarantee, MultiSpan, StashKey,
ColorConfig, Diag, DiagCtxt, DiagCtxtHandle, DiagMessage, EmissionGuarantee, MultiSpan,
StashKey, fallback_fluent_bundle,
};
use rustc_feature::{find_feature_issue, GateIssue, UnstableFeatures};
use rustc_feature::{GateIssue, UnstableFeatures, find_feature_issue};
use rustc_span::edition::Edition;
use rustc_span::hygiene::ExpnId;
use rustc_span::source_map::{FilePathMapping, SourceMap};
use rustc_span::{Span, Symbol};
use crate::Session;
use crate::config::{Cfg, CheckCfg};
use crate::errors::{
CliFeatureDiagnosticHelp, FeatureDiagnosticForIssue, FeatureDiagnosticHelp,
@ -25,7 +26,6 @@ use crate::errors::{
};
use crate::lint::builtin::UNSTABLE_SYNTAX_PRE_EXPANSION;
use crate::lint::{BufferedEarlyLint, BuiltinLintDiag, Lint, LintId};
use crate::Session;
/// Collected spans during parsing for places where a certain feature was
/// used and should be feature gated accordingly in `check_crate`.

View file

@ -3,8 +3,8 @@ use std::path::{Path, PathBuf};
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
use rustc_target::spec::TargetTriple;
use crate::filesearch::make_target_lib_path;
use crate::EarlyDiagCtxt;
use crate::filesearch::make_target_lib_path;
#[derive(Clone, Debug)]
pub struct SearchPath {

View file

@ -2,9 +2,9 @@ use std::any::Any;
use std::ops::{Div, Mul};
use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering::SeqCst;
use std::sync::Arc;
use std::{env, fmt, io};
use rustc_data_structures::flock;
@ -16,12 +16,12 @@ use rustc_data_structures::sync::{
};
use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter;
use rustc_errors::codes::*;
use rustc_errors::emitter::{stderr_destination, DynEmitter, HumanEmitter, HumanReadableErrorType};
use rustc_errors::emitter::{DynEmitter, HumanEmitter, HumanReadableErrorType, stderr_destination};
use rustc_errors::json::JsonEmitter;
use rustc_errors::registry::Registry;
use rustc_errors::{
fallback_fluent_bundle, Diag, DiagCtxt, DiagCtxtHandle, DiagMessage, Diagnostic,
ErrorGuaranteed, FatalAbort, FluentBundle, LazyFallbackBundle, TerminalUrl,
Diag, DiagCtxt, DiagCtxtHandle, DiagMessage, Diagnostic, ErrorGuaranteed, FatalAbort,
FluentBundle, LazyFallbackBundle, TerminalUrl, fallback_fluent_bundle,
};
use rustc_macros::HashStable_Generic;
pub use rustc_span::def_id::StableCrateId;
@ -41,7 +41,7 @@ use crate::config::{
InstrumentCoverage, OptLevel, OutFileName, OutputType, RemapPathScopeComponents,
SwitchWithOptPath,
};
use crate::parse::{add_feature_diagnostics, ParseSess};
use crate::parse::{ParseSess, add_feature_diagnostics};
use crate::search_paths::{PathKind, SearchPath};
use crate::{errors, filesearch, lint};

View file

@ -2,7 +2,7 @@ use std::borrow::Cow;
use std::fmt::{self, Display};
use rustc_errors::IntoDiagArg;
use rustc_macros::{current_rustc_version, Decodable, Encodable, HashStable_Generic};
use rustc_macros::{Decodable, Encodable, HashStable_Generic, current_rustc_version};
#[derive(Encodable, Decodable, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(HashStable_Generic)]