diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-01-28 10:09:34 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-01-28 10:09:34 +0100 |
| commit | b08964b3bdc8ffad3605ecd4d1c84cf8472566e0 (patch) | |
| tree | d7af172f640e61a2e3e9f7036d8a51cdbf052a6a | |
| parent | 62f40e28b9b4e44d683ca2508b1bd9e637d2df38 (diff) | |
| download | rust-b08964b3bdc8ffad3605ecd4d1c84cf8472566e0.tar.gz rust-b08964b3bdc8ffad3605ecd4d1c84cf8472566e0.zip | |
Update const slice processing
| -rw-r--r-- | clippy_lints/src/consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/consts.rs b/clippy_lints/src/consts.rs index 49722e5ad71..ccf74bffe4b 100644 --- a/clippy_lints/src/consts.rs +++ b/clippy_lints/src/consts.rs @@ -441,7 +441,7 @@ pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<' // FIXME: implement other conversion _ => None, }, - ConstValue::ScalarPair(Scalar::Ptr(ptr), Scalar::Bits { bits: n, .. }) => match result.ty.sty { + ConstValue::Slice(Scalar::Ptr(ptr), n) => match result.ty.sty { ty::Ref(_, tam, _) => match tam.sty { ty::Str => { let alloc = tcx.alloc_map.lock().unwrap_memory(ptr.alloc_id); |
