94bc9c737e
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. |
||
---|---|---|
.. | ||
infinite-impl-trait-issue-38064.rs | ||
infinite-impl-trait-issue-38064.stderr | ||
issue-21659-show-relevant-trait-impls-3.rs | ||
issue-21659-show-relevant-trait-impls-3.stderr | ||
issue-42479.rs | ||
issue-49376.rs | ||
issue-52128.rs | ||
issue-53457.rs | ||
issue-54600.rs | ||
issue-54600.stderr | ||
issue-54840.rs | ||
issue-54840.stderr | ||
issue-54895.rs | ||
issue-54895.stderr | ||
issue-55608-captures-empty-region.rs | ||
issue-57464-unexpected-regions.rs | ||
issue-57979-deeply-nested-impl-trait-in-assoc-proj.rs | ||
issue-57979-deeply-nested-impl-trait-in-assoc-proj.stderr | ||
issue-57979-impl-trait-in-path.rs | ||
issue-57979-impl-trait-in-path.stderr | ||
issue-57979-nested-impl-trait-in-assoc-proj.rs | ||
issue-57979-nested-impl-trait-in-assoc-proj.stderr | ||
issue-58504.rs | ||
issue-58504.stderr | ||
issue-58956.rs | ||
issue-58956.stderr | ||
issue-62742.rs | ||
issue-62742.stderr | ||
issue-65581.rs | ||
issue-67830.rs | ||
issue-67830.stderr | ||
issue-70877.rs | ||
issue-70877.stderr | ||
issue-70971.rs | ||
issue-70971.stderr | ||
issue-74282.rs | ||
issue-74282.stderr | ||
issue-77987.rs | ||
issue-78722-2.rs | ||
issue-78722-2.stderr | ||
issue-78722.rs | ||
issue-78722.stderr | ||
issue-79099.rs | ||
issue-79099.stderr | ||
issue-82139.rs | ||
issue-82139.stderr | ||
issue-83919.rs | ||
issue-83919.stderr | ||
issue-83929-impl-trait-in-generic-default.rs | ||
issue-83929-impl-trait-in-generic-default.stderr | ||
issue-84073.rs | ||
issue-84073.stderr | ||
issue-84919.rs | ||
issue-84919.stderr | ||
issue-86201.rs | ||
issue-86642.rs | ||
issue-86642.stderr | ||
issue-86719.rs | ||
issue-86719.stderr | ||
issue-86800.rs | ||
issue-86800.stderr | ||
issue-87295.rs | ||
issue-87295.stderr | ||
issue-87340.rs | ||
issue-87340.stderr | ||
issue-88236-2.rs | ||
issue-88236-2.stderr | ||
issue-88236.rs | ||
issue-88236.stderr | ||
issue-89312.rs | ||
issue-92305.rs | ||
issue-92305.stderr | ||
issue-93788.rs | ||
issue-99348-impl-compatibility.rs | ||
issue-99348-impl-compatibility.stderr | ||
issue-104815.rs | ||
issue-105826.rs |