Skip to content

update edition to 2024 #2620

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

Merged
merged 9 commits into from
Apr 18, 2025
Merged

update edition to 2024 #2620

merged 9 commits into from
Apr 18, 2025

Conversation

PSeitz
Copy link
Collaborator

@PSeitz PSeitz commented Apr 9, 2025

  • update common to edition 2024
  • update bitpacker to edition 2024
  • update stacker to edition 2024
  • update query-grammar to edition 2024
  • update sstable to edition 2024 + fmt

Note: relative drop order changed in Rust 2024. This should be fine except for locks, where it may cause issues (or fix them since the behavior is more consistent)

warning: relative drop order changing in Rust 2024
   --> src/directory/managed_directory.rs:138:19
    |
127 |             let meta_informations_rlock = self
    |                 -----------------------
    |                 |
    |                 `meta_informations_rlock` calls a custom destructor
    |                 `meta_informations_rlock` will be dropped later as of Edition 2024
...
138 |             match self.acquire_lock(&META_LOCK) {
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                   |
    |                   this value will be stored in a temporary; let us call it `#1`
    |                   up until Edition 2021 `#1` is dropped last but will be dropped earlier in Edition 2024
...
152 |         }
    |         - now the temporary value is dropped here, before the local variables in the block or statement
    |
    = warning: this changes meaning in Rust 2024
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
    = note: `#1` may invoke a custom destructor because it contains a trait object

@PSeitz PSeitz requested a review from fulmicoton-dd April 11, 2025 07:43
column_indexes.push(idx);
column_values.push(Some(values));
}
_ => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_ => {
None => {

@PSeitz PSeitz merged commit 5379c99 into main Apr 18, 2025
7 checks passed
@PSeitz PSeitz deleted the update_edition branch April 18, 2025 02:56
kryesh pushed a commit to kryesh/tantivy that referenced this pull request Apr 19, 2025
* update common to edition 2024

* update bitpacker to edition 2024

* update stacker to edition 2024

* update query-grammar to edition 2024

* update sstable to edition 2024 + fmt

* fmt

* update columnar to edition 2024

* cargo fmt

* use None instead of _
kryesh pushed a commit to kryesh/tantivy that referenced this pull request Apr 21, 2025
* update common to edition 2024

* update bitpacker to edition 2024

* update stacker to edition 2024

* update query-grammar to edition 2024

* update sstable to edition 2024 + fmt

* fmt

* update columnar to edition 2024

* cargo fmt

* use None instead of _
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

Successfully merging this pull request may close these issues.

3 participants