Skip to content

Commit 8f46ec1

Browse files
committed
Fix rustdoc unresolved import error if libsystemd feature is disabled
1 parent f22d2f1 commit 8f46ec1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,10 @@ jobs:
126126
run: |
127127
cd spdlog
128128
# The reason for allowing lint `unexpected_cfgs` not in `build.rs` or `Cargo.toml` but in CI is that we need to keep MSRV
129+
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
129130
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
130131
cd ../spdlog-macros
132+
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
131133
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
132134
133135
check-msrv:

spdlog/src/sink/journald_sink.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Default for SyslogLevels {
4747
}
4848

4949
fn journal_send(args: impl Iterator<Item = impl AsRef<str>>) -> StdResult<(), io::Error> {
50-
#[cfg(target_os = "linux")] // https://github.com/rust-lang/rust/issues/97976
50+
#[cfg(not(doc))] // https://github.com/rust-lang/rust/issues/97976
5151
use libsystemd_sys::{const_iovec, journal as ffi};
5252

5353
let iovecs: Vec<_> = args.map(|a| unsafe { const_iovec::from_str(a) }).collect();

0 commit comments

Comments
 (0)