about summary refs log tree commit diff
path: root/compiler/rustc_transmute/src/lib.rs
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2022-11-03 04:57:44 +0800
committeryukang <moorekang@gmail.com>2022-11-03 04:57:44 +0800
commitab22f5521bdb940d8beabd442298a56ecb236b38 (patch)
tree6049e7bd2c4ba20900d63e6155f1e443ab7b2042 /compiler/rustc_transmute/src/lib.rs
parent7df9d818ab07d1d014ac46a1f462d87a2d57ce21 (diff)
downloadrust-ab22f5521bdb940d8beabd442298a56ecb236b38.tar.gz
rust-ab22f5521bdb940d8beabd442298a56ecb236b38.zip
change error_reported to use Result instead of an option
Diffstat (limited to 'compiler/rustc_transmute/src/lib.rs')
-rw-r--r--compiler/rustc_transmute/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_transmute/src/lib.rs b/compiler/rustc_transmute/src/lib.rs
index f7cc94e5314..384d03106b1 100644
--- a/compiler/rustc_transmute/src/lib.rs
+++ b/compiler/rustc_transmute/src/lib.rs
@@ -122,7 +122,7 @@ mod rustc {
 
             let c = c.eval(tcx, param_env);
 
-            if let Some(err) = c.error_reported() {
+            if let Err(err) = c.error_reported() {
                 return Some(Self {
                     alignment: true,
                     lifetimes: true,