Skip to content

Commit 0569a2d

Browse files
author
Cameron Zwarich
committed
---
yaml --- r: 152308 b: refs/heads/try2 c: 0339b27 h: refs/heads/master v: v3
1 parent ae79319 commit 0569a2d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: d123188b20222c8fc5fbc386bd15100b6f3c80ed
8+
refs/heads/try2: 0339b27e6db07e50bf71edc5eb78133a418a5949
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/mem_categorization.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,12 +390,10 @@ impl<'t,TYPER:Typer> MemCategorizationContext<'t,TYPER> {
390390
Some(adjustment) => {
391391
match *adjustment {
392392
ty::AutoObject(..) => {
393-
// Implicity casts a concrete object to trait object
394-
// so just patch up the type
393+
// Implicity cast a concrete object to trait object.
394+
// Result is an rvalue.
395395
let expr_ty = if_ok!(self.expr_ty_adjusted(expr));
396-
let mut expr_cmt = (*if_ok!(self.cat_expr_unadjusted(expr))).clone();
397-
expr_cmt.ty = expr_ty;
398-
Ok(Rc::new(expr_cmt))
396+
Ok(self.cat_rvalue_node(expr.id(), expr.span(), expr_ty))
399397
}
400398

401399
ty::AutoAddEnv(..) => {

0 commit comments

Comments
 (0)