about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-02-20 14:52:23 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-02-24 07:33:02 +1100
commite5df17aae5f9554ea8d241b4af91109400dc5cbd (patch)
treee3d4e760a2e7bdfe9e7291952905f9ed3119a538
parent783b55ec825dd0d30c80ed86c9b530044d32678d (diff)
downloadrust-e5df17aae5f9554ea8d241b4af91109400dc5cbd.tar.gz
rust-e5df17aae5f9554ea8d241b4af91109400dc5cbd.zip
Use `List::empty()` instead of `mk_substs(&[])`.
-rw-r--r--clippy_utils/src/consts.rs4
1 files 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(),
     }
 }