@@ -424,7 +424,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
424424 } )
425425 }
426426
427- pub ( crate ) fn lower_lit ( & mut self , token_lit : & token:: Lit , span : Span ) -> hir:: Lit {
427+ pub ( crate ) fn lower_lit ( & self , token_lit : & token:: Lit , span : Span ) -> hir:: Lit {
428428 let lit_kind = match LitKind :: from_token_lit ( * token_lit) {
429429 Ok ( lit_kind) => lit_kind,
430430 Err ( err) => {
@@ -435,19 +435,19 @@ impl<'hir> LoweringContext<'_, 'hir> {
435435 respan ( self . lower_span ( span) , lit_kind)
436436 }
437437
438- fn lower_unop ( & mut self , u : UnOp ) -> hir:: UnOp {
438+ fn lower_unop ( & self , u : UnOp ) -> hir:: UnOp {
439439 match u {
440440 UnOp :: Deref => hir:: UnOp :: Deref ,
441441 UnOp :: Not => hir:: UnOp :: Not ,
442442 UnOp :: Neg => hir:: UnOp :: Neg ,
443443 }
444444 }
445445
446- fn lower_binop ( & mut self , b : BinOp ) -> BinOp {
446+ fn lower_binop ( & self , b : BinOp ) -> BinOp {
447447 Spanned { node : b. node , span : self . lower_span ( b. span ) }
448448 }
449449
450- fn lower_assign_op ( & mut self , a : AssignOp ) -> AssignOp {
450+ fn lower_assign_op ( & self , a : AssignOp ) -> AssignOp {
451451 Spanned { node : a. node , span : self . lower_span ( a. span ) }
452452 }
453453
@@ -681,7 +681,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
681681 hir:: Arm { hir_id, pat, guard, body, span }
682682 }
683683
684- fn lower_capture_clause ( & mut self , capture_clause : CaptureBy ) -> CaptureBy {
684+ fn lower_capture_clause ( & self , capture_clause : CaptureBy ) -> CaptureBy {
685685 match capture_clause {
686686 CaptureBy :: Ref => CaptureBy :: Ref ,
687687 CaptureBy :: Use { use_kw } => CaptureBy :: Use { use_kw : self . lower_span ( use_kw) } ,
@@ -1103,7 +1103,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
11031103 }
11041104
11051105 fn closure_movability_for_fn (
1106- & mut self ,
1106+ & self ,
11071107 decl : & FnDecl ,
11081108 fn_decl_span : Span ,
11091109 coroutine_kind : Option < hir:: CoroutineKind > ,
@@ -1133,7 +1133,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
11331133 }
11341134
11351135 fn lower_closure_binder < ' c > (
1136- & mut self ,
1136+ & self ,
11371137 binder : & ' c ClosureBinder ,
11381138 ) -> ( hir:: ClosureBinder , & ' c [ GenericParam ] ) {
11391139 let ( binder, params) = match binder {
@@ -1283,7 +1283,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
12831283 /// if they are not tuple structs.
12841284 /// Type checking will take care of the full validation later.
12851285 fn extract_tuple_struct_path < ' a > (
1286- & mut self ,
1286+ & self ,
12871287 expr : & ' a Expr ,
12881288 ) -> Option < ( & ' a Option < Box < QSelf > > , & ' a Path ) > {
12891289 if let ExprKind :: Path ( qself, path) = & expr. kind {
@@ -1305,7 +1305,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
13051305 /// if they are not unit structs.
13061306 /// Type checking will take care of the full validation later.
13071307 fn extract_unit_struct_path < ' a > (
1308- & mut self ,
1308+ & self ,
13091309 expr : & ' a Expr ,
13101310 ) -> Option < ( & ' a Option < Box < QSelf > > , & ' a Path ) > {
13111311 if let ExprKind :: Path ( qself, path) = & expr. kind {
@@ -1589,7 +1589,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
15891589 Some ( Label { ident : self . lower_ident ( label. ident ) } )
15901590 }
15911591
1592- fn lower_loop_destination ( & mut self , destination : Option < ( NodeId , Label ) > ) -> hir:: Destination {
1592+ fn lower_loop_destination ( & self , destination : Option < ( NodeId , Label ) > ) -> hir:: Destination {
15931593 let target_id = match destination {
15941594 Some ( ( id, _) ) => {
15951595 if let Some ( loop_id) = self . resolver . get_label_res ( id) {
@@ -1610,7 +1610,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
16101610 hir:: Destination { label, target_id }
16111611 }
16121612
1613- fn lower_jump_destination ( & mut self , id : NodeId , opt_label : Option < Label > ) -> hir:: Destination {
1613+ fn lower_jump_destination ( & self , id : NodeId , opt_label : Option < Label > ) -> hir:: Destination {
16141614 if self . is_in_loop_condition && opt_label. is_none ( ) {
16151615 hir:: Destination {
16161616 label : None ,
0 commit comments