@@ -96,7 +96,7 @@ declare_clippy_lint! {
96
96
declare_lint_pass ! ( MemReplace =>
97
97
[ MEM_REPLACE_OPTION_WITH_NONE , MEM_REPLACE_WITH_UNINIT , MEM_REPLACE_WITH_DEFAULT ] ) ;
98
98
99
- fn check_replace_option_with_none ( cx : & LateContext < ' _ , ' _ > , src : & Expr , dest : & Expr , expr_span : Span ) {
99
+ fn check_replace_option_with_none ( cx : & LateContext < ' _ , ' _ > , src : & Expr < ' _ > , dest : & Expr < ' _ > , expr_span : Span ) {
100
100
if let ExprKind :: Path ( ref replacement_qpath) = src. kind {
101
101
// Check that second argument is `Option::None`
102
102
if match_qpath ( replacement_qpath, & paths:: OPTION_NONE ) {
@@ -134,7 +134,7 @@ fn check_replace_option_with_none(cx: &LateContext<'_, '_>, src: &Expr, dest: &E
134
134
}
135
135
}
136
136
137
- fn check_replace_with_uninit ( cx : & LateContext < ' _ , ' _ > , src : & Expr , expr_span : Span ) {
137
+ fn check_replace_with_uninit ( cx : & LateContext < ' _ , ' _ > , src : & Expr < ' _ > , expr_span : Span ) {
138
138
if let ExprKind :: Call ( ref repl_func, ref repl_args) = src. kind {
139
139
if_chain ! {
140
140
if repl_args. is_empty( ) ;
@@ -164,7 +164,7 @@ fn check_replace_with_uninit(cx: &LateContext<'_, '_>, src: &Expr, expr_span: Sp
164
164
}
165
165
}
166
166
167
- fn check_replace_with_default ( cx : & LateContext < ' _ , ' _ > , src : & Expr , dest : & Expr , expr_span : Span ) {
167
+ fn check_replace_with_default ( cx : & LateContext < ' _ , ' _ > , src : & Expr < ' _ > , dest : & Expr < ' _ > , expr_span : Span ) {
168
168
if let ExprKind :: Call ( ref repl_func, _) = src. kind {
169
169
if_chain ! {
170
170
if !in_external_macro( cx. tcx. sess, expr_span) ;
0 commit comments