We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ae065f commit b4738a6Copy full SHA for b4738a6
tests/ui/needless_borrow.fixed
@@ -492,3 +492,15 @@ mod issue_9782_method_variant {
492
S.foo::<&[u8; 100]>(&a);
493
}
494
495
+
496
+mod issue_10535 {
497
+ static SOME_STATIC: String = String::new();
498
499
+ static UNIT: () = compute(&SOME_STATIC);
500
501
+ pub const fn compute<T>(_: T)
502
+ where
503
+ T: Copy,
504
+ {
505
+ }
506
+}
tests/ui/needless_borrow.rs
0 commit comments