diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-06 06:54:48 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-09 08:57:24 +0100 |
| commit | ae6e31b1a339903a92bb03ee085924e3da425356 (patch) | |
| tree | b912cf0bedd3f4e5c8856be7a1b25c5c26bf5bfd | |
| parent | f75ccdef10148637165eec034d9346cbb82e0119 (diff) | |
| download | rust-ae6e31b1a339903a92bb03ee085924e3da425356.tar.gz rust-ae6e31b1a339903a92bb03ee085924e3da425356.zip | |
move lower_binding_mode -> pat.rs
| -rw-r--r-- | src/librustc_ast_lowering/lib.rs | 9 | ||||
| -rw-r--r-- | src/librustc_ast_lowering/pat.rs | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/librustc_ast_lowering/lib.rs b/src/librustc_ast_lowering/lib.rs index 658bcb26ecf..3431cf08b6d 100644 --- a/src/librustc_ast_lowering/lib.rs +++ b/src/librustc_ast_lowering/lib.rs @@ -2696,15 +2696,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { } } - fn lower_binding_mode(&mut self, b: &BindingMode) -> hir::BindingAnnotation { - match *b { - BindingMode::ByValue(Mutability::Not) => hir::BindingAnnotation::Unannotated, - BindingMode::ByRef(Mutability::Not) => hir::BindingAnnotation::Ref, - BindingMode::ByValue(Mutability::Mut) => hir::BindingAnnotation::Mutable, - BindingMode::ByRef(Mutability::Mut) => hir::BindingAnnotation::RefMut, - } - } - fn lower_unsafe_source(&mut self, u: UnsafeSource) -> hir::UnsafeSource { match u { CompilerGenerated => hir::UnsafeSource::CompilerGenerated, diff --git a/src/librustc_ast_lowering/pat.rs b/src/librustc_ast_lowering/pat.rs index 3a3ffd7560b..4d7d21abc8c 100644 --- a/src/librustc_ast_lowering/pat.rs +++ b/src/librustc_ast_lowering/pat.rs @@ -213,6 +213,15 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { } } + fn lower_binding_mode(&mut self, b: &BindingMode) -> hir::BindingAnnotation { + match *b { + BindingMode::ByValue(Mutability::Not) => hir::BindingAnnotation::Unannotated, + BindingMode::ByRef(Mutability::Not) => hir::BindingAnnotation::Ref, + BindingMode::ByValue(Mutability::Mut) => hir::BindingAnnotation::Mutable, + BindingMode::ByRef(Mutability::Mut) => hir::BindingAnnotation::RefMut, + } + } + fn pat_wild_with_node_id_of(&mut self, p: &Pat) -> &'hir hir::Pat<'hir> { self.pat_with_node_id_of(p, hir::PatKind::Wild) } |
