Skip to content

Commit 4a9ab0f

Browse files
committedOct 5, 2019
Auto merge of #65115 - Centril:rollup-gezozgl, r=Centril
Rollup of 8 pull requests Successful merges: - #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`) - #64909 (When encountering chained operators use heuristics to recover from bad turbofish) - #65011 (Do not ICE when dereferencing non-Copy raw pointer) - #65064 (permit asyncawait-ondeck to be added by anyone) - #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR) - #65100 (Replace GeneratorSubsts with SubstsRef) - #65105 (Split out some passes from librustc) - #65106 (Allow unused attributes to avoid incremental bug) Failed merges: r? @ghost
2 parents 7870050 + f320add commit 4a9ab0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+713
-475
lines changed
 

‎Cargo.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3613,6 +3613,8 @@ dependencies = [
36133613
"rustc",
36143614
"rustc_data_structures",
36153615
"rustc_errors",
3616+
"rustc_index",
3617+
"rustc_target",
36163618
"syntax",
36173619
"syntax_pos",
36183620
]

‎src/libcore/option.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,6 @@ impl<T: Default> Option<T> {
11021102
}
11031103
}
11041104

1105-
#[unstable(feature = "inner_deref", reason = "newly added", issue = "50264")]
11061105
impl<T: Deref> Option<T> {
11071106
/// Converts from `Option<T>` (or `&Option<T>`) to `Option<&T::Target>`.
11081107
///
@@ -1114,20 +1113,18 @@ impl<T: Deref> Option<T> {
11141113
/// # Examples
11151114
///
11161115
/// ```
1117-
/// #![feature(inner_deref)]
1118-
///
11191116
/// let x: Option<String> = Some("hey".to_owned());
11201117
/// assert_eq!(x.as_deref(), Some("hey"));
11211118
///
11221119
/// let x: Option<String> = None;
11231120
/// assert_eq!(x.as_deref(), None);
11241121
/// ```
1122+
#[stable(feature = "option_deref", since = "1.40.0")]
11251123
pub fn as_deref(&self) -> Option<&T::Target> {
11261124
self.as_ref().map(|t| t.deref())
11271125
}
11281126
}
11291127

1130-
#[unstable(feature = "inner_deref", reason = "newly added", issue = "50264")]
11311128
impl<T: DerefMut> Option<T> {
11321129
/// Converts from `Option<T>` (or `&mut Option<T>`) to `Option<&mut T::Target>`.
11331130
///
@@ -1137,14 +1134,13 @@ impl<T: DerefMut> Option<T> {
11371134
/// # Examples
11381135
///
11391136
/// ```
1140-
/// #![feature(inner_deref)]
1141-
///
11421137
/// let mut x: Option<String> = Some("hey".to_owned());
11431138
/// assert_eq!(x.as_deref_mut().map(|x| {
11441139
/// x.make_ascii_uppercase();
11451140
/// x
11461141
/// }), Some("HEY".to_owned().as_mut_str()));
11471142
/// ```
1143+
#[stable(feature = "option_deref", since = "1.40.0")]
11481144
pub fn as_deref_mut(&mut self) -> Option<&mut T::Target> {
11491145
self.as_mut().map(|t| t.deref_mut())
11501146
}

0 commit comments

Comments
 (0)
Please sign in to comment.