From e5df17aae5f9554ea8d241b4af91109400dc5cbd Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 20 Feb 2023 14:52:23 +1100 Subject: [PATCH] Use `List::empty()` instead of `mk_substs(&[])`. --- clippy_utils/src/consts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_utils/src/consts.rs b/clippy_utils/src/consts.rs index e3bfffacb52..bb8890dcaf9 100644 --- a/clippy_utils/src/consts.rs +++ b/clippy_utils/src/consts.rs @@ -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(), } }