Skip to content

Commit 61469b7

Browse files
committed
fix documentation build on docs.rs
Instruct the docs.rs documentation builder to pass --cfg RUTSDOC_disable_feature_compat_errors in RUSTFLAGS when building documentation, so that builds dont fail because of compile_error!() and incompatible features [1]. [1]: https://docs.rs/crate/vhost/0.14.0/builds/2193201 Signed-off-by: Patrick Roy <[email protected]>
1 parent 7c5d85b commit 61469b7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

vhost-user-backend/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ repository = "https://github.com/rust-vmm/vhost"
88
edition = "2021"
99
license = "Apache-2.0"
1010

11+
[package.metadata.docs.rs]
12+
all-features = true
13+
rustc-args = ['--cfg RUTSDOC_disable_feature_compat_errors']
14+
1115
[features]
1216
xen = ["vm-memory/xen", "vhost/xen"]
1317
postcopy = ["vhost/postcopy", "userfaultfd"]

vhost/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ edition = "2021"
1212

1313
[package.metadata.docs.rs]
1414
all-features = true
15+
rustc-args = ['--cfg RUTSDOC_disable_feature_compat_errors']
1516

1617
[features]
1718
default = []

0 commit comments

Comments
 (0)