diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-01-24 00:30:53 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-24 00:30:53 -0800 |
| commit | eb769ed6b09cb9fa007508caef808f5e50264cb0 (patch) | |
| tree | 19390f81a3749210c1c1f86154e697871405c764 /src/libcore | |
| parent | 62f227b3f822a27bd603acede9137bfb49ca8b68 (diff) | |
| parent | 6eaf59dfc8be4ee5647f9c090c5a7668682f30c0 (diff) | |
| download | rust-eb769ed6b09cb9fa007508caef808f5e50264cb0.tar.gz rust-eb769ed6b09cb9fa007508caef808f5e50264cb0.zip | |
Rollup merge of #68424 - estebank:suggest-borrow-for-non-copy-vec, r=davidtwco
Suggest borrowing `Vec<NonCopy>` in for loop Partially address #64167.
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/option.rs | 1 | ||||
| -rw-r--r-- | src/libcore/result.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/option.rs b/src/libcore/option.rs index a471b174534..cb4247d9874 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -151,6 +151,7 @@ use crate::{ /// The `Option` type. See [the module level documentation](index.html) for more. #[derive(Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)] +#[rustc_diagnostic_item = "option_type"] #[stable(feature = "rust1", since = "1.0.0")] pub enum Option<T> { /// No value diff --git a/src/libcore/result.rs b/src/libcore/result.rs index c657ce33f60..bc70dbd62eb 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -242,6 +242,7 @@ use crate::ops::{self, Deref, DerefMut}; /// [`Err`]: enum.Result.html#variant.Err #[derive(Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)] #[must_use = "this `Result` may be an `Err` variant, which should be handled"] +#[rustc_diagnostic_item = "result_type"] #[stable(feature = "rust1", since = "1.0.0")] pub enum Result<T, E> { /// Contains the success value |
