fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: usage of `Box<Rc<T>>` 2 --> $DIR/redundant_allocation.rs:16:30 3 | 4LL | pub fn box_test6<T>(foo: Box<Rc<T>>) {} 5 | ^^^^^^^^^^ 6 | 7 = note: `Rc<T>` is already on the heap, `Box<Rc<T>>` makes an extra allocation 8 = help: consider using just `Box<T>` or `Rc<T>` 9 = note: `-D clippy::redundant-allocation` implied by `-D warnings` 10 = help: to override `-D warnings` add `#[allow(clippy::redundant_allocation)]` 11 12error: usage of `Box<Arc<T>>` 13 --> $DIR/redundant_allocation.rs:20:30 14 | 15LL | pub fn box_test7<T>(foo: Box<Arc<T>>) {} 16 | ^^^^^^^^^^^ 17 | 18 = note: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation 19 = help: consider using just `Box<T>` or `Arc<T>` 20 21error: usage of `Box<Rc<SubT<usize>>>` 22 --> $DIR/redundant_allocation.rs:24:27 23 | 24LL | pub fn box_test8() -> Box<Rc<SubT<usize>>> { 25 | ^^^^^^^^^^^^^^^^^^^^ 26 | 27 = note: `Rc<SubT<usize>>` is already on the heap, `Box<Rc<SubT<usize>>>` makes an extra allocation 28 = help: consider using just `Box<SubT<usize>>` or `Rc<SubT<usize>>` 29 30error: usage of `Box<Arc<T>>` 31 --> $DIR/redundant_allocation.rs:30:30 32 | 33LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> { 34 | ^^^^^^^^^^^ 35 | 36 = note: `Arc<T>` is already on the heap, `Box<Arc<T>>` makes an extra allocation 37 = help: consider using just `Box<T>` or `Arc<T>` 38 39error: usage of `Box<Arc<SubT<T>>>` 40 --> $DIR/redundant_allocation.rs:30:46 41 | 42LL | pub fn box_test9<T>(foo: Box<Arc<T>>) -> Box<Arc<SubT<T>>> { 43 | ^^^^^^^^^^^^^^^^^ 44 | 45 = note: `Arc<SubT<T>>` is already on the heap, `Box<Arc<SubT<T>>>` makes an extra allocation 46 = help: consider using just `Box<SubT<T>>` or `Arc<SubT<T>>` 47 48error: usage of `Rc<Box<bool>>` 49 --> $DIR/redundant_allocation.rs:45:24 50 | 51LL | pub fn rc_test5(a: Rc<Box<bool>>) {} 52 | ^^^^^^^^^^^^^ 53 | 54 = note: `Box<bool>` is already on the heap, `Rc<Box<bool>>` makes an extra allocation 55 = help: consider using just `Rc<bool>` or `Box<bool>` 56 57error: usage of `Rc<Arc<bool>>` 58 --> $DIR/redundant_allocation.rs:49:24 59 | 60LL | pub fn rc_test7(a: Rc<Arc<bool>>) {} 61 | ^^^^^^^^^^^^^ 62 | 63 = note: `Arc<bool>` is already on the heap, `Rc<Arc<bool>>` makes an extra allocation 64 = help: consider using just `Rc<bool>` or `Arc<bool>` 65 66error: usage of `Rc<Box<SubT<usize>>>` 67 --> $DIR/redundant_allocation.rs:53:26 68 | 69LL | pub fn rc_test8() -> Rc<Box<SubT<usize>>> { 70 | ^^^^^^^^^^^^^^^^^^^^ 71 | 72 = note: `Box<SubT<usize>>` is already on the heap, `Rc<Box<SubT<usize>>>` makes an extra allocation 73 = help: consider using just `Rc<SubT<usize>>` or `Box<SubT<usize>>` 74 75error: usage of `Rc<Arc<T>>` 76 --> $DIR/redundant_allocation.rs:59:29 77 | 78LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> { 79 | ^^^^^^^^^^ 80 | 81 = note: `Arc<T>` is already on the heap, `Rc<Arc<T>>` makes an extra allocation 82 = help: consider using just `Rc<T>` or `Arc<T>` 83 84error: usage of `Rc<Arc<SubT<T>>>` 85 --> $DIR/redundant_allocation.rs:59:44 86 | 87LL | pub fn rc_test9<T>(foo: Rc<Arc<T>>) -> Rc<Arc<SubT<T>>> { 88 | ^^^^^^^^^^^^^^^^ 89 | 90 = note: `Arc<SubT<T>>` is already on the heap, `Rc<Arc<SubT<T>>>` makes an extra allocation 91 = help: consider using just `Rc<SubT<T>>` or `Arc<SubT<T>>` 92 93error: usage of `Arc<Box<bool>>` 94 --> $DIR/redundant_allocation.rs:74:25 95 | 96LL | pub fn arc_test5(a: Arc<Box<bool>>) {} 97 | ^^^^^^^^^^^^^^ 98 | 99 = note: `Box<bool>` is already on the heap, `Arc<Box<bool>>` makes an extra allocation 100 = help: consider using just `Arc<bool>` or `Box<bool>` 101 102error: usage of `Arc<Rc<bool>>` 103 --> $DIR/redundant_allocation.rs:78:25 104 | 105LL | pub fn arc_test6(a: Arc<Rc<bool>>) {} 106 | ^^^^^^^^^^^^^ 107 | 108 = note: `Rc<bool>` is already on the heap, `Arc<Rc<bool>>` makes an extra allocation 109 = help: consider using just `Arc<bool>` or `Rc<bool>` 110 111error: usage of `Arc<Box<SubT<usize>>>` 112 --> $DIR/redundant_allocation.rs:82:27 113 | 114LL | pub fn arc_test8() -> Arc<Box<SubT<usize>>> { 115 | ^^^^^^^^^^^^^^^^^^^^^ 116 | 117 = note: `Box<SubT<usize>>` is already on the heap, `Arc<Box<SubT<usize>>>` makes an extra allocation 118 = help: consider using just `Arc<SubT<usize>>` or `Box<SubT<usize>>` 119 120error: usage of `Arc<Rc<T>>` 121 --> $DIR/redundant_allocation.rs:88:30 122 | 123LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> { 124 | ^^^^^^^^^^ 125 | 126 = note: `Rc<T>` is already on the heap, `Arc<Rc<T>>` makes an extra allocation 127 = help: consider using just `Arc<T>` or `Rc<T>` 128 129error: usage of `Arc<Rc<SubT<T>>>` 130 --> $DIR/redundant_allocation.rs:88:45 131 | 132LL | pub fn arc_test9<T>(foo: Arc<Rc<T>>) -> Arc<Rc<SubT<T>>> { 133 | ^^^^^^^^^^^^^^^^ 134 | 135 = note: `Rc<SubT<T>>` is already on the heap, `Arc<Rc<SubT<T>>>` makes an extra allocation 136 = help: consider using just `Arc<SubT<T>>` or `Rc<SubT<T>>` 137 138error: usage of `Rc<Box<Box<dyn T>>>` 139 --> $DIR/redundant_allocation.rs:114:27 140 | 141LL | pub fn test_rc_box(_: Rc<Box<Box<dyn T>>>) {} 142 | ^^^^^^^^^^^^^^^^^^^ 143 | 144 = note: `Box<Box<dyn T>>` is already on the heap, `Rc<Box<Box<dyn T>>>` makes an extra allocation 145 = help: consider using just `Rc<Box<dyn T>>` or `Box<Box<dyn T>>` 146 147error: usage of `Rc<Box<Box<str>>>` 148 --> $DIR/redundant_allocation.rs:148:31 149 | 150LL | pub fn test_rc_box_str(_: Rc<Box<Box<str>>>) {} 151 | ^^^^^^^^^^^^^^^^^ 152 | 153 = note: `Box<Box<str>>` is already on the heap, `Rc<Box<Box<str>>>` makes an extra allocation 154 = help: consider using just `Rc<Box<str>>` or `Box<Box<str>>` 155 156error: usage of `Rc<Box<Box<[usize]>>>` 157 --> $DIR/redundant_allocation.rs:151:33 158 | 159LL | pub fn test_rc_box_slice(_: Rc<Box<Box<[usize]>>>) {} 160 | ^^^^^^^^^^^^^^^^^^^^^ 161 | 162 = note: `Box<Box<[usize]>>` is already on the heap, `Rc<Box<Box<[usize]>>>` makes an extra allocation 163 = help: consider using just `Rc<Box<[usize]>>` or `Box<Box<[usize]>>` 164 165error: usage of `Rc<Box<Box<Path>>>` 166 --> $DIR/redundant_allocation.rs:154:32 167 | 168LL | pub fn test_rc_box_path(_: Rc<Box<Box<Path>>>) {} 169 | ^^^^^^^^^^^^^^^^^^ 170 | 171 = note: `Box<Box<Path>>` is already on the heap, `Rc<Box<Box<Path>>>` makes an extra allocation 172 = help: consider using just `Rc<Box<Path>>` or `Box<Box<Path>>` 173 174error: usage of `Rc<Box<Box<DynSized>>>` 175 --> $DIR/redundant_allocation.rs:157:34 176 | 177LL | pub fn test_rc_box_custom(_: Rc<Box<Box<DynSized>>>) {} 178 | ^^^^^^^^^^^^^^^^^^^^^^ 179 | 180 = note: `Box<Box<DynSized>>` is already on the heap, `Rc<Box<Box<DynSized>>>` makes an extra allocation 181 = help: consider using just `Rc<Box<DynSized>>` or `Box<Box<DynSized>>` 182 183error: aborting due to 20 previous errors 184