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

fix "non-primitive cast: `x86_64::addr::VirtAddr` as `u64`" #668

Closed
wants to merge 1 commit into from

Conversation

@AntoineSebert
Copy link
Contributor

commented Sep 15, 2019

error[E0605]: non-primitive cast: `x86_64::addr::VirtAddr` as `u64`
  --> tests\heap_allocation.rs:25:41
   |
25 |     let mut mapper = unsafe { memory::init(phys_mem_offset as u64) };
   |                                            ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
```
error[E0605]: non-primitive cast: `x86_64::addr::VirtAddr` as `u64`
  --> tests\heap_allocation.rs:25:41
   |
25 |     let mut mapper = unsafe { memory::init(phys_mem_offset as u64) };
   |                                            ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
@AntoineSebert AntoineSebert deleted the AntoineSebert:patch-1 branch Sep 15, 2019
@phil-opp

This comment has been minimized.

Copy link
Owner

commented Sep 15, 2019

I changed the parameter type from u64 to VirtAddr yesterday in #666. Sorry for the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.