blob: ba4cd86e0b5afb431cdb6d415c48ad95a1a46669 [file] [log] [blame]
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:69:19
|
LL | let _: &str = &*s;
| ^^^ help: try: `&s`
|
= note: `-D clippy::explicit-auto-deref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::explicit_auto_deref)]`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:71:19
|
LL | let _: &str = &*{ String::new() };
| ^^^^^^^^^^^^^^^^^^^ help: try: `&{ String::new() }`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:73:19
|
LL | let _: &str = &mut *{ String::new() };
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut { String::new() }`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:78:11
|
LL | f_str(&*s);
| ^^^ help: try: `&s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:83:13
|
LL | f_str_t(&*s, &*s); // Don't lint second param.
| ^^^ help: try: `&s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:88:24
|
LL | let _: &Box<i32> = &**b;
| ^^^^ help: try: `&b`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:95:7
|
LL | c(&*s);
| ^^^ help: try: `&s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:102:9
|
LL | &**x
| ^^^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:107:11
|
LL | { &**x }
| ^^^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:112:9
|
LL | &**{ x }
| ^^^^^^^^ help: try: `{ x }`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:117:9
|
LL | &***x
| ^^^^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:135:12
|
LL | f1(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:137:12
|
LL | f2(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:139:12
|
LL | f3(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:141:27
|
LL | f4.callable_str()(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:143:12
|
LL | f5(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:145:12
|
LL | f6(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:147:27
|
LL | f7.callable_str()(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:149:25
|
LL | f8.callable_t()(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:151:12
|
LL | f9(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:153:13
|
LL | f10(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:155:26
|
LL | f11.callable_t()(&*x);
| ^^^ help: try: `&x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:160:16
|
LL | let _ = S1(&*s);
| ^^^ help: try: `&s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:166:21
|
LL | let _ = S2 { s: &*s };
| ^^^ help: try: `&s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:183:30
|
LL | let _ = Self::S1(&**s);
| ^^^^ help: try: `s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:185:35
|
LL | let _ = Self::S2 { s: &**s };
| ^^^^ help: try: `s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:189:20
|
LL | let _ = E1::S1(&*s);
| ^^^ help: try: `&s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:191:25
|
LL | let _ = E1::S2 { s: &*s };
| ^^^ help: try: `&s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:210:13
|
LL | let _ = (*b).foo;
| ^^^^ help: try: `b`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:212:13
|
LL | let _ = (**b).foo;
| ^^^^^ help: try: `b`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:228:19
|
LL | let _ = f_str(*ref_str);
| ^^^^^^^^ help: try: `ref_str`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:231:19
|
LL | let _ = f_str(**ref_ref_str);
| ^^^^^^^^^^^^^ help: try: `ref_ref_str`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:242:12
|
LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references
| ^^^^^^^^^ help: try: `ref_str`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:245:12
|
LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference
| ^^^^^^^^^^ help: try: `ref_str`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:256:41
|
LL | let _ = || -> &'static str { return *s };
| ^^ help: try: `s`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:276:9
|
LL | &**x
| ^^^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:300:8
|
LL | c1(*x);
| ^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:304:20
|
LL | return *x;
| ^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:307:9
|
LL | *x
| ^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:342:20
|
LL | Some(x) => &mut *x,
| ^^^^^^^ help: try: `x`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:376:22
|
LL | let _ = &mut (*{ x.u }).x;
| ^^^^^^^^^^ help: try: `{ x.u }`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:383:22
|
LL | let _ = &mut (**x.u).x;
| ^^^^^^^ help: try: `(*x.u)`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:385:22
|
LL | let _ = &mut (**{ x.u }).x;
| ^^^^^^^^^^^ help: try: `{ x.u }`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:390:22
|
LL | let _ = &mut (*x.u).x;
| ^^^^^^ help: try: `x.u`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:392:22
|
LL | let _ = &mut (*{ x.u }).x;
| ^^^^^^^^^^ help: try: `{ x.u }`
error: deref which would be done by auto-deref
--> tests/ui/explicit_auto_deref.rs:416:13
|
LL | foo(&*wrapped_bar);
| ^^^^^^^^^^^^^ help: try: `&wrapped_bar`
error: aborting due to 46 previous errors