diff options
| -rw-r--r-- | compiler/rustc_lint_defs/src/builtin.rs | 1 | ||||
| -rw-r--r-- | tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index d2d0d58784e..87c542dc2e2 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -3409,6 +3409,7 @@ declare_lint_pass! { UNSTABLE_SYNTAX_PRE_EXPANSION, UNSUPPORTED_CALLING_CONVENTIONS, UNUSED_ASSIGNMENTS, + UNUSED_ASSOCIATED_TYPE_BOUNDS, UNUSED_ATTRIBUTES, UNUSED_CRATE_DEPENDENCIES, UNUSED_EXTERN_CRATES, diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs b/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs index 564081e4ef6..800624e3124 100644 --- a/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs +++ b/tests/ui/object-safety/assoc_type_bounds_sized_unnecessary.rs @@ -11,4 +11,7 @@ fn foo(_: &dyn Foo<Bar = ()>) {} //~| WARN: unnecessary associated type bound for not object safe associated type //~| WARN: unnecessary associated type bound for not object safe associated type +#[allow(unused_associated_type_bounds)] +fn bar(_: &dyn Foo<Bar = ()>) {} + fn main() {} |
