From 1ed4898d28e74477b7ea04491b596a5465945d60 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 4 Apr 2023 15:39:01 +0000 Subject: [PATCH] hypervisor: fix building doctests When doctests are built, the crate is built with itself as a dependency via --extern. This causes a compiler error if using a module with the name same as the crate, because it's ambiguous whether it's referring to the module, or the extern version of the crate, so it's necessary to disambiguate when using the hypervisor module here. Fixes running cargo test --doc --workspace. Signed-off-by: Alyssa Ross --- hypervisor/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/src/lib.rs b/hypervisor/src/lib.rs index a485bf0c3..ac15b6511 100644 --- a/hypervisor/src/lib.rs +++ b/hypervisor/src/lib.rs @@ -48,9 +48,9 @@ mod cpu; /// Device related module mod device; +pub use crate::hypervisor::{Hypervisor, HypervisorError}; pub use cpu::{HypervisorCpuError, Vcpu, VmExit}; pub use device::HypervisorDeviceError; -pub use hypervisor::{Hypervisor, HypervisorError}; #[cfg(all(feature = "kvm", target_arch = "aarch64"))] pub use kvm::{aarch64, GicState}; use std::sync::Arc;