X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibrustc%2Fty%2Fbinding.rs;h=5ee8811509098e40a885025d38319784620ed7c5;hb=e180d36d49ef7a14196bddd9b8741eb36d689277;hp=491e09dff09506561cbbf5d09e447aa3565bf018;hpb=afc78e19dd23260613c4c734650b5068c913b385;p=rust.git diff --git a/src/librustc/ty/binding.rs b/src/librustc/ty/binding.rs index 491e09dff09..5ee88115090 100644 --- a/src/librustc/ty/binding.rs +++ b/src/librustc/ty/binding.rs @@ -1,6 +1,6 @@ -use crate::hir::BindingAnnotation::*; -use crate::hir::BindingAnnotation; -use crate::hir::Mutability; +use rustc_hir::BindingAnnotation; +use rustc_hir::BindingAnnotation::*; +use rustc_hir::Mutability; #[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy, HashStable)] pub enum BindingMode { @@ -13,10 +13,10 @@ pub enum BindingMode { impl BindingMode { pub fn convert(ba: BindingAnnotation) -> BindingMode { match ba { - Unannotated => BindingMode::BindByValue(Mutability::Immutable), - Mutable => BindingMode::BindByValue(Mutability::Mutable), - Ref => BindingMode::BindByReference(Mutability::Immutable), - RefMut => BindingMode::BindByReference(Mutability::Mutable), + Unannotated => BindingMode::BindByValue(Mutability::Not), + Mutable => BindingMode::BindByValue(Mutability::Mut), + Ref => BindingMode::BindByReference(Mutability::Not), + RefMut => BindingMode::BindByReference(Mutability::Mut), } } }