Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation failure on nightly rust #47

Open
kurtlawrence opened this issue Mar 13, 2024 · 5 comments
Open

Compilation failure on nightly rust #47

kurtlawrence opened this issue Mar 13, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@kurtlawrence
Copy link

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.

@kurtlawrence kurtlawrence added the bug Something isn't working label Mar 13, 2024
@domenicquirl
Copy link
Contributor

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.

@fmckeogh
Copy link

fmckeogh commented May 2, 2024

I believe this has now hit stable

@ThePseudo
Copy link

I confirm, the problem hit Rust stable.

@fmckeogh
Copy link

If nobody else wants to, I can fork and publish a maintained version with some of the outstanding PRs merged?

silvanshade added a commit to silvanshade/lasso2 that referenced this issue May 22, 2024
silvanshade added a commit to silvanshade/lasso2 that referenced this issue May 22, 2024
@silvanshade
Copy link

I published a fork at lasso2 with a fix for this. I will try to keep it maintained so contributions are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants