Skip to content

Commit 25e3785

Browse files
committed
Make unused_associated_type_bounds's lint level changeable
1 parent 307b5ff commit 25e3785

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3409,6 +3409,7 @@ declare_lint_pass! {
34093409
UNSTABLE_SYNTAX_PRE_EXPANSION,
34103410
UNSUPPORTED_CALLING_CONVENTIONS,
34113411
UNUSED_ASSIGNMENTS,
3412+
UNUSED_ASSOCIATED_TYPE_BOUNDS,
34123413
UNUSED_ATTRIBUTES,
34133414
UNUSED_CRATE_DEPENDENCIES,
34143415
UNUSED_EXTERN_CRATES,

tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ fn foo(_: &dyn Foo<Bar = ()>) {}
1111
//~| WARN: unnecessary associated type bound for not object safe associated type
1212
//~| WARN: unnecessary associated type bound for not object safe associated type
1313

14+
#[allow(unused_associated_type_bounds)]
15+
fn bar(_: &dyn Foo<Bar = ()>) {}
16+
1417
fn main() {}

0 commit comments

Comments
 (0)