@@ -35,7 +35,7 @@ declare_lint! {
35
35
}
36
36
37
37
declare_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
39
39
/// instead of an owned value.
40
40
///
41
41
/// ### Example
@@ -52,7 +52,7 @@ declare_lint! {
52
52
/// Calling `forget` on a reference will only forget the
53
53
/// reference itself, which is a no-op. It will not forget the underlying
54
54
/// referenced value, which is likely what was intended.
55
- pub FORGET_REF ,
55
+ pub FORGETTING_REFERENCES ,
56
56
Warn ,
57
57
"calls to `std::mem::forget` with a reference instead of an owned value"
58
58
}
@@ -109,7 +109,7 @@ declare_lint! {
109
109
"calls to `std::mem::forget` with a value that implements Copy"
110
110
}
111
111
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 ] ) ;
113
113
114
114
impl < ' tcx > LateLintPass < ' tcx > for DropForgetUseless {
115
115
fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' tcx > ) {
@@ -126,7 +126,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless {
126
126
cx. emit_spanned_lint ( DROPPING_REFERENCES , expr. span , DropRefDiag { arg_ty, label : arg. span } ) ;
127
127
} ,
128
128
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 } ) ;
130
130
} ,
131
131
sym:: mem_drop if is_copy && !drop_is_single_call_in_arm => {
132
132
cx. emit_spanned_lint ( DROPPING_COPY_TYPES , expr. span , DropCopyDiag { arg_ty, label : arg. span } ) ;
0 commit comments