Autoderef in librustc_mir

This commit is contained in:
Jonas Schievink 2016-02-09 21:32:51 +01:00
parent 003879ccaa
commit 53b7464e67
3 changed files with 4 additions and 4 deletions

View File

@ -488,7 +488,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
let funcdid = match self.hir.tcx().lang_items.require(lang_item) {
Ok(d) => d,
Err(m) => {
self.hir.tcx().sess.fatal(&*m)
self.hir.tcx().sess.fatal(&m)
}
};
Constant {

View File

@ -114,7 +114,7 @@ impl<'tcx> Mirror<'tcx> for &'tcx hir::Expr {
}
hir::ExprBlock(ref blk) => {
ExprKind::Block { body: &**blk }
ExprKind::Block { body: &blk }
}
hir::ExprAssign(ref lhs, ref rhs) => {
@ -277,7 +277,7 @@ impl<'tcx> Mirror<'tcx> for &'tcx hir::Expr {
});
ExprKind::Closure {
closure_id: def_id,
substs: &**substs,
substs: &substs,
upvars: upvars,
}
}

View File

@ -90,7 +90,7 @@ impl<'patcx, 'cx, 'tcx> PatCx<'patcx, 'cx, 'tcx> {
Some(const_expr) => {
let pat = const_eval::const_expr_to_pat(self.cx.tcx, const_expr,
pat.span);
return self.to_pattern(&*pat);
return self.to_pattern(&pat);
}
None => {
self.cx.tcx.sess.span_bug(