Skip to content

librustc_trans: Handle DST structs in trans::_match. #25060

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

Merged
merged 1 commit into from
May 3, 2015

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented May 2, 2015

Fixes #23261.

cc @blaenk

@rust-highfive
Copy link
Contributor

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@huonw
Copy link
Member

huonw commented May 3, 2015

Does this handle trait objects?

@luqmana
Copy link
Member Author

luqmana commented May 3, 2015

@huonw Yes, it should. Let me update the test case.

@luqmana luqmana force-pushed the matching-dst-struct branch 2 times, most recently from f87a986 to 6a46b86 Compare May 3, 2015 03:53
let (arg_count, struct_val) = if type_is_sized(bcx.tcx(), left_ty) {
(arg_count, val)
} else {
(arg_count - 1, Load(bcx, expr::get_dataptr(bcx, val)))
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a comment about the - 1?

@huonw
Copy link
Member

huonw commented May 3, 2015

r=me with an explanatory comment

@luqmana luqmana force-pushed the matching-dst-struct branch from 6a46b86 to 715605f Compare May 3, 2015 09:36
@luqmana
Copy link
Member Author

luqmana commented May 3, 2015

@bors r=huonw

@bors
Copy link
Collaborator

bors commented May 3, 2015

📌 Commit 715605f has been approved by huonw

@bors
Copy link
Collaborator

bors commented May 3, 2015

⌛ Testing commit 715605f with merge 6b3d66b...

bors added a commit that referenced this pull request May 3, 2015
@bors bors merged commit 715605f into rust-lang:master May 3, 2015
@blaenk
Copy link
Contributor

blaenk commented May 3, 2015

Great job @luqmana 👍

@luqmana luqmana deleted the matching-dst-struct branch May 4, 2015 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE when matching on DST structs.
5 participants