@@ -7,7 +7,7 @@ use crate::{
7
7
} ;
8
8
9
9
declare_lint ! {
10
- /// The `drop_ref ` lint checks for calls to `std::mem::drop` with a reference
10
+ /// The `dropping_references ` lint checks for calls to `std::mem::drop` with a reference
11
11
/// instead of an owned value.
12
12
///
13
13
/// ### Example
@@ -29,7 +29,7 @@ declare_lint! {
29
29
/// reference itself, which is a no-op. It will not call the `drop` method (from
30
30
/// the `Drop` trait implementation) on the underlying referenced value, which
31
31
/// is likely what was intended.
32
- pub DROP_REF ,
32
+ pub DROPPING_REFERENCES ,
33
33
Warn ,
34
34
"calls to `std::mem::drop` with a reference instead of an owned value"
35
35
}
@@ -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 => [ DROP_REF , FORGET_REF , DROPPING_COPY_TYPES , FORGETTING_COPY_TYPES ] ) ;
112
+ declare_lint_pass ! ( DropForgetUseless => [ DROPPING_REFERENCES , FORGET_REF , 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 > ) {
@@ -123,7 +123,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless {
123
123
let drop_is_single_call_in_arm = is_single_call_in_arm ( cx, arg, expr) ;
124
124
match fn_name {
125
125
sym:: mem_drop if arg_ty. is_ref ( ) && !drop_is_single_call_in_arm => {
126
- cx. emit_spanned_lint ( DROP_REF , expr. span , DropRefDiag { arg_ty, label : arg. span } ) ;
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
129
cx. emit_spanned_lint ( FORGET_REF , expr. span , ForgetRefDiag { arg_ty, label : arg. span } ) ;
0 commit comments