Skip to content

Commit aad27d2

Browse files
dingxiangfei2009compiler-errors
authored andcommitted
revert gate test to work only when migration is triggered
1 parent 51fe635 commit aad27d2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

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

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
// This test ensures that `tail_expr_drop_order` does not activate in case Edition 2024 is not used
2-
// or the feature gate `shorter_tail_lifetimes` is disabled.
1+
// This test ensures that `tail_expr_drop_order` does not activate in case Edition 2024 is used
2+
// because this is a migration lint.
3+
// Only `cargo fix --edition 2024` shall activate this lint.
34

4-
//@ revisions: neither no_feature_gate edition_less_than_2024
5+
//@ revisions: neither no_feature_gate edition_at_least_2024
56
//@ check-pass
6-
//@ [neither] edition: 2021
7-
//@ [no_feature_gate] compile-flags: -Z unstable-options
8-
//@ [no_feature_gate] edition: 2024
9-
//@ [edition_less_than_2024] edition: 2021
7+
//@ compile-flags: -Z unstable-options
8+
//@ edition: 2024
109

1110
#![deny(tail_expr_drop_order)]
12-
#![cfg_attr(edition_less_than_2024, feature(shorter_tail_lifetimes))]
1311

1412
struct LoudDropper;
1513
impl Drop for LoudDropper {

0 commit comments

Comments
 (0)