rust/tests/ui/explicit_auto_deref.stderr

197 lines
5.5 KiB
Plaintext
Raw Normal View History

2022-01-26 21:47:09 -06:00
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:65:20
2022-01-26 21:47:09 -06:00
|
LL | let _: &str = &*s;
| ^^ help: try this: `s`
|
= note: `-D clippy::explicit-auto-deref` implied by `-D warnings`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:69:12
2022-01-26 21:47:09 -06:00
|
LL | f_str(&*s);
| ^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:73:14
2022-01-26 21:47:09 -06:00
|
LL | f_str_t(&*s, &*s); // Don't lint second param.
| ^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:76:25
2022-01-26 21:47:09 -06:00
|
LL | let _: &Box<i32> = &**b;
| ^^^ help: try this: `b`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:82:8
2022-01-26 21:47:09 -06:00
|
LL | c(&*s);
| ^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:88:9
2022-01-26 21:47:09 -06:00
|
LL | &**x
| ^^^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:92:11
2022-01-26 21:47:09 -06:00
|
LL | { &**x }
| ^^^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:96:9
2022-01-26 21:47:09 -06:00
|
LL | &**{ x }
| ^^^^^^^^ help: try this: `{ x }`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:100:9
2022-01-26 21:47:09 -06:00
|
LL | &***x
| ^^^^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:117:13
2022-01-26 21:47:09 -06:00
|
LL | f1(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:118:13
2022-01-26 21:47:09 -06:00
|
LL | f2(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:119:13
2022-01-26 21:47:09 -06:00
|
LL | f3(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:120:28
2022-01-26 21:47:09 -06:00
|
LL | f4.callable_str()(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:121:13
2022-01-26 21:47:09 -06:00
|
LL | f5(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:122:13
2022-01-26 21:47:09 -06:00
|
LL | f6(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:123:28
2022-01-26 21:47:09 -06:00
|
LL | f7.callable_str()(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:124:26
2022-01-26 21:47:09 -06:00
|
LL | f8.callable_t()(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:125:13
2022-01-26 21:47:09 -06:00
|
LL | f9(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:126:14
2022-01-26 21:47:09 -06:00
|
LL | f10(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:127:27
2022-01-26 21:47:09 -06:00
|
LL | f11.callable_t()(&*x);
| ^^ help: try this: `x`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:131:17
2022-01-26 21:47:09 -06:00
|
LL | let _ = S1(&*s);
| ^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:136:22
2022-01-26 21:47:09 -06:00
|
LL | let _ = S2 { s: &*s };
| ^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:152:30
2022-01-26 21:47:09 -06:00
|
LL | let _ = Self::S1(&**s);
| ^^^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:153:35
2022-01-26 21:47:09 -06:00
|
LL | let _ = Self::S2 { s: &**s };
| ^^^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:156:21
2022-01-26 21:47:09 -06:00
|
LL | let _ = E1::S1(&*s);
| ^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:157:26
2022-01-26 21:47:09 -06:00
|
LL | let _ = E1::S2 { s: &*s };
| ^^ help: try this: `s`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:175:13
|
LL | let _ = (*b).foo;
| ^^^^ help: try this: `b`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:176:13
|
LL | let _ = (**b).foo;
| ^^^^^ help: try this: `b`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:191:19
|
LL | let _ = f_str(*ref_str);
| ^^^^^^^^ help: try this: `ref_str`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:193:19
|
LL | let _ = f_str(**ref_ref_str);
| ^^^^^^^^^^^^^ help: try this: `ref_ref_str`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:203:13
|
LL | f_str(&&*ref_str); // `needless_borrow` will suggest removing both references
| ^^^^^^^^ help: try this: `ref_str`
error: deref which would be done by auto-deref
--> $DIR/explicit_auto_deref.rs:204:12
|
LL | f_str(&&**ref_str); // `needless_borrow` will suggest removing only one reference
| ^^^^^^^^^^ help: try this: `ref_str`
error: aborting due to 32 previous errors
2022-01-26 21:47:09 -06:00