Commit 4de22b0
committed
ci: add --cfg for cargo doc to disable compile_error!()
Some crates, such as vhost, use compile_error!() to indicate that
mutually exclusive feature have been specified. This leads to problems
when running cargo doc --all-features, which will inevitably trigger
these conditions and then lead to documentation not building (for this
reason, the vhost documentation currently fails to build on docs.rs for
example).
Add a custom cfg that gets passed via RUSTFLAGS in the cargo doc CI step
on whose absense these compile_error!() macros can be gated, so that
they dont cause issues when building documentation in CI
A custom cfg is needed because cargo doc does not pass `--cfg doc` down
to dependencies.
See also rust-vmm/vhost#326
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>1 parent 58dab8b commit 4de22b0
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments