We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f90b9c4 + 97d95d4 commit 3c58b2aCopy full SHA for 3c58b2a
compiler/rustc_lint/src/unused.rs
@@ -1002,6 +1002,7 @@ impl EarlyLintPass for UnusedParens {
1002
if let ast::TyKind::Paren(r) = &ty.kind {
1003
match &r.kind {
1004
ast::TyKind::TraitObject(..) => {}
1005
+ ast::TyKind::BareFn(b) if b.generic_params.len() > 0 => {}
1006
ast::TyKind::ImplTrait(_, bounds) if bounds.len() > 1 => {}
1007
ast::TyKind::Array(_, len) => {
1008
self.check_unused_delims_expr(
src/test/ui/lint/unused/issue-104397.rs
@@ -0,0 +1,18 @@
1
+// check-pass
2
+
3
+#![warn(unused)]
4
+#![deny(warnings)]
5
6
+struct Inv<'a>(&'a mut &'a ());
7
8
+trait Trait {}
9
+impl Trait for for<'a> fn(Inv<'a>) {}
10
11
+fn with_bound()
12
+where
13
+ (for<'a> fn(Inv<'a>)): Trait,
14
+{}
15
16
+fn main() {
17
+ with_bound();
18
+}
0 commit comments