Skip to content

Commit

Permalink
Use #[cfg(doc)] instead of docs.rs-specific cfg flag
Browse files Browse the repository at this point in the history
The documentation can also be built locally using `cargo doc --open`. Doc links should be working there as well.
  • Loading branch information
phil-opp authored and josephlr committed Aug 14, 2021
1 parent 160260f commit dea186a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ inline_asm = []
abi_x86_interrupt = []
const_fn = []

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.release]
no-dev-version = true
pre-release-replacements = [
Expand Down
2 changes: 1 addition & 1 deletion src/instructions/segmentation.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Provides functions to read and write segment registers.
#[cfg(docsrs)]
#[cfg(doc)]
use crate::{
registers::control::Cr4Flags,
structures::gdt::{Descriptor, GlobalDescriptorTable},
Expand Down
2 changes: 1 addition & 1 deletion src/registers/control.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Functions to read and write control registers.
pub use super::model_specific::{Efer, EferFlags};
#[cfg(docsrs)]
#[cfg(doc)]
use crate::{registers::rflags::RFlags, structures::paging::PageTableFlags};

use bitflags::bitflags;
Expand Down
2 changes: 1 addition & 1 deletion src/registers/model_specific.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Functions to read and write model specific registers.
#[cfg(docsrs)]
#[cfg(doc)]
use crate::{
instructions::segmentation::{Segment64, FS, GS},
registers::control::Cr4Flags,
Expand Down

0 comments on commit dea186a

Please sign in to comment.