@@ -35,7 +35,7 @@ declare_lint! {
3535}
3636
3737declare_lint ! {
38- /// The `forget_ref ` lint checks for calls to `std::mem::forget` with a reference
38+ /// The `forgetting_references ` lint checks for calls to `std::mem::forget` with a reference
3939 /// instead of an owned value.
4040 ///
4141 /// ### Example
@@ -52,7 +52,7 @@ declare_lint! {
5252 /// Calling `forget` on a reference will only forget the
5353 /// reference itself, which is a no-op. It will not forget the underlying
5454 /// referenced value, which is likely what was intended.
55- pub FORGET_REF ,
55+ pub FORGETTING_REFERENCES ,
5656 Warn ,
5757 "calls to `std::mem::forget` with a reference instead of an owned value"
5858}
@@ -109,7 +109,7 @@ declare_lint! {
109109 "calls to `std::mem::forget` with a value that implements Copy"
110110}
111111
112- declare_lint_pass ! ( DropForgetUseless => [ DROPPING_REFERENCES , FORGET_REF , DROPPING_COPY_TYPES , FORGETTING_COPY_TYPES ] ) ;
112+ declare_lint_pass ! ( DropForgetUseless => [ DROPPING_REFERENCES , FORGETTING_REFERENCES , DROPPING_COPY_TYPES , FORGETTING_COPY_TYPES ] ) ;
113113
114114impl < ' tcx > LateLintPass < ' tcx > for DropForgetUseless {
115115 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' tcx > ) {
@@ -126,7 +126,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless {
126126 cx. emit_spanned_lint ( DROPPING_REFERENCES , expr. span , DropRefDiag { arg_ty, label : arg. span } ) ;
127127 } ,
128128 sym:: mem_forget if arg_ty. is_ref ( ) => {
129- cx. emit_spanned_lint ( FORGET_REF , expr. span , ForgetRefDiag { arg_ty, label : arg. span } ) ;
129+ cx. emit_spanned_lint ( FORGETTING_REFERENCES , expr. span , ForgetRefDiag { arg_ty, label : arg. span } ) ;
130130 } ,
131131 sym:: mem_drop if is_copy && !drop_is_single_call_in_arm => {
132132 cx. emit_spanned_lint ( DROPPING_COPY_TYPES , expr. span , DropCopyDiag { arg_ty, label : arg. span } ) ;
0 commit comments