Skip to content

Commit b7eb35d

Browse files
committed
Run rustfmt
1 parent 56011eb commit b7eb35d

File tree

2 files changed

+112
-119
lines changed

2 files changed

+112
-119
lines changed

src/librustc/mir/mod.rs

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,9 @@ impl BorrowKind {
523523
pub fn allows_two_phase_borrow(&self) -> bool {
524524
match *self {
525525
BorrowKind::Shared | BorrowKind::Shallow | BorrowKind::Unique => false,
526-
BorrowKind::Mut { allow_two_phase_borrow } => allow_two_phase_borrow,
526+
BorrowKind::Mut {
527+
allow_two_phase_borrow,
528+
} => allow_two_phase_borrow,
527529
}
528530
}
529531
}
@@ -596,7 +598,7 @@ pub enum ImplicitSelfKind {
596598
MutRef,
597599
/// Represents when a function does not have a self argument or
598600
/// when a function has a `self: X` argument.
599-
None
601+
None,
600602
}
601603

602604
CloneTypeFoldableAndLiftImpls! { BindingForm<'tcx>, }
@@ -820,8 +822,7 @@ impl<'tcx> LocalDecl<'tcx> {
820822
pat_span: _,
821823
}))) => true,
822824

823-
Some(ClearCrossCrate::Set(BindingForm::ImplicitSelf(ImplicitSelfKind::Imm)))
824-
=> true,
825+
Some(ClearCrossCrate::Set(BindingForm::ImplicitSelf(ImplicitSelfKind::Imm))) => true,
825826

826827
_ => false,
827828
}
@@ -873,12 +874,7 @@ impl<'tcx> LocalDecl<'tcx> {
873874
}
874875

875876
#[inline]
876-
fn new_local(
877-
ty: Ty<'tcx>,
878-
mutability: Mutability,
879-
internal: bool,
880-
span: Span,
881-
) -> Self {
877+
fn new_local(ty: Ty<'tcx>, mutability: Mutability, internal: bool, span: Span) -> Self {
882878
LocalDecl {
883879
mutability,
884880
ty,
@@ -1603,13 +1599,15 @@ impl<'tcx> TerminatorKind<'tcx> {
16031599
Scalar::Bits {
16041600
bits: u,
16051601
size: size.bytes() as u8,
1606-
}.into(),
1602+
}
1603+
.into(),
16071604
),
16081605
ty: switch_ty,
16091606
};
16101607
fmt_const_val(&mut s, &c).unwrap();
16111608
s.into()
1612-
}).chain(iter::once("otherwise".into()))
1609+
})
1610+
.chain(iter::once("otherwise".into()))
16131611
.collect()
16141612
}
16151613
Call {
@@ -1843,9 +1841,11 @@ impl<'tcx> Debug for Statement<'tcx> {
18431841
ref outputs,
18441842
ref inputs,
18451843
} => write!(fmt, "asm!({:?} : {:?} : {:?})", asm, outputs, inputs),
1846-
AscribeUserType(ref place, ref variance, ref c_ty) => {
1847-
write!(fmt, "AscribeUserType({:?}, {:?}, {:?})", place, variance, c_ty)
1848-
}
1844+
AscribeUserType(ref place, ref variance, ref c_ty) => write!(
1845+
fmt,
1846+
"AscribeUserType({:?}, {:?}, {:?})",
1847+
place, variance, c_ty
1848+
),
18491849
Nop => write!(fmt, "nop"),
18501850
}
18511851
}
@@ -1970,8 +1970,8 @@ impl<'tcx> Place<'tcx> {
19701970
/// Find the innermost `Local` from this `Place`.
19711971
pub fn local(&self) -> Option<Local> {
19721972
match self {
1973-
Place::Local(local) |
1974-
Place::Projection(box Projection {
1973+
Place::Local(local)
1974+
| Place::Projection(box Projection {
19751975
base: Place::Local(local),
19761976
elem: ProjectionElem::Deref,
19771977
}) => Some(*local),
@@ -2701,7 +2701,9 @@ pub struct ClosureOutlivesRequirement<'tcx> {
27012701
/// order of the category, thereby influencing diagnostic output.
27022702
///
27032703
/// See also [rustc_mir::borrow_check::nll::constraints]
2704-
#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
2704+
#[derive(
2705+
Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable,
2706+
)]
27052707
pub enum ConstraintCategory {
27062708
Return,
27072709
TypeAnnotation,

0 commit comments

Comments
 (0)