]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/hair/constant.rs
Auto merge of #61361 - estebank:infer-type, r=varkor
[rust.git] / src / librustc_mir / hair / constant.rs
index 69df36348a69e6ffbe47801b1d71cabda1f14a0f..a5be55d16d488b7049ce0c5239d2804988b3db99 100644 (file)
     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() },