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:
parent
118f9350c5
commit
84ac80f192
1865 changed files with 8367 additions and 9199 deletions
|
@ -180,16 +180,14 @@ use std::cmp::{self, max, min, Ordering};
|
|||
use std::fmt;
|
||||
use std::iter::once;
|
||||
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use rustc_apfloat::ieee::{DoubleS, HalfS, IeeeFloat, QuadS, SingleS};
|
||||
use rustc_index::bit_set::{BitSet, GrowableBitSet};
|
||||
use rustc_index::IndexVec;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use self::Constructor::*;
|
||||
use self::MaybeInfiniteInt::*;
|
||||
use self::SliceKind::*;
|
||||
|
||||
use crate::PatCx;
|
||||
|
||||
/// Whether we have seen a constructor in the column or not.
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS;
|
||||
use rustc_span::ErrorGuaranteed;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::constructor::Constructor;
|
||||
use crate::errors::{NonExhaustiveOmittedPattern, NonExhaustiveOmittedPatternLintOnArm, Uncovered};
|
||||
use crate::pat_column::PatternColumn;
|
||||
use crate::rustc::{RevealedTy, RustcPatCtxt, WitnessPat};
|
||||
use crate::MatchArm;
|
||||
use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS;
|
||||
use rustc_span::ErrorGuaranteed;
|
||||
use tracing::instrument;
|
||||
|
||||
/// Traverse the patterns to collect any variants of a non_exhaustive enum that fail to be mentioned
|
||||
/// in a given column.
|
||||
|
|
|
@ -5,11 +5,10 @@ use std::fmt;
|
|||
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
use self::Constructor::*;
|
||||
use crate::constructor::{Constructor, Slice, SliceKind};
|
||||
use crate::{PatCx, PrivateUninhabitedField};
|
||||
|
||||
use self::Constructor::*;
|
||||
|
||||
/// A globally unique id to distinguish patterns.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub(crate) struct PatId(u32);
|
||||
|
|
|
@ -17,6 +17,7 @@ use rustc_session::lint;
|
|||
use rustc_span::{ErrorGuaranteed, Span, DUMMY_SP};
|
||||
use rustc_target::abi::{FieldIdx, Integer, VariantIdx, FIRST_VARIANT};
|
||||
|
||||
use crate::constructor::Constructor::*;
|
||||
use crate::constructor::{
|
||||
IntRange, MaybeInfiniteInt, OpaqueId, RangeEnd, Slice, SliceKind, VariantVisibility,
|
||||
};
|
||||
|
@ -25,8 +26,6 @@ use crate::pat_column::PatternColumn;
|
|||
use crate::usefulness::{compute_match_usefulness, PlaceValidity};
|
||||
use crate::{errors, Captures, PatCx, PrivateUninhabitedField};
|
||||
|
||||
use crate::constructor::Constructor::*;
|
||||
|
||||
// Re-export rustc-specific versions of all these types.
|
||||
pub type Constructor<'p, 'tcx> = crate::constructor::Constructor<RustcPatCtxt<'p, 'tcx>>;
|
||||
pub type ConstructorSet<'p, 'tcx> = crate::constructor::ConstructorSet<RustcPatCtxt<'p, 'tcx>>;
|
||||
|
|
|
@ -709,18 +709,19 @@
|
|||
//! I (Nadrieril) prefer to put new tests in `ui/pattern/usefulness` unless there's a specific
|
||||
//! reason not to, for example if they crucially depend on a particular feature like `or_patterns`.
|
||||
|
||||
use std::fmt;
|
||||
|
||||
#[cfg(feature = "rustc")]
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use self::PlaceValidity::*;
|
||||
use crate::constructor::{Constructor, ConstructorSet, IntRange};
|
||||
use crate::pat::{DeconstructedPat, PatId, PatOrWild, WitnessPat};
|
||||
use crate::{Captures, MatchArm, PatCx, PrivateUninhabitedField};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
use std::fmt;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
#[cfg(feature = "rustc")]
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
#[cfg(not(feature = "rustc"))]
|
||||
pub fn ensure_sufficient_stack<R>(f: impl FnOnce() -> R) -> R {
|
||||
f()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue