Skip to content

Commit b08964b

Browse files
committed
Update const slice processing
1 parent 62f40e2 commit b08964b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'
441441
// FIXME: implement other conversion
442442
_ => None,
443443
},
444-
ConstValue::ScalarPair(Scalar::Ptr(ptr), Scalar::Bits { bits: n, .. }) => match result.ty.sty {
444+
ConstValue::Slice(Scalar::Ptr(ptr), n) => match result.ty.sty {
445445
ty::Ref(_, tam, _) => match tam.sty {
446446
ty::Str => {
447447
let alloc = tcx.alloc_map.lock().unwrap_memory(ptr.alloc_id);

0 commit comments

Comments
 (0)