mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
vmm: memory_manager: Use workaround for conditional function arguments
With Rust 1.49 using attributes on a function parameter is not allowed. The recommended workaround is to put it in a new block. error[E0658]: attributes on expressions are experimental --> vmm/src/memory_manager.rs:698:17 | 698 | #[cfg(target_arch = "x86_64")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information error: removing an expression is not supported in this position --> vmm/src/memory_manager.rs:698:17 | 698 | #[cfg(target_arch = "x86_64")] | Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
2aaf0540b6
commit
faba6a3fb3
@ -694,9 +694,13 @@ impl MemoryManager {
|
||||
let allocator = Arc::new(Mutex::new(
|
||||
SystemAllocator::new(
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
GuestAddress(0),
|
||||
{
|
||||
GuestAddress(0)
|
||||
},
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
(1 << 16 as GuestUsize),
|
||||
{
|
||||
1 << 16 as GuestUsize
|
||||
},
|
||||
GuestAddress(0),
|
||||
mmio_address_space_size,
|
||||
layout::MEM_32BIT_DEVICES_START,
|
||||
|
Loading…
Reference in New Issue
Block a user