Skip to content

Commit 09dc430

Browse files
committed
docs: Fix links by importing Segment trait
We also fix the formating slightly for consistancy with the rest of the codebase. Signed-off-by: Joe Richey <joerichey@google.com>
1 parent 62f99df commit 09dc430

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/structures/gdt.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Types for the Global Descriptor Table and segment selectors.
22
3+
#[cfg(doc)]
4+
use crate::instructions::segmentation::{Segment, CS, SS};
35
use crate::structures::tss::TaskStateSegment;
46
use crate::PrivilegeLevel;
57
use bit_field::BitField;
@@ -173,8 +175,7 @@ impl GlobalDescriptorTable {
173175
/// Loads the GDT in the CPU using the `lgdt` instruction. This does **not** alter any of the
174176
/// segment registers; you **must** (re)load them yourself using [the appropriate
175177
/// functions](crate::instructions::segmentation):
176-
/// [SS::set_reg](crate::instructions::segmentation::SS::set_reg),
177-
/// [CS::set_reg](crate::instructions::segmentation::CS::set_reg).
178+
/// [`SS::set_reg()`] and [`CS::set_reg()`].
178179
#[cfg(feature = "instructions")]
179180
#[inline]
180181
pub fn load(&'static self) {
@@ -185,8 +186,7 @@ impl GlobalDescriptorTable {
185186
/// Loads the GDT in the CPU using the `lgdt` instruction. This does **not** alter any of the
186187
/// segment registers; you **must** (re)load them yourself using [the appropriate
187188
/// functions](crate::instructions::segmentation):
188-
/// [SS::set_reg](crate::instructions::segmentation::SS::set_reg),
189-
/// [CS::set_reg](crate::instructions::segmentation::CS::set_reg).
189+
/// [`SS::set_reg()`] and [`CS::set_reg()`].
190190
///
191191
/// # Safety
192192
///

0 commit comments

Comments
 (0)