lasso
lasso copied to clipboard
Compilation failure on nightly rust
I tried this code
Nightly: nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.78.0-nightly (4a0cc881d 2024-03-11)
cargo +nightly check -F serialize
Results in compilation error:
error[E0275]: overflow evaluating the requirement `&_ well-formed`
--> src/util.rs:445:13
|
445 | $slice[$idx]
| ^^^^^^^^^^^^
|
::: src/reader.rs:453:49
|
453 | let key_string: &str = unsafe { index_unchecked!(strings, key.into_usize()) };
| ------------------------------------------- in this macro invocation
|
= note: this error originates in the macro `index_unchecked` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0275]: overflow evaluating the requirement `&_ well-formed`
--> src/util.rs:445:13
|
445 | $slice[$idx]
| ^^^^^^^^^^^^
|
::: src/rodeo.rs:1132:49
|
1132 | let key_string: &str = unsafe { index_unchecked!(strings, key.into_usize()) };
| ------------------------------------------- in this macro invocation
|
= note: this error originates in the macro `index_unchecked` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0275`.
warning: `lasso` (lib) generated 7 warnings
error: could not compile `lasso` (lib) due to 2 previous errors; 7 warnings emitted
Possibly related to #45, but a fix will be required for debug.
I'd like to +1 this. My CI runs over in cstree started to fail due to this issue 2 months ago because anything that runs on nightly no longer compiles.
Happy to help with a fix, though I can't quite make out what's the issue with / required beyond #45.
I believe this has now hit stable
I confirm, the problem hit Rust stable.
If nobody else wants to, I can fork and publish a maintained version with some of the outstanding PRs merged?
I published a fork at lasso2 with a fix for this. I will try to keep it maintained so contributions are welcome.
Thanks for merging #45 @Kixiron! Apologies for explicitly bothering you again, but would you be able to cut a new release now that everything compiles again? I can build with master, but can't publish anything while the dependency points to a GitHub branch 🙏🏻