Skip to content

Commit 9a82736

Browse files
authored
Rollup merge of #73411 - ehuss:bump-stage0, r=Mark-Simulacrum
Update bootstrap to rustc 1.45.0-beta.2 (1dc0f6d 2020-06-15) Pulls in changes from #73326. Closes #73286
2 parents a876a5a + bfb0e8d commit 9a82736

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/libcore/result.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,7 @@ impl<T: Deref, E> Result<T, E> {
11551155
/// # Examples
11561156
///
11571157
/// ```
1158+
/// #![feature(inner_deref)]
11581159
/// let x: Result<String, u32> = Ok("hello".to_string());
11591160
/// let y: Result<&str, &u32> = Ok("hello");
11601161
/// assert_eq!(x.as_deref(), y);
@@ -1189,12 +1190,15 @@ impl<T: DerefMut, E> Result<T, E> {
11891190
/// # Examples
11901191
///
11911192
/// ```
1193+
/// #![feature(inner_deref)]
1194+
/// let mut s = "HELLO".to_string();
11921195
/// let mut x: Result<String, u32> = Ok("hello".to_string());
1193-
/// let y: Result<&mut str, &mut u32> = Ok("HELLO");
1196+
/// let y: Result<&mut str, &mut u32> = Ok(&mut s);
11941197
/// assert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
11951198
///
1199+
/// let mut i = 42;
11961200
/// let mut x: Result<String, u32> = Err(42);
1197-
/// let y: Result<&mut str, &mut u32> = Err(&42);
1201+
/// let y: Result<&mut str, &mut u32> = Err(&mut i);
11981202
/// assert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
11991203
/// ```
12001204
pub fn as_deref_mut(&mut self) -> Result<&mut T::Target, &mut E> {

src/stage0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
1313
# `0.(x+1).0` for Cargo where they were released on `date`.
1414

15-
date: 2020-06-03
15+
date: 2020-06-16
1616
rustc: beta
1717
cargo: beta
1818

0 commit comments

Comments
 (0)