Skip to content

Commit acfa59c

Browse files
phil-oppjosephlr
authored andcommitted
Use #[cfg(doc)] instead of docs.rs-specific cfg flag
The documentation can also be built locally using `cargo doc --open`. Doc links should be working there as well.
1 parent a5a3a34 commit acfa59c

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ inline_asm = []
4242
abi_x86_interrupt = []
4343
const_fn = []
4444

45-
[package.metadata.docs.rs]
46-
rustdoc-args = ["--cfg", "docsrs"]
47-
4845
[package.metadata.release]
4946
no-dev-version = true
5047
pre-release-replacements = [

src/instructions/segmentation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Provides functions to read and write segment registers.
22
3-
#[cfg(docsrs)]
3+
#[cfg(doc)]
44
use crate::{
55
registers::control::Cr4Flags,
66
structures::gdt::{Descriptor, GlobalDescriptorTable},

src/registers/control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Functions to read and write control registers.
22
33
pub use super::model_specific::{Efer, EferFlags};
4-
#[cfg(docsrs)]
4+
#[cfg(doc)]
55
use crate::{registers::rflags::RFlags, structures::paging::PageTableFlags};
66

77
use bitflags::bitflags;

src/registers/model_specific.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Functions to read and write model specific registers.
22
3-
#[cfg(docsrs)]
3+
#[cfg(doc)]
44
use crate::{
55
instructions::segmentation::{Segment64, FS, GS},
66
registers::control::Cr4Flags,

0 commit comments

Comments
 (0)