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

build error #16

Open
ozkanpakdil opened this issue Apr 17, 2023 · 2 comments
Open

build error #16

ozkanpakdil opened this issue Apr 17, 2023 · 2 comments

Comments

@ozkanpakdil
Copy link

just building example code and getting error below,

error[E0599]: no method named `get_ref` found for union `MaybeUninit` in the current scope
   --> /home/oz-mint/.cargo/registry/src/github.com-1ecc6299db9ec823/rucene-0.1.1/src/core/search/query/spans/span_near.rs:509:45
    |
509 |             } else if self.conjunction_span.get_ref().one_exhausted_in_current_doc {
    |                                             ^^^^^^^ method not found in `MaybeUninit<ConjunctionSpanBase<P>>`
    |
   ::: /home/oz-mint/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/pin.rs:804:18
    |
804 |     pub const fn get_ref(self) -> &'a T {
    |                  ------- the method is available for `Pin<&MaybeUninit<span::ConjunctionSpanBase<P>>>` here
    |
help: consider wrapping the receiver expression with the appropriate type
    |
509 |             } else if Pin::new(&self.conjunction_span).get_ref().one_exhausted_in_current_doc {
    |                       ++++++++++                     +

Some errors have detailed explanations: E0308, E0554, E0599, E0635.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `rucene` due to 67 previous errors

any suggestions ?
here https://github.com/ozkanpakdil/rust-examples/tree/main/rucene_test

@msfroh
Copy link

msfroh commented Feb 16, 2024

I managed to fix those ones by replacing get_ref with assume_init_ref, since the MaybeUninit feature changed the name before it was finalized. Similarly, get_mut was renamed to assume_init_mut.

I'll post a PR with all of the fixes that @harshavamsi and I had to add to get Rucene compiling with a modern Rust toolchain.

@msfroh
Copy link

msfroh commented Feb 16, 2024

Here's that PR: #18

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

No branches or pull requests

2 participants