Use List::empty() instead of mk_substs(&[]).

This commit is contained in:
Nicholas Nethercote 2023-02-20 14:52:23 +11:00
parent 783b55ec82
commit e5df17aae5

View file

@ -237,7 +237,7 @@ pub fn constant<'tcx>(
typeck_results,
param_env: lcx.param_env,
needed_resolution: false,
substs: lcx.tcx.mk_substs(&[]),
substs: ty::List::empty(),
};
cx.expr(e).map(|cst| (cst, cx.needed_resolution))
}
@ -306,7 +306,7 @@ pub fn constant_context<'a, 'tcx>(
typeck_results,
param_env: lcx.param_env,
needed_resolution: false,
substs: lcx.tcx.mk_substs(&[]),
substs: ty::List::empty(),
}
}