Closed jonhnet closed 1 month ago
Minimized to ~8% of the above size, while triggering the same issue: 2024-06-05-17-44-02.zip
$ verus foo.rs
error: the trait bound `A1_T: std::marker::Copy` is not satisfied
--> foo.rs:63:1
|
63 | }
| ^^^^
error: aborting due to 1 previous error
note: This error was found in Verus pass: ownership checking of tracked code
error: aborting due to 2 previous errors
Minimization steps:
marshal.rs
to marshal/mod.rs
), to produce a single file foo.rs
that triggers the issue.interesting.sh
.creduce --n 16 ./interesting.sh ./foo.rs
to get auto-minimized version of the code.verusfmt foo.rs
to make it more readable.Hopefully the above docs help with automatic minimization in the future for non-trivial cases such as the one triggered in this issue. For easier cases, https://github.com/verus-lang/verus/tree/main/source/tools/minimizers has some easy-to-use interestingness-test scripts (e.g., see rlimit_exceeded.sh).
Wow that autominimizer is pretty great.
Can you try with the most recent commit?
Yup, that seems to have fixed it. Thank you!
In the enclosed recording, we get this error:
The first weird thing is that the spans are broken. The actual offending line, 384, says
T::test_have_a_t()
. That is a trait method defined at line 38 in the trait IntFormattable; notably, IntFormattable hasCopy
as a subtrait. Line 384 lives inside an impl block declared on line 303 as:So
T
should definitely be Copy, by virtue of beingIntFormattable
.@jaybosamiya suggested adding the
+ Copy
on line 303 (commented out in this recording), which indeed makes the error message disappear.I tried minimizing, but was unable to reproduce the behavior in a smaller form.
2024-06-05-14-26-37.zip