@@ -7,7 +7,7 @@ use crate::{
77} ;
88
99declare_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
1111 /// instead of an owned value.
1212 ///
1313 /// ### Example
@@ -29,7 +29,7 @@ declare_lint! {
2929 /// reference itself, which is a no-op. It will not call the `drop` method (from
3030 /// the `Drop` trait implementation) on the underlying referenced value, which
3131 /// is likely what was intended.
32- pub DROP_REF ,
32+ pub DROPPING_REFERENCES ,
3333 Warn ,
3434 "calls to `std::mem::drop` with a reference instead of an owned value"
3535}
@@ -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 => [ 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 ] ) ;
113113
114114impl < ' tcx > LateLintPass < ' tcx > for DropForgetUseless {
115115 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' tcx > ) {
@@ -123,7 +123,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless {
123123 let drop_is_single_call_in_arm = is_single_call_in_arm ( cx, arg, expr) ;
124124 match fn_name {
125125 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 } ) ;
127127 } ,
128128 sym:: mem_forget if arg_ty. is_ref ( ) => {
129129 cx. emit_spanned_lint ( FORGET_REF , expr. span , ForgetRefDiag { arg_ty, label : arg. span } ) ;
0 commit comments