-
Notifications
You must be signed in to change notification settings - Fork 146
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
Using "mem::unitialized()" can lead to "Attempted to instantiate uninhabited type" #139
Comments
Relevant (IIRC): #126 |
This also shows that e.g. Once rust-lang/rust#60445 lands, the |
Merged
dpc
pushed a commit
to dpc/rust-smallvec
that referenced
this issue
Oct 30, 2019
Works now on trunk. Closes servo#139
mbrubeck
pushed a commit
to mbrubeck/rust-smallvec
that referenced
this issue
Nov 4, 2019
Works now on trunk. Closes servo#139
mbrubeck
pushed a commit
to mbrubeck/rust-smallvec
that referenced
this issue
Nov 4, 2019
Works now on trunk. Closes servo#139
mbrubeck
pushed a commit
to mbrubeck/rust-smallvec
that referenced
this issue
Nov 4, 2019
Works now on trunk. Closes servo#139
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code panics:
With:
The culprit is here:
rust-smallvec/lib.rs
Line 402 in a775b5f
"Why would someone create a
SmallVec
ofVoid
?" you may ask.In my situation, the type (
Void
here) is a template parameter of one of my structs.When the user uses a
Void
, theSmallVec
will of course always remain empty. However creating an emptySmallVec
shouldn't itself lead to a panic.The text was updated successfully, but these errors were encountered: