Skip to content

Commit 12816e1

Browse files
author
Bryant Mairs
committed
Use backticks around types/functions in docs
1 parent 3b314b4 commit 12816e1

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

src/mqueue.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl MqAttr {
6666

6767
/// Open a message queue
6868
///
69-
/// See also [mq_open(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_open.html)
69+
/// See also [`mq_open(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_open.html)
7070
pub fn mq_open(name: &CString,
7171
oflag: MQ_OFlag,
7272
mode: Mode,
@@ -86,23 +86,23 @@ pub fn mq_open(name: &CString,
8686

8787
/// Remove a message queue
8888
///
89-
/// See also [mq_unlink(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_unlink.html)
89+
/// See also [`mq_unlink(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_unlink.html)
9090
pub fn mq_unlink(name: &CString) -> Result<()> {
9191
let res = unsafe { libc::mq_unlink(name.as_ptr()) };
9292
Errno::result(res).map(drop)
9393
}
9494

9595
/// Close a message queue
9696
///
97-
/// See also [mq_close(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_close.html)
97+
/// See also [`mq_close(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_close.html)
9898
pub fn mq_close(mqdes: mqd_t) -> Result<()> {
9999
let res = unsafe { libc::mq_close(mqdes) };
100100
Errno::result(res).map(drop)
101101
}
102102

103103
/// Receive a message from a message queue
104104
///
105-
/// See also [mq_receive(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_receive.html)
105+
/// See also [`mq_receive(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_receive.html)
106106
pub fn mq_receive(mqdes: mqd_t, message: &mut [u8], msg_prio: &mut u32) -> Result<usize> {
107107
let len = message.len() as size_t;
108108
let res = unsafe {
@@ -116,7 +116,7 @@ pub fn mq_receive(mqdes: mqd_t, message: &mut [u8], msg_prio: &mut u32) -> Resul
116116

117117
/// Send a message to a message queue
118118
///
119-
/// See also [mq_send(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_send.html)
119+
/// See also [`mq_send(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_send.html)
120120
pub fn mq_send(mqdes: mqd_t, message: &[u8], msq_prio: u32) -> Result<()> {
121121
let res = unsafe {
122122
libc::mq_send(mqdes,
@@ -129,7 +129,7 @@ pub fn mq_send(mqdes: mqd_t, message: &[u8], msq_prio: u32) -> Result<()> {
129129

130130
/// Get message queue attributes
131131
///
132-
/// See also [mq_getattr(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_getattr.html)
132+
/// See also [`mq_getattr(2)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_getattr.html)
133133
pub fn mq_getattr(mqd: mqd_t) -> Result<MqAttr> {
134134
let mut attr = unsafe { mem::uninitialized::<libc::mq_attr>() };
135135
let res = unsafe { libc::mq_getattr(mqd, &mut attr) };

src/pty.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Drop for PtyMaster {
6262
}
6363

6464
/// Grant access to a slave pseudoterminal (see
65-
/// [grantpt(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/grantpt.html))
65+
/// [`grantpt(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/grantpt.html))
6666
///
6767
/// `grantpt()` changes the mode and owner of the slave pseudoterminal device corresponding to the
6868
/// master pseudoterminal referred to by `fd`. This is a necessary step towards opening the slave.
@@ -76,7 +76,7 @@ pub fn grantpt(fd: &PtyMaster) -> Result<()> {
7676
}
7777

7878
/// Open a pseudoterminal device (see
79-
/// [posix_openpt(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.html))
79+
/// [`posix_openpt(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.html))
8080
///
8181
/// `posix_openpt()` returns a file descriptor to an existing unused pseuterminal master device.
8282
///
@@ -123,7 +123,7 @@ pub fn posix_openpt(flags: fcntl::OFlag) -> Result<PtyMaster> {
123123
}
124124

125125
/// Get the name of the slave pseudoterminal (see
126-
/// [ptsname(3)](http://man7.org/linux/man-pages/man3/ptsname.3.html))
126+
/// [`ptsname(3)`](http://man7.org/linux/man-pages/man3/ptsname.3.html))
127127
///
128128
/// `ptsname()` returns the name of the slave pseudoterminal device corresponding to the master
129129
/// referred to by `fd`.
@@ -150,7 +150,7 @@ pub unsafe fn ptsname(fd: &PtyMaster) -> Result<String> {
150150
}
151151

152152
/// Get the name of the slave pseudoterminal (see
153-
/// [ptsname(3)](http://man7.org/linux/man-pages/man3/ptsname.3.html))
153+
/// [`ptsname(3)`](http://man7.org/linux/man-pages/man3/ptsname.3.html))
154154
///
155155
/// `ptsname_r()` returns the name of the slave pseudoterminal device corresponding to the master
156156
/// referred to by `fd`. This is the threadsafe version of `ptsname()`, but it is not part of the
@@ -177,7 +177,7 @@ pub fn ptsname_r(fd: &PtyMaster) -> Result<String> {
177177
}
178178

179179
/// Unlock a pseudoterminal master/slave pseudoterminal pair (see
180-
/// [unlockpt(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlockpt.html))
180+
/// [`unlockpt(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlockpt.html))
181181
///
182182
/// `unlockpt()` unlocks the slave pseudoterminal device corresponding to the master pseudoterminal
183183
/// referred to by `fd`. This must be called before trying to open the slave side of a
@@ -194,7 +194,7 @@ pub fn unlockpt(fd: &PtyMaster) -> Result<()> {
194194

195195
/// Create a new pseudoterminal, returning the slave and master file descriptors
196196
/// in `OpenptyResult`
197-
/// (see [openpty](http://man7.org/linux/man-pages/man3/openpty.3.html)).
197+
/// (see [`openpty`](http://man7.org/linux/man-pages/man3/openpty.3.html)).
198198
///
199199
/// If `winsize` is not `None`, the window size of the slave will be set to
200200
/// the values in `winsize`. If `termios` is not `None`, the pseudoterminal's

src/sys/ioctl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ macro_rules! convert_ioctl_res {
255255
);
256256
}
257257

258-
/// Generates ioctl functions. See [::sys::ioctl](sys/ioctl/index.html).
258+
/// Generates ioctl functions. See [`::sys::ioctl`](sys/ioctl/index.html).
259259
#[macro_export]
260260
macro_rules! ioctl {
261261
($(#[$attr:meta])* bad none $name:ident with $nr:expr) => (

src/sys/pthread.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use libc::{self, pthread_t};
33
pub type Pthread = pthread_t;
44

55
/// Obtain ID of the calling thread (see
6-
/// [pthread_self(3)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_self.html)
6+
/// [`pthread_self(3)`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_self.html)
77
///
8-
/// The thread ID returned by pthread_self() is not the same thing as
9-
/// the kernel thread ID returned by a call to gettid(2).
8+
/// The thread ID returned by `pthread_self()` is not the same thing as
9+
/// the kernel thread ID returned by a call to `gettid(2)`.
1010
#[inline]
1111
pub fn pthread_self() -> Pthread {
1212
unsafe { libc::pthread_self() }

src/sys/ptrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn ptrace_peek(request: Request, pid: Pid, addr: *mut c_void, data: *mut c_void)
151151
}
152152

153153
/// Function for ptrace requests that return values from the data field.
154-
/// Some ptrace get requests populate structs or larger elements than c_long
154+
/// Some ptrace get requests populate structs or larger elements than `c_long`
155155
/// and therefore use the data field to return values. This function handles these
156156
/// requests.
157157
fn ptrace_get_data<T>(request: Request, pid: Pid) -> Result<T> {

src/sys/signal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ pub unsafe fn sigaction(signal: Signal, sigaction: &SigAction) -> Result<SigActi
423423
///
424424
/// If both `set` and `oldset` is None, this function is a no-op.
425425
///
426-
/// For more information, visit the [pthread_sigmask](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html),
427-
/// or [sigprocmask](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html) man pages.
426+
/// For more information, visit the [`pthread_sigmask`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html),
427+
/// or [`sigprocmask`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigprocmask.html) man pages.
428428
pub fn pthread_sigmask(how: SigmaskHow,
429429
set: Option<&SigSet>,
430430
oldset: Option<&mut SigSet>) -> Result<()> {

src/sys/socket/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,9 +992,9 @@ pub fn getsockname(fd: RawFd) -> Result<SockAddr> {
992992
}
993993
}
994994

995-
/// Return the appropriate SockAddr type from a `sockaddr_storage` of a certain
995+
/// Return the appropriate `SockAddr` type from a `sockaddr_storage` of a certain
996996
/// size. In C this would usually be done by casting. The `len` argument
997-
/// should be the number of bytes in the sockaddr_storage that are actually
997+
/// should be the number of bytes in the `sockaddr_storage` that are actually
998998
/// allocated and valid. It must be at least as large as all the useful parts
999999
/// of the structure. Note that in the case of a `sockaddr_un`, `len` need not
10001000
/// include the terminating null.

src/sys/uio.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn pread(fd: RawFd, buf: &mut [u8], offset: off_t) -> Result<usize>{
6262
///
6363
/// This is the same underlying C structure as [`IoVec`](struct.IoVec.html),
6464
/// except that it refers to memory in some other process, and is
65-
/// therefore not represented in Rust by an actual slice as IoVec is. It
65+
/// therefore not represented in Rust by an actual slice as `IoVec` is. It
6666
/// is used with [`process_vm_readv`](fn.process_vm_readv.html)
6767
/// and [`process_vm_writev`](fn.process_vm_writev.html).
6868
#[cfg(target_os = "linux")]
@@ -81,7 +81,7 @@ pub struct RemoteIoVec {
8181
/// and `remote_iov` is a list of [`RemoteIoVec`]s identifying where the
8282
/// data should be written in the target process. On success, returns the
8383
/// number of bytes written, which will always be a whole
84-
/// number of remote_iov chunks.
84+
/// number of `remote_iov` chunks.
8585
///
8686
/// This requires the same permissions as debugging the process using
8787
/// [ptrace]: you must either be a privileged process (with
@@ -112,17 +112,17 @@ pub fn process_vm_writev(pid: ::unistd::Pid, local_iov: &[IoVec<&[u8]>], remote_
112112
/// data into, and `remote_iov` is a list of [`RemoteIoVec`]s identifying
113113
/// where the source data is in the target process. On success,
114114
/// returns the number of bytes written, which will always be a whole
115-
/// number of remote_iov chunks.
115+
/// number of `remote_iov` chunks.
116116
///
117117
/// This requires the same permissions as debugging the process using
118-
/// [ptrace]: you must either be a privileged process (with
118+
/// [`ptrace`]: you must either be a privileged process (with
119119
/// `CAP_SYS_PTRACE`), or you must be running as the same user as the
120120
/// target process and the OS must have unprivileged debugging enabled.
121121
///
122122
/// This function is only available on Linux.
123123
///
124124
/// [`process_vm_readv`(2)]: http://man7.org/linux/man-pages/man2/process_vm_readv.2.html
125-
/// [ptrace]: ../ptrace/index.html
125+
/// [`ptrace`]: ../ptrace/index.html
126126
/// [`IoVec`]: struct.IoVec.html
127127
/// [`RemoteIoVec`]: struct.RemoteIoVec.html
128128
#[cfg(any(target_os = "linux"))]

src/unistd.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ pub fn mkfifo<P: ?Sized + NixPath>(path: &P, mode: Mode) -> Result<()> {
480480
Errno::result(res).map(drop)
481481
}
482482

483-
/// Returns the current directory as a PathBuf
483+
/// Returns the current directory as a `PathBuf`
484484
///
485485
/// Err is returned if the current user doesn't have the permission to read or search a component
486486
/// of the current path.
@@ -726,7 +726,7 @@ pub fn sethostname<S: AsRef<OsStr>>(name: S) -> Result<()> {
726726
}
727727

728728
/// Get the host name and store it in the provided buffer, returning a pointer
729-
/// the CStr in that buffer on success (see
729+
/// the `CStr` in that buffer on success (see
730730
/// [gethostname(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html)).
731731
///
732732
/// This function call attempts to get the host name for the running system and
@@ -1334,7 +1334,7 @@ pub fn sleep(seconds: libc::c_uint) -> c_uint {
13341334

13351335
/// Creates a regular file which persists even after process termination
13361336
///
1337-
/// * `template`: a path whose 6 rightmost characters must be X, e.g. /tmp/tmpfile_XXXXXX
1337+
/// * `template`: a path whose 6 rightmost characters must be X, e.g. `/tmp/tmpfile_XXXXXX`
13381338
/// * returns: tuple of file descriptor and filename
13391339
///
13401340
/// Err is returned either if no temporary filename could be created or the template doesn't

0 commit comments

Comments
 (0)