Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 3365e50

Browse files
clippy: Enable forget_non_drop rule
1 parent cdc3e83 commit 3365e50

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ useless_asref = "allow"
170170
## Following lints should be tackled at some point
171171
borrowed_box = "allow"
172172
derived_hash_with_manual_eq = "allow"
173-
forget_non_drop = "allow"
174173
needless_doctest_main = "allow"
175174
too_many_arguments = "allow"
176175
type_complexity = "allow"

crates/hir-ty/src/mir/lower.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ impl DropScopeToken {
126126
}
127127
}
128128

129+
impl Drop for DropScopeToken {
130+
fn drop(&mut self) {}
131+
}
132+
129133
// Uncomment this to make `DropScopeToken` a drop bomb. Unfortunately we can't do this in release, since
130134
// in cases that mir lowering fails, we don't handle (and don't need to handle) drop scopes so it will be
131135
// actually reached. `pop_drop_scope_assert_finished` will also detect this case, but doesn't show useful

0 commit comments

Comments
 (0)