@@ -52,28 +52,28 @@ fn handle_static_mut_ref(
52
52
tcx : TyCtxt < ' _ > ,
53
53
span : Span ,
54
54
var : String ,
55
- e2024 : bool ,
55
+ _e2024 : bool ,
56
56
mutable : Mutability ,
57
57
hir_id : hir:: HirId ,
58
58
) {
59
- if e2024 {
60
- let ( sugg, shared) = if mutable == Mutability :: Mut {
61
- ( errors:: StaticMutRefSugg :: Mut { span, var } , "mutable" )
62
- } else {
63
- ( errors:: StaticMutRefSugg :: Shared { span, var } , "shared" )
64
- } ;
65
- tcx. sess . psess . dcx . emit_err ( errors:: StaticMutRef { span, sugg, shared } ) ;
59
+ // if e2024 {
60
+ // let (sugg, shared) = if mutable == Mutability::Mut {
61
+ // (errors::StaticMutRefSugg::Mut { span, var }, "mutable")
62
+ // } else {
63
+ // (errors::StaticMutRefSugg::Shared { span, var }, "shared")
64
+ // };
65
+ // tcx.sess.psess.dcx.emit_err(errors::StaticMutRef { span, sugg, shared });
66
+ // } else {
67
+ let ( sugg, shared) = if mutable == Mutability :: Mut {
68
+ ( errors:: RefOfMutStaticSugg :: Mut { span, var } , "mutable" )
66
69
} else {
67
- let ( sugg, shared) = if mutable == Mutability :: Mut {
68
- ( errors:: RefOfMutStaticSugg :: Mut { span, var } , "mutable" )
69
- } else {
70
- ( errors:: RefOfMutStaticSugg :: Shared { span, var } , "shared" )
71
- } ;
72
- tcx. emit_node_span_lint (
73
- STATIC_MUT_REFS ,
74
- hir_id,
75
- span,
76
- errors:: RefOfMutStatic { span, sugg, shared } ,
77
- ) ;
78
- }
70
+ ( errors:: RefOfMutStaticSugg :: Shared { span, var } , "shared" )
71
+ } ;
72
+ tcx. emit_node_span_lint (
73
+ STATIC_MUT_REFS ,
74
+ hir_id,
75
+ span,
76
+ errors:: RefOfMutStatic { span, sugg, shared } ,
77
+ ) ;
78
+ // }
79
79
}
0 commit comments