Omega359 commented on issue #13631:
URL: https://github.com/apache/datafusion/issues/13631#issuecomment-2659449432
I did a quick test using
cargo fix --edition and there are a lot of concerns with drop ordering and
if let scoping:
```
warning: `if let` assigns a shorter lifetime since Edition 2024
--> datafusion/common/src/scalar/mod.rs:1861:28
|
1861 | if let ScalarValue::$SCALAR_TY(v) = sv {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--
| |
| this
value has a significant drop implementation which may observe a major change in
drop order and requires your discretion
...
1937 | DataType::Int32 => build_array_primitive!(Int32Array,
Int32),
|
----------------------------------------- in this macro invocation
|
= warning: this changes meaning in Rust 2024
= note: for more information, see
<https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-if-let-scope.html>
```
```
warning: relative drop order changing in Rust 2024
--> datafusion/expr/src/utils.rs:1144:32
|
1144 | while let Some(expr) = stack.pop() {
| ---- ^^^^^^^^^^^
| | |
| | this value will be stored in a
temporary; let us call it `#2`
| | up until Edition 2021 `#2` is dropped
last but will be dropped earlier in Edition 2024
| `expr` calls a custom destructor
| `expr` will be dropped later as of Edition 2024
...
1147 | right,
| -----
| |
| `right` calls a custom destructor
| `right` will be dropped later as of Edition 2024
1148 | op: Operator::And,
1149 | left,
| ----
| |
| `left` calls a custom destructor
| `left` will be dropped later as of Edition 2024
...
1154 | Expr::Alias(Alias { expr, .. }) => stack.push(*expr),
| ----
| |
| this value will be stored in a
temporary; let us call it `#1`
| `#1` will be dropped later as of
Edition 2024
...
1157 | }
| - now the temporary value is dropped here, before the local
variables in the block or statement
```
It's not going to be a quick migration. 2024 also required <= 1.85.0 so
Datafusion couldn't use it until 1.89.0 is released according to the MSRV
policy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]