Skip to content

In recent versions, crate depends on alloc #5

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

Closed
Redrield opened this issue Jul 8, 2017 · 2 comments
Closed

In recent versions, crate depends on alloc #5

Redrield opened this issue Jul 8, 2017 · 2 comments

Comments

@Redrield
Copy link

Redrield commented Jul 8, 2017

Since release 0.3.0 of the crate, this library depends on alloc, and requires types from it to fill functions. Because alloc requires an allocator, you can't link it in any crate marked with #![allocator], so it all breaks down.

Fix: Remove dependency on alloc by replacing Layout parameters with size, and align usize parameters, like they were in v0.2.7

@phil-opp
Copy link
Member

phil-opp commented Jul 8, 2017

The allocator API was changed a few days ago. The #![allocator] attribute is gone now. Instead, a global allocator is now defined through the Alloc trait and the #[global_allocator] attribute. See #4 for more details.

If you update your nightly version, you will need to use the new API, so I decided to adjust this crate. If you want to stay on an older nightly, you can just keep using v0.2.7.

@Redrield
Copy link
Author

Redrield commented Jul 8, 2017

Alright, I don't really keep up with changes like this, cause I'm normally not one to use unstable features. Thanks!

@Redrield Redrield closed this as completed Jul 8, 2017
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

No branches or pull requests

2 participants