]> git.lizzy.rs Git - rust.git/commitdiff
Use ErrorReported
authorYuki OKUSHI <huyuumi.dev@gmail.com>
Thu, 28 Mar 2019 19:42:03 +0000 (04:42 +0900)
committerYuki OKUSHI <huyuumi.dev@gmail.com>
Thu, 28 Mar 2019 19:42:03 +0000 (04:42 +0900)
src/librustc_mir/const_eval.rs

index 1c3f7882b9fcf929ed7861ed64af4fc1181bc833..2268568c5f82d1431a12b3c1bbb3ede351cf295a 100644 (file)
@@ -14,6 +14,7 @@
 use rustc::ty::layout::{self, LayoutOf, VariantIdx};
 use rustc::ty::subst::Subst;
 use rustc::traits::Reveal;
+use rustc::util::common::ErrorReported;
 use rustc_data_structures::fx::FxHashMap;
 
 use syntax::ast::Mutability;
@@ -654,7 +655,7 @@ pub fn const_eval_raw_provider<'a, 'tcx>(
                                         v));
                     v
                 },
-                Err(_) => ErrorHandled::Reported,
+                Err(ErrorReported) => ErrorHandled::Reported,
             }
         } else if def_id.is_local() {
             // constant defined in this crate, we can figure out a lint level!