We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfd5198 commit ab4b5f2Copy full SHA for ab4b5f2
tests/compile-fail/borrow_box.rs
@@ -4,11 +4,22 @@
4
#![deny(clippy)]
5
#![allow(boxed_local)]
6
#![allow(blacklisted_name)]
7
+#![allow(unused_variables)]
8
+#![allow(dead_code)]
9
-pub fn test(foo: &Box<bool>) { //~ ERROR you seem to be trying to use `&Box<T>`
10
+pub fn test1(foo: &Box<bool>) { //~ ERROR you seem to be trying to use `&Box<T>`
11
println!("{:?}", foo)
12
}
13
14
+pub fn test2() {
15
+ let foo: &Box<bool>; //~ ERROR you seem to be trying to use `&Box<T>`
16
+}
17
+
18
+struct Test3<'a> {
19
+ foo: &'a Box<bool> //~ ERROR you seem to be trying to use `&Box<T>`
20
21
22
fn main(){
- test(&Box::new(false));
23
+ test1(&Box::new(false));
24
+ test2();
25
0 commit comments