fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.5 KiB68 linesraw
1error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
2  --> $DIR/borrow_box.rs:25:14
3   |
4LL |     let foo: &Box<bool>;
5   |              ^^^^^^^^^^ help: try: `&bool`
6   |
7note: the lint level is defined here
8  --> $DIR/borrow_box.rs:1:9
9   |
10LL | #![deny(clippy::borrowed_box)]
11   |         ^^^^^^^^^^^^^^^^^^^^
12
13error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
14  --> $DIR/borrow_box.rs:30:10
15   |
16LL |     foo: &'a Box<bool>,
17   |          ^^^^^^^^^^^^^ help: try: `&'a bool`
18
19error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
20  --> $DIR/borrow_box.rs:35:17
21   |
22LL |     fn test4(a: &Box<bool>);
23   |                 ^^^^^^^^^^ help: try: `&bool`
24
25error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
26  --> $DIR/borrow_box.rs:102:25
27   |
28LL | pub fn test14(_display: &Box<dyn Display>) {}
29   |                         ^^^^^^^^^^^^^^^^^ help: try: `&dyn Display`
30
31error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
32  --> $DIR/borrow_box.rs:104:25
33   |
34LL | pub fn test15(_display: &Box<dyn Display + Send>) {}
35   |                         ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&(dyn Display + Send)`
36
37error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
38  --> $DIR/borrow_box.rs:106:29
39   |
40LL | pub fn test16<'a>(_display: &'a Box<dyn Display + 'a>) {}
41   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&'a (dyn Display + 'a)`
42
43error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
44  --> $DIR/borrow_box.rs:109:25
45   |
46LL | pub fn test17(_display: &Box<impl Display>) {}
47   |                         ^^^^^^^^^^^^^^^^^^ help: try: `&impl Display`
48
49error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
50  --> $DIR/borrow_box.rs:111:25
51   |
52LL | pub fn test18(_display: &Box<impl Display + Send>) {}
53   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&(impl Display + Send)`
54
55error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
56  --> $DIR/borrow_box.rs:113:29
57   |
58LL | pub fn test19<'a>(_display: &'a Box<impl Display + 'a>) {}
59   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&'a (impl Display + 'a)`
60
61error: you seem to be trying to use `&Box<T>`. Consider using just `&T`
62  --> $DIR/borrow_box.rs:119:25
63   |
64LL | pub fn test20(_display: &Box<(dyn Display + Send)>) {}
65   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&(dyn Display + Send)`
66
67error: aborting due to 10 previous errors
68