We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a50755 commit 5db8647Copy full SHA for 5db8647
clippy_tests/examples/borrow_box.rs
@@ -18,6 +18,16 @@ struct Test3<'a> {
18
foo: &'a Box<bool>
19
}
20
21
+trait Test4 {
22
+ fn test4(a: &Box<bool>);
23
+}
24
+
25
+impl<'a> Test4 for Test3<'a> {
26
+ fn test4(a: &Box<bool>) {
27
+ unimplemented!();
28
+ }
29
30
31
fn main(){
32
test1(&mut Box::new(false));
33
test2();
clippy_tests/examples/borrow_box.stderr
@@ -22,6 +22,12 @@ error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
18 | foo: &'a Box<bool>
| ^^^^^^^^^^^^^ help: try `&'a bool`
+error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
+ --> borrow_box.rs:22:17
+ |
+22 | fn test4(a: &Box<bool>);
+ | ^^^^^^^^^^ help: try `&bool`
error: aborting due to previous error(s)
error: Could not compile `clippy_tests`.
0 commit comments