Skip to content

Commit

Permalink
Rollup merge of rust-lang#73411 - ehuss:bump-stage0, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Update bootstrap to rustc 1.45.0-beta.2 (1dc0f6d 2020-06-15)

Pulls in changes from rust-lang#73326.

Closes rust-lang#73286
  • Loading branch information
Manishearth authored Jun 20, 2020
2 parents a876a5a + bfb0e8d commit 9a82736
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/libcore/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,7 @@ impl<T: Deref, E> Result<T, E> {
/// # Examples
///
/// ```
/// #![feature(inner_deref)]
/// let x: Result<String, u32> = Ok("hello".to_string());
/// let y: Result<&str, &u32> = Ok("hello");
/// assert_eq!(x.as_deref(), y);
Expand Down Expand Up @@ -1189,12 +1190,15 @@ impl<T: DerefMut, E> Result<T, E> {
/// # Examples
///
/// ```
/// #![feature(inner_deref)]
/// let mut s = "HELLO".to_string();
/// let mut x: Result<String, u32> = Ok("hello".to_string());
/// let y: Result<&mut str, &mut u32> = Ok("HELLO");
/// let y: Result<&mut str, &mut u32> = Ok(&mut s);
/// assert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
///
/// let mut i = 42;
/// let mut x: Result<String, u32> = Err(42);
/// let y: Result<&mut str, &mut u32> = Err(&42);
/// let y: Result<&mut str, &mut u32> = Err(&mut i);
/// assert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
/// ```
pub fn as_deref_mut(&mut self) -> Result<&mut T::Target, &mut E> {
Expand Down
2 changes: 1 addition & 1 deletion src/stage0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# source tarball for a stable release you'll likely see `1.x.0` for rustc and
# `0.(x+1).0` for Cargo where they were released on `date`.

date: 2020-06-03
date: 2020-06-16
rustc: beta
cargo: beta

Expand Down

0 comments on commit 9a82736

Please sign in to comment.