Skip to content

Commit 07e30a0

Browse files
committed
[significant_drop_tightening] Add MVP
1 parent fd2d8be commit 07e30a0

File tree

7 files changed

+566
-0
lines changed

7 files changed

+566
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4734,6 +4734,7 @@ Released 2018-09-13
47344734
[`should_assert_eq`]: https://rust-lang.github.io/rust-clippy/master/index.html#should_assert_eq
47354735
[`should_implement_trait`]: https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
47364736
[`significant_drop_in_scrutinee`]: https://rust-lang.github.io/rust-clippy/master/index.html#significant_drop_in_scrutinee
4737+
[`significant_drop_tightening`]: https://rust-lang.github.io/rust-clippy/master/index.html#significant_drop_tightening
47374738
[`similar_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#similar_names
47384739
[`single_char_add_str`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
47394740
[`single_char_lifetime_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_char_lifetime_names

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
536536
crate::shadow::SHADOW_REUSE_INFO,
537537
crate::shadow::SHADOW_SAME_INFO,
538538
crate::shadow::SHADOW_UNRELATED_INFO,
539+
crate::significant_drop_tightening::SIGNIFICANT_DROP_TIGHTENING_INFO,
539540
crate::single_char_lifetime_names::SINGLE_CHAR_LIFETIME_NAMES_INFO,
540541
crate::single_component_path_imports::SINGLE_COMPONENT_PATH_IMPORTS_INFO,
541542
crate::size_of_in_element_count::SIZE_OF_IN_ELEMENT_COUNT_INFO,

clippy_lints/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![feature(box_patterns)]
44
#![feature(control_flow_enum)]
55
#![feature(drain_filter)]
6+
#![feature(if_let_guard)]
67
#![feature(iter_intersperse)]
78
#![feature(let_chains)]
89
#![feature(lint_reasons)]
@@ -264,6 +265,7 @@ mod semicolon_block;
264265
mod semicolon_if_nothing_returned;
265266
mod serde_api;
266267
mod shadow;
268+
mod significant_drop_tightening;
267269
mod single_char_lifetime_names;
268270
mod single_component_path_imports;
269271
mod size_of_in_element_count;
@@ -559,6 +561,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
559561
store.register_late_pass(|_| Box::new(eta_reduction::EtaReduction));
560562
store.register_late_pass(|_| Box::new(mut_mut::MutMut));
561563
store.register_late_pass(|_| Box::new(mut_reference::UnnecessaryMutPassed));
564+
store.register_late_pass(|_| Box::<significant_drop_tightening::SignificantDropTightening<'_>>::default());
562565
store.register_late_pass(|_| Box::new(len_zero::LenZero));
563566
store.register_late_pass(|_| Box::new(attrs::Attributes));
564567
store.register_late_pass(|_| Box::new(blocks_in_if_conditions::BlocksInIfConditions));

0 commit comments

Comments
 (0)