Fix tidy.
This commit is contained in:
parent
daff3e346c
commit
76128f89a1
4 changed files with 11 additions and 5 deletions
|
|
@ -169,7 +169,8 @@ impl hir::Pat {
|
|||
self.each_binding(|annotation, _, _, _| {
|
||||
match annotation {
|
||||
hir::BindingAnnotation::Ref => match result {
|
||||
None | Some(hir::Mutability::Immutable) => result = Some(hir::Mutability::Immutable),
|
||||
None | Some(hir::Mutability::Immutable) =>
|
||||
result = Some(hir::Mutability::Immutable),
|
||||
_ => {}
|
||||
}
|
||||
hir::BindingAnnotation::RefMut => result = Some(hir::Mutability::Mutable),
|
||||
|
|
|
|||
|
|
@ -1571,8 +1571,10 @@ impl EncodeContext<'tcx> {
|
|||
};
|
||||
EntryKind::ForeignFn(self.lazy(data))
|
||||
}
|
||||
hir::ForeignItemKind::Static(_, hir::Mutability::Mutable) => EntryKind::ForeignMutStatic,
|
||||
hir::ForeignItemKind::Static(_, hir::Mutability::Immutable) => EntryKind::ForeignImmStatic,
|
||||
hir::ForeignItemKind::Static(_, hir::Mutability::Mutable) =>
|
||||
EntryKind::ForeignMutStatic,
|
||||
hir::ForeignItemKind::Static(_, hir::Mutability::Immutable) =>
|
||||
EntryKind::ForeignImmStatic,
|
||||
hir::ForeignItemKind::Type => EntryKind::ForeignType,
|
||||
});
|
||||
record!(self.per_def.visibility[def_id] <-
|
||||
|
|
|
|||
|
|
@ -250,7 +250,9 @@ fn place_components_conflict<'tcx>(
|
|||
// Shouldn't be tracked
|
||||
bug!("Tracking borrow behind shared reference.");
|
||||
}
|
||||
(ProjectionElem::Deref, ty::Ref(_, _, hir::Mutability::Mutable), AccessDepth::Drop) => {
|
||||
(ProjectionElem::Deref,
|
||||
ty::Ref(_, _, hir::Mutability::Mutable),
|
||||
AccessDepth::Drop) => {
|
||||
// Values behind a mutable reference are not access either by dropping a
|
||||
// value, or by StorageDead
|
||||
debug!("borrow_conflicts_with_place: drop access behind ptr");
|
||||
|
|
|
|||
|
|
@ -627,7 +627,8 @@ impl<'a, 'tcx> CastCheck<'tcx> {
|
|||
) -> Result<CastKind, CastError> {
|
||||
// array-ptr-cast.
|
||||
|
||||
if m_expr.mutbl == hir::Mutability::Immutable && m_cast.mutbl == hir::Mutability::Immutable {
|
||||
if m_expr.mutbl == hir::Mutability::Immutable &&
|
||||
m_cast.mutbl == hir::Mutability::Immutable {
|
||||
if let ty::Array(ety, _) = m_expr.ty.kind {
|
||||
// Due to the limitations of LLVM global constants,
|
||||
// region pointers end up pointing at copies of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue