random::<Improve<Mutability>>()
This commit is contained in:
parent
4439f1f6a6
commit
6486ba94a3
2 changed files with 2 additions and 5 deletions
|
@ -130,10 +130,7 @@ impl hir::Pat<'_> {
|
|||
pub fn contains_explicit_ref_binding(&self) -> Option<hir::Mutability> {
|
||||
let mut result = None;
|
||||
self.each_binding(|annotation, _, _, _| match annotation {
|
||||
hir::BindingAnnotation::REF => match result {
|
||||
None | Some(hir::Mutability::Not) => result = Some(hir::Mutability::Not),
|
||||
_ => {}
|
||||
},
|
||||
hir::BindingAnnotation::REF if result.is_none() => result = Some(hir::Mutability::Not),
|
||||
hir::BindingAnnotation::REF_MUT => result = Some(hir::Mutability::Mut),
|
||||
_ => {}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue