From 592bdc3974005a82ec2701a9ef10f49f3bbd0ef7 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 10 Aug 2017 23:11:40 +0200 Subject: [PATCH] Add missing links in io module docs --- src/libstd/io/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 9a3036f753e..f486493f98b 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -22,7 +22,7 @@ //! you'll see a few different types of I/O throughout the documentation in //! this module: [`File`]s, [`TcpStream`]s, and sometimes even [`Vec`]s. For //! example, [`Read`] adds a [`read`][`Read::read`] method, which we can use on -//! `File`s: +//! [`File`]s: //! //! ``` //! use std::io; @@ -146,9 +146,9 @@ //! # } //! ``` //! -//! Note that you cannot use the `?` operator in functions that do not return -//! a `Result` (e.g. `main`). Instead, you can call `.unwrap()` or `match` -//! on the return value to catch any possible errors: +//! Note that you cannot use the [`?` operator] in functions that do not return +//! a [`Result`][`Result`] (e.g. `main`). Instead, you can call [`.unwrap()`] +//! or `match` on the return value to catch any possible errors: //! //! ``` //! use std::io; @@ -265,6 +265,8 @@ //! [`io::Result`]: type.Result.html //! [`?` operator]: ../../book/first-edition/syntax-index.html //! [`Read::read`]: trait.Read.html#tymethod.read +//! [`Result`]: ../result/enum.Result.html +//! [`.unwrap()`]: ../result/enum.Result.html#method.unwrap #![stable(feature = "rust1", since = "1.0.0")] -- 2.44.0