Skip to content

Commit b9a642a

Browse files
authored
Merge pull request #474 from mkroening/port-alias
docs: add aliases for `in{,b,w,l}` and `out{,b,w,l}`
2 parents 62ffa3f + 091ecfb commit b9a642a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/instructions/port.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ impl<T: PortRead, A: PortReadAccess> PortGeneric<T, A> {
150150
///
151151
/// This function is unsafe because the I/O port could have side effects that violate memory
152152
/// safety.
153+
#[doc(alias = "in")]
154+
#[doc(alias = "inb")]
155+
#[doc(alias = "inw")]
156+
#[doc(alias = "inl")]
153157
#[inline]
154158
pub unsafe fn read(&mut self) -> T {
155159
unsafe { T::read_from_port(self.port) }
@@ -163,6 +167,10 @@ impl<T: PortWrite, A: PortWriteAccess> PortGeneric<T, A> {
163167
///
164168
/// This function is unsafe because the I/O port could have side effects that violate memory
165169
/// safety.
170+
#[doc(alias = "out")]
171+
#[doc(alias = "outb")]
172+
#[doc(alias = "outw")]
173+
#[doc(alias = "outl")]
166174
#[inline]
167175
pub unsafe fn write(&mut self, value: T) {
168176
unsafe { T::write_to_port(self.port, value) }

0 commit comments

Comments
 (0)