- LitKind::Err(ref s) => {
- let s = s.as_str();
- 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() },
- ty: tcx.types.err,
- }));
- },