Closed
Description
- https://crater-reports.s3.amazonaws.com/beta-1.85-1/beta-2025-01-12/gh/LP-Finance-Inc.twamm/log.txt
- https://crater-reports.s3.amazonaws.com/beta-1.85-1/beta-2025-01-12/gh/Mokosha.pbrt_rust/log.txt
- https://crater-reports.s3.amazonaws.com/beta-1.85-1/beta-2025-01-12/gh/jw1912.diffable/log.txt
[INFO] [stdout] error[E0502]: cannot borrow `*inputs` as immutable because it is also borrowed as mutable
[INFO] [stdout] --> examples/basic.rs:267:27
[INFO] [stdout] |
[INFO] [stdout] 263 | if let Some(grd) = inputs[0].grad.as_mut() {
[INFO] [stdout] | -------------- mutable borrow occurs here
[INFO] [stdout] 264 | / *grd += output_grad
[INFO] [stdout] 265 | | * if inputs[0].val > 0.0 {
[INFO] [stdout] 266 | | 1.0
[INFO] [stdout] 267 | | } else if inputs[0].val == 0.0 {
[INFO] [stdout] | | ^^^^^^^^^ immutable borrow occurs here
[INFO] [stdout] ... |
[INFO] [stdout] 270 | | -1.0
[INFO] [stdout] 271 | | };
[INFO] [stdout] | |_________________- mutable borrow later used here