FStarLang / karamel

KaRaMeL is a tool for extracting low-level F* programs to readable C code
Apache License 2.0
394 stars 58 forks source link

Remove borrows automatically inserted by Rust compiler in split_at #465

Closed R1kM closed 3 weeks ago

R1kM commented 3 weeks ago

The Rust compiler seems to automatically borrow arrays in a split_at/split_at_mut methodcall. This PR adds a pass to strip unneeded borrows after translation and mutability inference, solving a large number of Clippy warnings in HACL-rs. The relevant changes are at the very bottom of the file, the rest of the changes remove trailing whitespaces.