1 use rustc_hir::{BindingAnnotation, ByRef, Mutability};
3 #[derive(Clone, PartialEq, TyEncodable, TyDecodable, Debug, Copy, HashStable)]
5 BindByReference(Mutability),
6 BindByValue(Mutability),
9 TrivialTypeTraversalAndLiftImpls! { BindingMode, }
12 pub fn convert(BindingAnnotation(by_ref, mutbl): BindingAnnotation) -> BindingMode {
14 ByRef::No => BindingMode::BindByValue(mutbl),
15 ByRef::Yes => BindingMode::BindByReference(mutbl),