Lift: take self by value

This commit is contained in:
Bastian Kauschke
2020-10-16 21:59:49 +02:00
parent 1d2726726f
commit 8752a560b9
15 changed files with 138 additions and 151 deletions

View File

@@ -117,7 +117,7 @@ impl<Tag: Copy> std::fmt::Display for ImmTy<'tcx, Tag> {
ty::tls::with(|tcx| {
match self.imm {
Immediate::Scalar(s) => {
if let Some(ty) = tcx.lift(&self.layout.ty) {
if let Some(ty) = tcx.lift(self.layout.ty) {
let cx = FmtPrinter::new(tcx, f, Namespace::ValueNS);
p(cx, s, ty)?;
return Ok(());