diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-01-18 20:56:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-18 20:56:22 +0100 |
| commit | ca0c740041c9275aa3c4967ac90ebac4632218dd (patch) | |
| tree | 09b8854515f7aee38bbc42b9e9efb5594a88126d /compiler/rustc_middle/src | |
| parent | c6d25cf1b05d024bd5a02be834788798bc98283e (diff) | |
| parent | c13c746b477cfa3887bd88236c452bb57048f6c6 (diff) | |
| download | rust-ca0c740041c9275aa3c4967ac90ebac4632218dd.tar.gz rust-ca0c740041c9275aa3c4967ac90ebac4632218dd.zip | |
Rollup merge of #120101 - mj10021:issue-120090-fix, r=WaffleLapkin
change `.unwrap()` to `?` on write where `fmt::Result` is returned Fixes #120090 which points out that some of the `.unwrap()`s in `rustc_middle/src/mir/pretty.rs` are likely meant to be `?`s
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/mir/pretty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 2cf6410990e..3b60eba2dfe 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -1098,10 +1098,10 @@ fn pre_fmt_projection(projection: &[PlaceElem<'_>], fmt: &mut Formatter<'_>) -> | ProjectionElem::Subtype(_) | ProjectionElem::Downcast(_, _) | ProjectionElem::Field(_, _) => { - write!(fmt, "(").unwrap(); + write!(fmt, "(")?; } ProjectionElem::Deref => { - write!(fmt, "(*").unwrap(); + write!(fmt, "(*")?; } ProjectionElem::Index(_) | ProjectionElem::ConstantIndex { .. } |
