León Orell Valerian Liehr
6499eb5577
Rollup merge of #121100 - estebank:issue-71252, r=compiler-errors
Detect when method call on argument could be removed to fulfill failed trait bound
When encountering
```rust
struct Foo;
struct Bar;
impl From<Bar> for Foo {
fn from(_: Bar) -> Self { Foo }
}
fn qux(_: impl From<Bar>) {}
fn main() {
qux(Bar.into());
}
```
Suggest removing `.into()`:
```
error[E0283]: type annotations needed
--> f100.rs:8:13
|
8 | qux(Bar.into());
| --- ^^^^
| |
| required by a bound introduced by this call
|
= note: cannot satisfy `_: From<Bar>`
note: required by a bound in `qux`
--> f100.rs:6:16
|
6 | fn qux(_: impl From<Bar>) {}
| ^^^^^^^^^ required by this bound in `qux`
help: try using a fully qualified path to specify the expected types
|
8 | qux(<Bar as Into<T>>::into(Bar));
| +++++++++++++++++++++++ ~
help: consider removing this method call, as the receiver has type `Bar` and `Bar: From<Bar>` trivially holds
|
8 - qux(Bar.into());
8 + qux(Bar);
|
```
Fix #71252
2024-02-18 05:10:16 +01:00
..
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-10-21 10:29:40 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-01 03:31:03 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-12-04 21:54:32 +00:00
2023-12-07 23:00:46 -05:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-14 20:15:13 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-10 23:18:01 +00:00
2024-01-09 21:08:16 +00:00
2024-01-09 21:08:16 +00:00
2024-02-14 20:15:13 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-16 17:00:23 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-10 13:00:27 -08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-12-07 23:00:46 -05:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-16 06:07:33 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-01-30 21:28:18 +00:00
2024-02-08 08:10:43 +00:00
2024-01-26 20:47:19 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-12-20 00:19:45 -05:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-29 18:55:00 +00:00
2024-02-16 20:02:50 +00:00
2024-01-07 08:56:20 -08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-16 20:02:50 +00:00
2024-01-13 12:46:58 -05:00
2024-02-16 20:02:50 +00:00
2024-02-08 08:10:43 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-02 20:35:20 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-04 11:34:10 +08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-01-30 20:12:19 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-09 20:47:50 -08:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-15 17:20:44 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-10-20 21:14:01 +00:00
2024-02-16 04:28:05 +00:00
2023-11-24 19:15:52 +01:00
2024-02-01 03:31:03 +00:00
2024-02-01 03:30:26 +00:00
2024-02-16 20:02:50 +00:00
2024-02-08 08:10:43 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-01-24 02:53:15 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-10-11 18:26:44 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-01-24 02:53:15 +00:00
2024-01-24 02:53:15 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-02 20:57:05 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-05 18:53:28 -08:00
2024-02-05 18:53:28 -08:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 12:42:32 -08:00
2024-02-14 12:42:32 -08:00
2024-02-16 20:02:50 +00:00
2024-02-14 12:42:32 -08:00
2023-11-08 14:15:25 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-29 18:55:00 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-12-07 23:00:46 -05:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-01-13 12:46:58 -05:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-07 10:42:01 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-01-26 20:47:19 +00:00
2023-12-07 23:00:46 -05:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-12-01 21:37:43 +01:00
2023-12-01 21:37:43 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-16 17:00:23 +00:00
2024-02-14 11:00:30 +00:00
2024-02-14 11:00:30 +00:00
2024-02-16 20:02:50 +00:00
2024-01-21 20:04:39 +04:00
2024-02-16 20:02:50 +00:00
2024-01-19 23:37:39 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-29 19:07:36 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-12-04 21:54:32 +00:00
2023-11-24 19:15:52 +01:00
2023-11-16 17:00:23 +00:00
2024-01-30 21:28:18 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2023-11-27 22:18:03 +09:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-01 03:31:03 +00:00
2023-11-24 19:15:52 +01:00
2023-10-18 23:53:18 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-20 23:44:37 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-24 02:53:15 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-14 18:54:07 +08:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-12-09 17:49:40 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-26 20:47:19 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-16 17:00:23 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-23 20:22:17 +08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-19 01:30:46 -08:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-09 20:47:50 -08:00
2023-12-22 11:01:07 -08:00
2024-02-16 20:02:50 +00:00
2023-11-19 17:47:41 +00:00
2023-11-16 17:00:23 +00:00
2023-10-30 22:12:07 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-10-18 23:53:18 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-01-13 12:46:58 -05:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-11-18 00:40:11 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-10-20 21:14:01 +00:00
2023-10-20 21:14:01 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-11-24 19:15:52 +01:00
2023-10-30 22:19:17 +00:00