1 error: usage of `Rc<&T>`
2 --> $DIR/redundant_allocation.rs:22:22
4 LL | pub fn test1<T>(foo: Rc<&T>) {}
5 | ^^^^^^ help: try: `&T`
7 = note: `-D clippy::redundant-allocation` implied by `-D warnings`
9 error: usage of `Rc<&T>`
10 --> $DIR/redundant_allocation.rs:24:19
12 LL | pub fn test2(foo: Rc<&MyStruct>) {}
13 | ^^^^^^^^^^^^^ help: try: `&MyStruct`
15 error: usage of `Rc<&T>`
16 --> $DIR/redundant_allocation.rs:26:19
18 LL | pub fn test3(foo: Rc<&MyEnum>) {}
19 | ^^^^^^^^^^^ help: try: `&MyEnum`
21 error: usage of `Rc<Rc<T>>`
22 --> $DIR/redundant_allocation.rs:32:17
24 LL | pub fn test5(a: Rc<Rc<bool>>) {}
25 | ^^^^^^^^^^^^ help: try: `Rc<bool>`
27 error: usage of `Rc<Box<T>>`
28 --> $DIR/redundant_allocation.rs:36:17
30 LL | pub fn test6(a: Rc<Box<bool>>) {}
31 | ^^^^^^^^^^^^^ help: try: `Rc<bool>`
33 error: usage of `Box<&T>`
34 --> $DIR/redundant_allocation.rs:40:22
36 LL | pub fn test7<T>(foo: Box<&T>) {}
37 | ^^^^^^^ help: try: `&T`
39 error: usage of `Box<&T>`
40 --> $DIR/redundant_allocation.rs:42:19
42 LL | pub fn test8(foo: Box<&MyStruct>) {}
43 | ^^^^^^^^^^^^^^ help: try: `&MyStruct`
45 error: usage of `Box<&T>`
46 --> $DIR/redundant_allocation.rs:44:19
48 LL | pub fn test9(foo: Box<&MyEnum>) {}
49 | ^^^^^^^^^^^^ help: try: `&MyEnum`
51 error: aborting due to 8 previous errors