Fix rebase fallout
This commit is contained in:
parent
0da0457593
commit
5c8b3c38f1
3 changed files with 6 additions and 6 deletions
|
@ -594,7 +594,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
|
||||||
self.layout_of(ty)
|
self.layout_of(ty)
|
||||||
})?;
|
})?;
|
||||||
let op = match val.val {
|
let op = match val.val {
|
||||||
ConstValue::Param(_) => Err(EvalErrorKind::TooGeneric.into()),
|
ConstValue::Param(_) => return Err(EvalErrorKind::TooGeneric.into()),
|
||||||
ConstValue::Infer(_) => bug!(),
|
ConstValue::Infer(_) => bug!(),
|
||||||
ConstValue::ByRef(ptr, alloc) => {
|
ConstValue::ByRef(ptr, alloc) => {
|
||||||
// We rely on mutability being set correctly in that allocation to prevent writes
|
// We rely on mutability being set correctly in that allocation to prevent writes
|
||||||
|
|
|
@ -1869,14 +1869,14 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
|
||||||
ast_const: &hir::AnonConst,
|
ast_const: &hir::AnonConst,
|
||||||
ty: Ty<'tcx>
|
ty: Ty<'tcx>
|
||||||
) -> &'tcx ty::LazyConst<'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 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(
|
let mut lazy_const = ty::LazyConst::Unevaluated(
|
||||||
def_id,
|
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;
|
let expr = &tcx.hir().body(ast_const.body).value;
|
||||||
|
|
|
@ -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 !allow_defaults && default.is_some() {
|
||||||
if !tcx.features().default_type_parameter_fallback {
|
if !tcx.features().default_type_parameter_fallback {
|
||||||
tcx.lint_node(
|
tcx.lint_hir(
|
||||||
lint::builtin::INVALID_TYPE_PARAM_DEFAULT,
|
lint::builtin::INVALID_TYPE_PARAM_DEFAULT,
|
||||||
param.hir_id,
|
param.hir_id,
|
||||||
param.span,
|
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;
|
let args = &generic_args.args;
|
||||||
for arg in args {
|
for arg in args {
|
||||||
if let GenericArg::Const(ct) = arg {
|
if let GenericArg::Const(ct) = arg {
|
||||||
if ct.value.id == node_id {
|
if ct.value.hir_id == hir_id {
|
||||||
found_const = true;
|
found_const = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue