diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-06-16 12:46:28 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-05 07:46:05 +0000 |
| commit | 25e3785b8691e269e4e10bb8deeae0df205e22c1 (patch) | |
| tree | e18ba1ceab697ba02e96f025d3bdff3d673d1799 | |
| parent | 307b5ffff37338e943d1c2b51e10f3d26654e6c2 (diff) | |
| download | rust-25e3785b8691e269e4e10bb8deeae0df205e22c1.tar.gz rust-25e3785b8691e269e4e10bb8deeae0df205e22c1.zip | |
Make `unused_associated_type_bounds`'s lint level changeable
| -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() {} |
