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

init() intrinsic is unsafe #3920

Closed
nikomatsakis opened this issue Nov 5, 2012 · 4 comments
Closed

init() intrinsic is unsafe #3920

nikomatsakis opened this issue Nov 5, 2012 · 4 comments
Labels
A-type-system Area: Type system

Comments

@nikomatsakis
Copy link
Contributor

The init() intrinsic seems to fill data with zeros. It's convenient. But it's unsafe as written! It should either be limited to POD types (via a new kind) or else designated unsafe.

I also think there should be an (unsafe) uninit() intrinsic (#3471).

@nikomatsakis
Copy link
Contributor Author

Not critical for 0.6; removing milestone

@catamorphism
Copy link
Contributor

This is looking pretty easy to fix since it seems to be used only in unsafe contexts already. I'm running tests.

@catamorphism
Copy link
Contributor

Fixed pending #6366

catamorphism added a commit to catamorphism/rust that referenced this issue May 9, 2013
@catamorphism
Copy link
Contributor

Fixed in dba9337

RalfJung pushed a commit to RalfJung/rust that referenced this issue Sep 29, 2024
Update cc to 1.1.22

This version of `cc` contains a fix to prevent spurious rebuilds. Hopefully this should help avoid the CI issues rustc has been having.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

2 participants