Skip to content

Build errors with latest nightly toolchain cargo 1.75.0-nightly (65e297d1e 2023-11-03) #261

New issue

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

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

Already on GitHub? # to your account

Closed
likebreath opened this issue Nov 6, 2023 · 3 comments

Comments

@likebreath
Copy link
Contributor

With latest nightly toolchain:

cargo 1.75.0-nightly (65e297d1e 2023-11-03)
rustc 1.75.0-nightly (fee5518cd 2023-11-05)

There are several building errors like below:

error[E0308]: mismatched types
  --> src/bitmap/mod.rs:54:14
   |
54 |     type S = Self;
   |              ^^^^ lifetime mismatch
   |
   = note: expected associated type `<() as WithBitmapSlice<'a>>::S`
              found associated type `<() as WithBitmapSlice<'a>>::S`
note: the required lifetime does not necessarily outlive the lifetime `'a` as defined here
  --> src/bitmap/mod.rs:53:6
   |
53 | impl<'a> WithBitmapSlice<'a> for () {
   |      ^^
note: the lifetime requirement is introduced here
  --> src/bitmap/mod.rs:22:13
   |
22 |     type S: BitmapSlice;
   |             ^^^^^^^^^^^

error[E0308]: mismatched types
  --> src/bitmap/mod.rs:54:14
   |
54 |     type S = Self;
   |              ^^^^ lifetime mismatch
   |
   = note: expected associated type `<() as WithBitmapSlice<'a>>::S`
              found associated type `<() as WithBitmapSlice<'a>>::S`
note: the lifetime `'a` as defined here doesn't meet the lifetime requirements
  --> src/bitmap/mod.rs:53:6
   |
53 | impl<'a> WithBitmapSlice<'a> for () {
   |      ^^
note: the lifetime requirement is introduced here
  --> src/bitmap/mod.rs:22:13
   |
22 |     type S: BitmapSlice;
   |             ^^^^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `vm-memory` (lib) due to 2 previous errors

@roypat
Copy link
Member

roypat commented Nov 7, 2023

Hi @likebreath,
Thanks for the report! It seems like this is an instance of rust-lang/rust#117598, a regression in rustc. I've reduced the vm-memory code that triggers it to https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=6e162d11925f16dcdaaf1def4c81c0e3, and the trait definitions are isomorphic to what is being reported over in that issue.

@likebreath
Copy link
Contributor Author

@roypat Thank you for prompt response. Sine this is an issue from rustc nightly, I am closing the issue now.

@roypat
Copy link
Member

roypat commented Nov 9, 2023

This seems to be fixed in tonights nightly 🎉

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants