Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destructure our generics, placeholers or projections during coercion #1222

Merged
merged 1 commit into from
May 9, 2022

Conversation

philberty
Copy link
Member

When we coerce types we need to destructure from the generics in order to
apply these coercion rules correctly or we end up returning a bad
error_mark_node.

This was found while fixing #1220

@philberty philberty added the bug label May 6, 2022
@philberty philberty added this to the Imports and visibility milestone May 6, 2022
@philberty philberty requested a review from CohenArthur May 6, 2022 15:40
@philberty philberty self-assigned this May 6, 2022
@philberty philberty removed their assignment May 6, 2022
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit but looks good :)

gcc/rust/backend/rust-compile.cc Outdated Show resolved Hide resolved
When we coerce types we need to destructure from the generics in order to
apply these coercion rules correctly or we end up returning a bad
error_mark_node.
@philberty
Copy link
Member Author

bors r+

@bors bors bot merged commit dd5a765 into master May 9, 2022
@bors
Copy link
Contributor

bors bot commented May 9, 2022

Build succeeded:

@philberty philberty deleted the phil/destructure-bug branch May 9, 2022 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants