about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-03-05 22:31:06 +0000
committervarkor <github@varkor.com>2019-03-05 22:31:06 +0000
commit5c8b3c38f1a5a0270b29fa01f14c9db0b255ea43 (patch)
treec932a1f9c1e3bdbe0f097af034c104b40ce1e03e /src
parent0da0457593c5c1cb09f6197782ca73617860e897 (diff)
downloadrust-5c8b3c38f1a5a0270b29fa01f14c9db0b255ea43.tar.gz
rust-5c8b3c38f1a5a0270b29fa01f14c9db0b255ea43.zip
Fix rebase fallout
Diffstat (limited to 'src')
-rw-r--r--src/librustc_mir/interpret/operand.rs2
-rw-r--r--src/librustc_typeck/astconv.rs6
-rw-r--r--src/librustc_typeck/collect.rs4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs
index 574506ed232..11b4aa17ec4 100644
--- a/src/librustc_mir/interpret/operand.rs
+++ b/src/librustc_mir/interpret/operand.rs
@@ -594,7 +594,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
             self.layout_of(ty)
         })?;
         let op = match val.val {
-            ConstValue::Param(_) => Err(EvalErrorKind::TooGeneric.into()),
+            ConstValue::Param(_) => return Err(EvalErrorKind::TooGeneric.into()),
             ConstValue::Infer(_) => bug!(),
             ConstValue::ByRef(ptr, alloc) => {
                 // We rely on mutability being set correctly in that allocation to prevent writes
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs
index 1dec2d483b8..be708c78a0d 100644
--- a/src/librustc_typeck/astconv.rs
+++ b/src/librustc_typeck/astconv.rs
@@ -1869,14 +1869,14 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
         ast_const: &hir::AnonConst,
         ty: Ty<'tcx>
     ) -> &'tcx ty::LazyConst<'tcx> {
-        debug!("ast_const_to_const(id={:?}, ast_const={:?})", ast_const.id, ast_const);
+        debug!("ast_const_to_const(id={:?}, ast_const={:?})", ast_const.hir_id, ast_const);
 
         let tcx = self.tcx();
-        let def_id = tcx.hir().local_def_id(ast_const.id);
+        let def_id = tcx.hir().local_def_id_from_hir_id(ast_const.hir_id);
 
         let mut lazy_const = ty::LazyConst::Unevaluated(
             def_id,
-            Substs::identity_for_item(tcx, def_id)
+            InternalSubsts::identity_for_item(tcx, def_id),
         );
 
         let expr = &tcx.hir().body(ast_const.body).value;
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index 20b1ab4478a..eb4bbe88069 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -1020,7 +1020,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx ty
 
                         if !allow_defaults && default.is_some() {
                             if !tcx.features().default_type_parameter_fallback {
-                                tcx.lint_node(
+                                tcx.lint_hir(
                                     lint::builtin::INVALID_TYPE_PARAM_DEFAULT,
                                     param.hir_id,
                                     param.span,
@@ -1339,7 +1339,7 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Ty<'tcx> {
                                     let args = &generic_args.args;
                                     for arg in args {
                                         if let GenericArg::Const(ct) = arg {
-                                            if ct.value.id == node_id {
+                                            if ct.value.hir_id == hir_id {
                                                 found_const = true;
                                                 break;
                                             }