rust/tests/ui/impl-trait/issues
bors 94bc9c737e Auto merge of #114811 - estebank:impl-ambiguity, r=wesleywiser
Show more information when multiple `impl`s apply

- When there are `impl`s without type params, show only those (to avoid showing overly generic `impl`s).
```
error[E0283]: type annotations needed
  --> $DIR/multiple-impl-apply.rs:34:9
   |
LL |     let y = x.into();
   |         ^     ---- type must be known at this point
   |
note: multiple `impl`s satisfying `_: From<Baz>` found
  --> $DIR/multiple-impl-apply.rs:14:1
   |
LL | impl From<Baz> for Bar {
   | ^^^^^^^^^^^^^^^^^^^^^^
...
LL | impl From<Baz> for Foo {
   | ^^^^^^^^^^^^^^^^^^^^^^
   = note: required for `Baz` to implement `Into<_>`
help: consider giving `y` an explicit type
   |
LL |     let y: /* Type */ = x.into();
   |          ++++++++++++
```

- Lower the importance of `T: Sized`, `T: WellFormed` and coercion errors, to prioritize more relevant errors. The pre-existing deduplication logic deals with hiding redundant errors better that way, and we show errors with more metadata that is useful to the user.

- Show `<SelfTy as Trait>::assoc_fn` suggestion in more cases.
```
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
  --> $DIR/cross-return-site-inference.rs:38:16
   |
LL |     return Err(From::from("foo"));
   |                ^^^^^^^^^^ cannot call associated function of trait
   |
help: use a fully-qualified path to a specific available implementation
   |
LL |     return Err(</* self type */ as From>::from("foo"));
   |                +++++++++++++++++++     +
```

Fix #88284.
2023-10-06 18:44:32 +00:00
..
infinite-impl-trait-issue-38064.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
infinite-impl-trait-issue-38064.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-21659-show-relevant-trait-impls-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-21659-show-relevant-trait-impls-3.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-42479.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-49376.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52128.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-53457.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54600.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-54600.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-54840.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-54840.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-54895.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54895.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55608-captures-empty-region.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57464-unexpected-regions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57979-deeply-nested-impl-trait-in-assoc-proj.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57979-impl-trait-in-path.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57979-impl-trait-in-path.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57979-nested-impl-trait-in-assoc-proj.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57979-nested-impl-trait-in-assoc-proj.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-58504.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-58504.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-58956.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-58956.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-62742.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-62742.stderr Point out the actual mismatch error 2023-10-02 23:14:29 +00:00
issue-65581.rs Remove compare mode 2023-07-03 21:40:04 +00:00
issue-67830.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67830.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-70877.rs Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
issue-70877.stderr Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
issue-70971.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-70971.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-74282.rs Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
issue-74282.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
issue-77987.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-78722-2.rs Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
issue-78722-2.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
issue-78722.rs Require TAITs to be mentioned in the signatures of functions that register hidden types for them 2023-07-07 13:13:18 +00:00
issue-78722.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
issue-79099.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-79099.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-82139.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-82139.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83919.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-83919.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-83929-impl-trait-in-generic-default.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-83929-impl-trait-in-generic-default.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-84073.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84073.stderr Reorder fullfillment errors to keep more interesting ones first 2023-10-04 02:04:14 +00:00
issue-84919.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-84919.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-86201.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-86642.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-86642.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-86719.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-86719.stderr Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-86800.rs Change default panic handler message format. 2023-07-29 11:42:50 +02:00
issue-86800.stderr More precisely detect cycle errors from type_of on opaque 2023-08-27 22:03:16 +00:00
issue-87295.rs Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-87295.stderr Tweak wording of E0562 2023-10-04 19:51:43 +00:00
issue-87340.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-87340.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88236-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88236-2.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88236.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88236.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-89312.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92305.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-92305.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-93788.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99348-impl-compatibility.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-99348-impl-compatibility.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-104815.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-105826.rs Do not filter substs in remap_generic_params_to_declaration_params. 2023-01-11 16:29:25 +00:00