We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
let mut
1 parent 4c583ff commit ce47b3cCopy full SHA for ce47b3c
fiat-constify/src/main.rs
@@ -199,6 +199,21 @@ fn rewrite_fn_body(stmts: &[Stmt], outputs: &Outputs) -> Vec<Stmt> {
199
}
200
} else if let Stmt::Expr(Expr::Call(expr), Some(_)) = stmt {
201
rewritten.push(Stmt::Local(rewrite_fn_call(expr.clone())));
202
+ } else if let Stmt::Local(Local {
203
+ pat: Pat::Type(pat),
204
+ ..
205
+ }) = stmt
206
+ {
207
+ let unboxed = pat.pat.as_ref();
208
+ if let Pat::Ident(PatIdent {
209
+ mutability: Some(_),
210
211
+ }) = unboxed
212
213
+ // This is a mut var, in the case of fiat-crypto transformation dead code
214
+ } else {
215
+ rewritten.push(stmt.clone());
216
+ }
217
} else {
218
rewritten.push(stmt.clone());
219
0 commit comments