Skip to content

Commit 92ae924

Browse files
luqmanaalexcrichton
authored andcommitted
---
yaml --- r: 118741 b: refs/heads/snap-stage3 c: 8e9e17d h: refs/heads/master i: 118739: 26cc90e v: v3
1 parent 3e78820 commit 92ae924

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: b1646cbfd908dc948b251e362669af421100647a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ae7006e373e458eaf0464761a6b492181c47100e
4+
refs/heads/snap-stage3: 8e9e17d188c2b59813b5a7d8f6ebb0c22e26ce93
55
refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ fn trans_overloaded_call<'a>(
14631463
// Evaluate and tuple the arguments.
14641464
let tuple_type = ty::mk_tup(bcx.tcx(),
14651465
args.iter()
1466-
.map(|e| expr_ty(bcx, &**e))
1466+
.map(|e| ty::expr_ty_adjusted(bcx.tcx(), &**e))
14671467
.collect());
14681468
let repr = adt::represent_type(bcx.ccx(), tuple_type);
14691469
let numbered_fields: Vec<(uint, Gc<ast::Expr>)> =
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![feature(overloaded_calls)]
12+
13+
trait Foo {}
14+
15+
struct Bar;
16+
17+
impl<'a> std::ops::Fn<(&'a Foo,), ()> for Bar {
18+
fn call(&self, _: (&'a Foo,)) {}
19+
}
20+
21+
struct Baz;
22+
23+
impl Foo for Baz {}
24+
25+
fn main() {
26+
let bar = Bar;
27+
let baz = &Baz;
28+
bar(baz);
29+
}

0 commit comments

Comments
 (0)