mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
rustup to nightly 2018-05-19
clippy_lints does not compile: non-primitive cast: `rustc_target::abi::Size` as `usize` Fixes #2780
This commit is contained in:
parent
06f981f2e9
commit
7b715583d4
1 changed files with 1 additions and 1 deletions
|
@ -432,7 +432,7 @@ pub fn miri_to_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, result: &ty::Const<'
|
|||
.interpret_interner
|
||||
.get_alloc(ptr.alloc_id)
|
||||
.unwrap();
|
||||
let offset = ptr.offset as usize;
|
||||
let offset = ptr.offset.bytes() as usize;
|
||||
let n = n as usize;
|
||||
String::from_utf8(alloc.bytes[offset..(offset + n)].to_owned()).ok().map(Constant::Str)
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue