Add explanation for #[must_use] on Result

This commit is contained in:
Manish Goregaokar 2018-05-07 09:18:12 -07:00
parent 62889702c9
commit 1abed9cebf

View File

@ -251,7 +251,7 @@ use ops;
/// [`Ok`]: enum.Result.html#variant.Ok
/// [`Err`]: enum.Result.html#variant.Err
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
#[must_use]
#[must_use = "this `Result` may be an `Err` variant, which should be handled"]
#[stable(feature = "rust1", since = "1.0.0")]
pub enum Result<T, E> {
/// Contains the success value