Skip to content

Commit 27b60a8

Browse files
apply suggestions
1 parent 0e60076 commit 27b60a8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

compiler/rustc_lint/src/tail_expr_drop_order.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ use rustc_span::edition::Edition;
1414
use crate::{LateContext, LateLintPass};
1515

1616
declare_lint! {
17-
/// The `tail_expr_drop_order` lint looks for those values generated at the tail expression location, that of type
18-
/// with a significant `Drop` implementation, such as locks.
19-
/// In case there are also local variables of type with significant `Drop` implementation as well,
20-
/// this lint warns you of a potential transposition in the drop order.
17+
/// The `tail_expr_drop_order` lint looks for those values generated at the tail expression location,
18+
/// that of type with a custom `Drop` destructor implementation, which will be dropped earlier in Edition 2024.
2119
/// Your discretion on the new drop order introduced by Edition 2024 is required.
2220
///
2321
/// ### Example

tests/ui/drop/lint-tail-expr-drop-order-gated.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// This test is to demonstrate that the lint is gated behind Edition and
2+
// is triggered only for Edition 2021 and before.
3+
14
//@ check-pass
25
//@ edition: 2024
36
//@ compile-flags: -Z unstable-options

0 commit comments

Comments
 (0)