Skip to content

Commit 76128f8

Browse files
committed
Fix tidy.
1 parent daff3e3 commit 76128f8

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/librustc/hir/pat_util.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ impl hir::Pat {
169169
self.each_binding(|annotation, _, _, _| {
170170
match annotation {
171171
hir::BindingAnnotation::Ref => match result {
172-
None | Some(hir::Mutability::Immutable) => result = Some(hir::Mutability::Immutable),
172+
None | Some(hir::Mutability::Immutable) =>
173+
result = Some(hir::Mutability::Immutable),
173174
_ => {}
174175
}
175176
hir::BindingAnnotation::RefMut => result = Some(hir::Mutability::Mutable),

src/librustc_metadata/rmeta/encoder.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1571,8 +1571,10 @@ impl EncodeContext<'tcx> {
15711571
};
15721572
EntryKind::ForeignFn(self.lazy(data))
15731573
}
1574-
hir::ForeignItemKind::Static(_, hir::Mutability::Mutable) => EntryKind::ForeignMutStatic,
1575-
hir::ForeignItemKind::Static(_, hir::Mutability::Immutable) => EntryKind::ForeignImmStatic,
1574+
hir::ForeignItemKind::Static(_, hir::Mutability::Mutable) =>
1575+
EntryKind::ForeignMutStatic,
1576+
hir::ForeignItemKind::Static(_, hir::Mutability::Immutable) =>
1577+
EntryKind::ForeignImmStatic,
15761578
hir::ForeignItemKind::Type => EntryKind::ForeignType,
15771579
});
15781580
record!(self.per_def.visibility[def_id] <-

src/librustc_mir/borrow_check/places_conflict.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ fn place_components_conflict<'tcx>(
250250
// Shouldn't be tracked
251251
bug!("Tracking borrow behind shared reference.");
252252
}
253-
(ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Mutable), AccessDepth::Drop) => {
253+
(ProjectionElem::Deref,
254+
ty::Ref(_, _, hir::Mutability::Mutable),
255+
AccessDepth::Drop) => {
254256
// Values behind a mutable reference are not access either by dropping a
255257
// value, or by StorageDead
256258
debug!("borrow_conflicts_with_place: drop access behind ptr");

src/librustc_typeck/check/cast.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,8 @@ impl<'a, 'tcx> CastCheck<'tcx> {
627627
) -> Result<CastKind, CastError> {
628628
// array-ptr-cast.
629629

630-
if m_expr.mutbl == hir::Mutability::Immutable && m_cast.mutbl == hir::Mutability::Immutable {
630+
if m_expr.mutbl == hir::Mutability::Immutable &&
631+
m_cast.mutbl == hir::Mutability::Immutable {
631632
if let ty::Array(ety, _) = m_expr.ty.kind {
632633
// Due to the limitations of LLVM global constants,
633634
// region pointers end up pointing at copies of

0 commit comments

Comments
 (0)