@@ -127,8 +127,7 @@ fn has_no_effect(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
127127 | ExprKind :: Type ( inner, _)
128128 | ExprKind :: Unary ( _, inner)
129129 | ExprKind :: Field ( inner, _)
130- | ExprKind :: AddrOf ( _, _, inner)
131- | ExprKind :: Box ( inner) => has_no_effect ( cx, inner) ,
130+ | ExprKind :: AddrOf ( _, _, inner) => has_no_effect ( cx, inner) ,
132131 ExprKind :: Struct ( _, fields, ref base) => {
133132 !has_drop ( cx, cx. typeck_results ( ) . expr_ty ( expr) )
134133 && fields. iter ( ) . all ( |field| has_no_effect ( cx, field. expr ) )
@@ -234,8 +233,7 @@ fn reduce_expression<'a>(cx: &LateContext<'_>, expr: &'a Expr<'a>) -> Option<Vec
234233 | ExprKind :: Type ( inner, _)
235234 | ExprKind :: Unary ( _, inner)
236235 | ExprKind :: Field ( inner, _)
237- | ExprKind :: AddrOf ( _, _, inner)
238- | ExprKind :: Box ( inner) => reduce_expression ( cx, inner) . or_else ( || Some ( vec ! [ inner] ) ) ,
236+ | ExprKind :: AddrOf ( _, _, inner) => reduce_expression ( cx, inner) . or_else ( || Some ( vec ! [ inner] ) ) ,
239237 ExprKind :: Struct ( _, fields, ref base) => {
240238 if has_drop ( cx, cx. typeck_results ( ) . expr_ty ( expr) ) {
241239 None
0 commit comments