Skip to content

abi: make dig_scalar_pointee search for offsets in all layout fields. #712

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 4 commits into from
Aug 10, 2021
Merged

abi: make dig_scalar_pointee search for offsets in all layout fields. #712

merged 4 commits into from
Aug 10, 2021

Conversation

eddyb
Copy link
Contributor

@eddyb eddyb commented Aug 9, 2021

This allows representing types like core::ops::Bound<&u32>, which would've previously caused a fatal error:

error: dig_scalar_pointee_adt Variants::Multiple TagEncoding::Direct makes no sense: TyAndLayout {
    ty: core::ops::Bound<&u32>,
    layout: Layout {

(rest of the output elided - it's just the Layout of that type)

The motivation for this is updating past rust-lang/rust#87723 - sadly, that kind of code isn't supported yet (I guess we'd have to have a transformation to get rid of the pointer on the stack, for it to work), but at the very least it results in a (validation) error only if it's called, there's no fatal error while building core, anymore.

@eddyb eddyb requested a review from khyperia August 9, 2021 17:44
@eddyb eddyb enabled auto-merge (rebase) August 10, 2021 07:28
@eddyb eddyb merged commit f951203 into EmbarkStudios:main Aug 10, 2021
@eddyb eddyb deleted the scalar-pair-enums branch August 10, 2021 07:57
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.

2 participants