Skip to content

Note user-facing types of coercion failure#111451

Merged
bors merged 1 commit intorust-lang:masterfrom
compiler-errors:note-cast-origin
May 13, 2023
Merged

Note user-facing types of coercion failure#111451
bors merged 1 commit intorust-lang:masterfrom
compiler-errors:note-cast-origin

Conversation

@compiler-errors
Copy link
Contributor

When coercing, for example, Box<A> into Box<dyn B>, make sure that any failure notes mention those specific types, rather than mentioning inner types, like "the cast from A to dyn B".

I expect end-users are often confused when we skip layers of types and only mention the "innermost" part of a coercion, especially when other notes point at HIR, e.g. #111406.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants