You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #129864 - dingxiangfei2009:reduce-false-positives-from-consumed-droppers, r=<try>
Reduce false positives of tail-expr-drop-order from consumed values
r? `@jieyouxu`
To reduce false positives, the lint does not fire if the locals are consumed/moved, or the values with significant drop are consumed/moved at the tail expression location.
For this, we rely on solving a small dataflow to determine whether a `Local` is either live, or moved/dropped.
I am also printing the type involved for easier diagnosis.
using `.deref()` on a double reference, which returns `{$ty}` instead of dereferencing the inner type
780
780
781
-
lint_tail_expr_drop_order = these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021
782
-
.label = these values have significant drop implementation and will observe changes in drop order under Edition 2024
783
-
784
781
lint_trailing_semi_macro = trailing semicolon in macro used in expression position
785
782
.note1 = macro invocations at the end of a block are treated as expressions
786
783
.note2 = to ignore the value produced by the macro, add a semicolon after the invocation of `{$name}`
0 commit comments