Skip to content

Commit 5c8b3c3

Browse files
committed
Fix rebase fallout
1 parent 0da0457 commit 5c8b3c3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/librustc_mir/interpret/operand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
594594
self.layout_of(ty)
595595
})?;
596596
let op = match val.val {
597-
ConstValue::Param(_) => Err(EvalErrorKind::TooGeneric.into()),
597+
ConstValue::Param(_) => return Err(EvalErrorKind::TooGeneric.into()),
598598
ConstValue::Infer(_) => bug!(),
599599
ConstValue::ByRef(ptr, alloc) => {
600600
// We rely on mutability being set correctly in that allocation to prevent writes

src/librustc_typeck/astconv.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1869,14 +1869,14 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
18691869
ast_const: &hir::AnonConst,
18701870
ty: Ty<'tcx>
18711871
) -> &'tcx ty::LazyConst<'tcx> {
1872-
debug!("ast_const_to_const(id={:?}, ast_const={:?})", ast_const.id, ast_const);
1872+
debug!("ast_const_to_const(id={:?}, ast_const={:?})", ast_const.hir_id, ast_const);
18731873

18741874
let tcx = self.tcx();
1875-
let def_id = tcx.hir().local_def_id(ast_const.id);
1875+
let def_id = tcx.hir().local_def_id_from_hir_id(ast_const.hir_id);
18761876

18771877
let mut lazy_const = ty::LazyConst::Unevaluated(
18781878
def_id,
1879-
Substs::identity_for_item(tcx, def_id)
1879+
InternalSubsts::identity_for_item(tcx, def_id),
18801880
);
18811881

18821882
let expr = &tcx.hir().body(ast_const.body).value;

src/librustc_typeck/collect.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx ty
10201020

10211021
if !allow_defaults && default.is_some() {
10221022
if !tcx.features().default_type_parameter_fallback {
1023-
tcx.lint_node(
1023+
tcx.lint_hir(
10241024
lint::builtin::INVALID_TYPE_PARAM_DEFAULT,
10251025
param.hir_id,
10261026
param.span,
@@ -1339,7 +1339,7 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Ty<'tcx> {
13391339
let args = &generic_args.args;
13401340
for arg in args {
13411341
if let GenericArg::Const(ct) = arg {
1342-
if ct.value.id == node_id {
1342+
if ct.value.hir_id == hir_id {
13431343
found_const = true;
13441344
break;
13451345
}

0 commit comments

Comments
 (0)