File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: b1646cbfd908dc948b251e362669af421100647a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: ae7006e373e458eaf0464761a6b492181c47100e
4
+ refs/heads/snap-stage3: 8e9e17d188c2b59813b5a7d8f6ebb0c22e26ce93
5
5
refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -1463,7 +1463,7 @@ fn trans_overloaded_call<'a>(
1463
1463
// Evaluate and tuple the arguments.
1464
1464
let tuple_type = ty:: mk_tup ( bcx. tcx ( ) ,
1465
1465
args. iter ( )
1466
- . map ( |e| expr_ty ( bcx, & * * e) )
1466
+ . map ( |e| ty :: expr_ty_adjusted ( bcx. tcx ( ) , & * * e) )
1467
1467
. collect ( ) ) ;
1468
1468
let repr = adt:: represent_type ( bcx. ccx ( ) , tuple_type) ;
1469
1469
let numbered_fields: Vec < ( uint , Gc < ast:: Expr > ) > =
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments