1 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
2 --> $DIR/borrow_box.rs:21:14
4 LL | let foo: &Box<bool>;
5 | ^^^^^^^^^^ help: try: `&bool`
7 note: the lint level is defined here
8 --> $DIR/borrow_box.rs:1:9
10 LL | #![deny(clippy::borrowed_box)]
11 | ^^^^^^^^^^^^^^^^^^^^
13 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
14 --> $DIR/borrow_box.rs:25:10
16 LL | foo: &'a Box<bool>,
17 | ^^^^^^^^^^^^^ help: try: `&'a bool`
19 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
20 --> $DIR/borrow_box.rs:29:17
22 LL | fn test4(a: &Box<bool>);
23 | ^^^^^^^^^^ help: try: `&bool`
25 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
26 --> $DIR/borrow_box.rs:95:25
28 LL | pub fn test14(_display: &Box<dyn Display>) {}
29 | ^^^^^^^^^^^^^^^^^ help: try: `&dyn Display`
31 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
32 --> $DIR/borrow_box.rs:96:25
34 LL | pub fn test15(_display: &Box<dyn Display + Send>) {}
35 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&(dyn Display + Send)`
37 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
38 --> $DIR/borrow_box.rs:97:29
40 LL | pub fn test16<'a>(_display: &'a Box<dyn Display + 'a>) {}
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&'a (dyn Display + 'a)`
43 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
44 --> $DIR/borrow_box.rs:99:25
46 LL | pub fn test17(_display: &Box<impl Display>) {}
47 | ^^^^^^^^^^^^^^^^^^ help: try: `&impl Display`
49 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
50 --> $DIR/borrow_box.rs:100:25
52 LL | pub fn test18(_display: &Box<impl Display + Send>) {}
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&(impl Display + Send)`
55 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
56 --> $DIR/borrow_box.rs:101:29
58 LL | pub fn test19<'a>(_display: &'a Box<impl Display + 'a>) {}
59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&'a (impl Display + 'a)`
61 error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
62 --> $DIR/borrow_box.rs:106:25
64 LL | pub fn test20(_display: &Box<(dyn Display + Send)>) {}
65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&(dyn Display + Send)`
67 error: aborting due to 10 previous errors