fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: deref which would be done by auto-deref 2 --> $DIR/explicit_auto_deref.rs:68:19 3 | 4LL | let _: &str = &*s; 5 | ^^^ help: try: `&s` 6 | 7 = note: `-D clippy::explicit-auto-deref` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::explicit_auto_deref)]` 9 10error: deref which would be done by auto-deref 11 --> $DIR/explicit_auto_deref.rs:69:19 12 | 13LL | let _: &str = &*{ String::new() }; 14 | ^^^^^^^^^^^^^^^^^^^ help: try: `&{ String::new() }` 15 16error: deref which would be done by auto-deref 17 --> $DIR/explicit_auto_deref.rs:70:19 18 | 19LL | let _: &str = &mut *{ String::new() }; 20 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut { String::new() }` 21 22error: deref which would be done by auto-deref 23 --> $DIR/explicit_auto_deref.rs:74:11 24 | 25LL | f_str(&*s); 26 | ^^^ help: try: `&s` 27 28error: deref which would be done by auto-deref 29 --> $DIR/explicit_auto_deref.rs:78:13 30 | 31LL | f_str_t(&*s, &*s); // Don't lint second param. 32 | ^^^ help: try: `&s` 33 34error: deref which would be done by auto-deref 35 --> $DIR/explicit_auto_deref.rs:81:24 36 | 37LL | let _: &Box<i32> = &**b; 38 | ^^^^ help: try: `&b` 39 40error: deref which would be done by auto-deref 41 --> $DIR/explicit_auto_deref.rs:87:7 42 | 43LL | c(&*s); 44 | ^^^ help: try: `&s` 45 46error: deref which would be done by auto-deref 47 --> $DIR/explicit_auto_deref.rs:93:9 48 | 49LL | &**x 50 | ^^^^ help: try: `x` 51 52error: deref which would be done by auto-deref 53 --> $DIR/explicit_auto_deref.rs:97:11 54 | 55LL | { &**x } 56 | ^^^^ help: try: `x` 57 58error: deref which would be done by auto-deref 59 --> $DIR/explicit_auto_deref.rs:101:9 60 | 61LL | &**{ x } 62 | ^^^^^^^^ help: try: `{ x }` 63 64error: deref which would be done by auto-deref 65 --> $DIR/explicit_auto_deref.rs:105:9 66 | 67LL | &***x 68 | ^^^^^ help: try: `x` 69 70error: deref which would be done by auto-deref 71 --> $DIR/explicit_auto_deref.rs:122:12 72 | 73LL | f1(&*x); 74 | ^^^ help: try: `&x` 75 76error: deref which would be done by auto-deref 77 --> $DIR/explicit_auto_deref.rs:123:12 78 | 79LL | f2(&*x); 80 | ^^^ help: try: `&x` 81 82error: deref which would be done by auto-deref 83 --> $DIR/explicit_auto_deref.rs:124:12 84 | 85LL | f3(&*x); 86 | ^^^ help: try: `&x` 87 88error: deref which would be done by auto-deref 89 --> $DIR/explicit_auto_deref.rs:125:27 90 | 91LL | f4.callable_str()(&*x); 92 | ^^^ help: try: `&x` 93 94error: deref which would be done by auto-deref 95 --> $DIR/explicit_auto_deref.rs:126:12 96 | 97LL | f5(&*x); 98 | ^^^ help: try: `&x` 99 100error: deref which would be done by auto-deref 101 --> $DIR/explicit_auto_deref.rs:127:12 102 | 103LL | f6(&*x); 104 | ^^^ help: try: `&x` 105 106error: deref which would be done by auto-deref 107 --> $DIR/explicit_auto_deref.rs:128:27 108 | 109LL | f7.callable_str()(&*x); 110 | ^^^ help: try: `&x` 111 112error: deref which would be done by auto-deref 113 --> $DIR/explicit_auto_deref.rs:129:25 114 | 115LL | f8.callable_t()(&*x); 116 | ^^^ help: try: `&x` 117 118error: deref which would be done by auto-deref 119 --> $DIR/explicit_auto_deref.rs:130:12 120 | 121LL | f9(&*x); 122 | ^^^ help: try: `&x` 123 124error: deref which would be done by auto-deref 125 --> $DIR/explicit_auto_deref.rs:131:13 126 | 127LL | f10(&*x); 128 | ^^^ help: try: `&x` 129 130error: deref which would be done by auto-deref 131 --> $DIR/explicit_auto_deref.rs:132:26 132 | 133LL | f11.callable_t()(&*x); 134 | ^^^ help: try: `&x` 135 136error: deref which would be done by auto-deref 137 --> $DIR/explicit_auto_deref.rs:136:16 138 | 139LL | let _ = S1(&*s); 140 | ^^^ help: try: `&s` 141 142error: deref which would be done by auto-deref 143 --> $DIR/explicit_auto_deref.rs:141:21 144 | 145LL | let _ = S2 { s: &*s }; 146 | ^^^ help: try: `&s` 147 148error: deref which would be done by auto-deref 149 --> $DIR/explicit_auto_deref.rs:157:30 150 | 151LL | let _ = Self::S1(&**s); 152 | ^^^^ help: try: `s` 153 154error: deref which would be done by auto-deref 155 --> $DIR/explicit_auto_deref.rs:158:35 156 | 157LL | let _ = Self::S2 { s: &**s }; 158 | ^^^^ help: try: `s` 159 160error: deref which would be done by auto-deref 161 --> $DIR/explicit_auto_deref.rs:161:20 162 | 163LL | let _ = E1::S1(&*s); 164 | ^^^ help: try: `&s` 165 166error: deref which would be done by auto-deref 167 --> $DIR/explicit_auto_deref.rs:162:25 168 | 169LL | let _ = E1::S2 { s: &*s }; 170 | ^^^ help: try: `&s` 171 172error: deref which would be done by auto-deref 173 --> $DIR/explicit_auto_deref.rs:180:13 174 | 175LL | let _ = (*b).foo; 176 | ^^^^ help: try: `b` 177 178error: deref which would be done by auto-deref 179 --> $DIR/explicit_auto_deref.rs:181:13 180 | 181LL | let _ = (**b).foo; 182 | ^^^^^ help: try: `b` 183 184error: deref which would be done by auto-deref 185 --> $DIR/explicit_auto_deref.rs:196:19 186 | 187LL | let _ = f_str(*ref_str); 188 | ^^^^^^^^ help: try: `ref_str` 189 190error: deref which would be done by auto-deref 191 --> $DIR/explicit_auto_deref.rs:198:19 192 | 193LL | let _ = f_str(**ref_ref_str); 194 | ^^^^^^^^^^^^^ help: try: `ref_ref_str` 195 196error: deref which would be done by auto-deref 197 --> $DIR/explicit_auto_deref.rs:208:12 198 | 199LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references 200 | ^^^^^^^^^ help: try: `ref_str` 201 202error: deref which would be done by auto-deref 203 --> $DIR/explicit_auto_deref.rs:209:12 204 | 205LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference 206 | ^^^^^^^^^^ help: try: `ref_str` 207 208error: deref which would be done by auto-deref 209 --> $DIR/explicit_auto_deref.rs:218:41 210 | 211LL | let _ = || -> &'static str { return *s }; 212 | ^^ help: try: `s` 213 214error: deref which would be done by auto-deref 215 --> $DIR/explicit_auto_deref.rs:237:9 216 | 217LL | &**x 218 | ^^^^ help: try: `x` 219 220error: deref which would be done by auto-deref 221 --> $DIR/explicit_auto_deref.rs:260:8 222 | 223LL | c1(*x); 224 | ^^ help: try: `x` 225 226error: deref which would be done by auto-deref 227 --> $DIR/explicit_auto_deref.rs:263:20 228 | 229LL | return *x; 230 | ^^ help: try: `x` 231 232error: deref which would be done by auto-deref 233 --> $DIR/explicit_auto_deref.rs:265:9 234 | 235LL | *x 236 | ^^ help: try: `x` 237 238error: deref which would be done by auto-deref 239 --> $DIR/explicit_auto_deref.rs:299:20 240 | 241LL | Some(x) => &mut *x, 242 | ^^^^^^^ help: try: `x` 243 244error: aborting due to 40 previous errors 245