X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_mir%2Fhair%2Fconstant.rs;h=a5be55d16d488b7049ce0c5239d2804988b3db99;hb=d59dcb261ecdc47d8afaac532050dadf86f3c898;hp=69df36348a69e6ffbe47801b1d71cabda1f14a0f;hpb=e19a229c88e39bc00f5672ff6a539aabe69bb545;p=rust.git diff --git a/src/librustc_mir/hair/constant.rs b/src/librustc_mir/hair/constant.rs index 69df36348a6..a5be55d16d4 100644 --- a/src/librustc_mir/hair/constant.rs +++ b/src/librustc_mir/hair/constant.rs @@ -30,13 +30,13 @@ let lit = match *lit { LitKind::Str(ref s, _) => { let s = s.as_str(); - let allocation = Allocation::from_byte_aligned_bytes(s.as_bytes(), ()); + let allocation = Allocation::from_byte_aligned_bytes(s.as_bytes()); let allocation = tcx.intern_const_alloc(allocation); ConstValue::Slice { data: allocation, start: 0, end: s.len() } }, LitKind::Err(ref s) => { let s = s.as_str(); - let allocation = Allocation::from_byte_aligned_bytes(s.as_bytes(), ()); + let allocation = Allocation::from_byte_aligned_bytes(s.as_bytes()); let allocation = tcx.intern_const_alloc(allocation); return Ok(tcx.mk_const(ty::Const { val: ConstValue::Slice{ data: allocation, start: 0, end: s.len() },