Skip to content

Replaced mem::uninitialized with mem::MaybeUninit#1

Merged
Others merged 2 commits intoOthers:masterfrom
geky:master
Jul 25, 2020
Merged

Replaced mem::uninitialized with mem::MaybeUninit#1
Others merged 2 commits intoOthers:masterfrom
geky:master

Conversation

@geky
Copy link

@geky geky commented Jul 24, 2020

This issue captures the problem pretty well: rust-lang/rust#73573. Change implemented here: rust-lang/rust#66059.

This was causing FunctionType::get_params to panic.

I've replaced mem::uninitialized with what should be the appropriate mem::MaybeUninit/assume_init pairs.

Oh, and I also changed try! for ? since rustc was complaining about the deprecated macro.

Open to feedback.

geky added 2 commits July 23, 2020 19:09
The exact behavior of mem::uninitialized has been changed to cause
panics, which causes problems for dependent libraries.
@Others
Copy link
Owner

Others commented Jul 25, 2020

You're amazing! Thank you for this fix--literally just ran into this :)

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