Autoderef in librustc_mir
This commit is contained in:
parent
003879ccaa
commit
53b7464e67
@ -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 {
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user