]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trans/mir/constant.rs
rustc: Store InternedString in `DefPathData`
[rust.git] / src / librustc_trans / mir / constant.rs
index e8b1430b4b07f21d35e0e9a859d0b5274006b1be..1109f34a1482e16a834a5f3ad1b6aaedc98ecfd5 100644 (file)
@@ -365,7 +365,7 @@ fn trans(&mut self) -> Result<Const<'tcx>, ConstEvalErr<'tcx>> {
                     }
                     if let Some((ref dest, target)) = *destination {
                         let result = if fn_ty.fn_sig(tcx).abi() == Abi::RustIntrinsic {
-                            match &tcx.item_name(def_id).as_str()[..] {
+                            match &tcx.item_name(def_id)[..] {
                                 "size_of" => {
                                     let llval = C_uint(self.ccx,
                                         self.ccx.size_of(substs.type_at(0)));