Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiangfei2009 committed Oct 21, 2024
1 parent 0e60076 commit 27b60a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions compiler/rustc_lint/src/tail_expr_drop_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ use rustc_span::edition::Edition;
use crate::{LateContext, LateLintPass};

declare_lint! {
/// The `tail_expr_drop_order` lint looks for those values generated at the tail expression location, that of type
/// with a significant `Drop` implementation, such as locks.
/// In case there are also local variables of type with significant `Drop` implementation as well,
/// this lint warns you of a potential transposition in the drop order.
/// The `tail_expr_drop_order` lint looks for those values generated at the tail expression location,
/// that of type with a custom `Drop` destructor implementation, which will be dropped earlier in Edition 2024.
/// Your discretion on the new drop order introduced by Edition 2024 is required.
///
/// ### Example
Expand Down
3 changes: 3 additions & 0 deletions tests/ui/drop/lint-tail-expr-drop-order-gated.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// This test is to demonstrate that the lint is gated behind Edition and
// is triggered only for Edition 2021 and before.

//@ check-pass
//@ edition: 2024
//@ compile-flags: -Z unstable-options
Expand Down

0 comments on commit 27b60a8

Please sign in to comment.