File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
branches/try/src/librustc/middle/typeck/check Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: e09d98603e608c9e47d4c89f7b4dca87a4b56da3
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 9c96a79a74f10bed18b031ce0ac4126c56d6cfb3
5
- refs/heads/try: 680d579ff0e0c8e65e329d29b867600aa2aec478
5
+ refs/heads/try: f7914739379711e9f56fdcfab049b5a9531feb52
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
8
8
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
Original file line number Diff line number Diff line change @@ -2147,11 +2147,11 @@ fn try_overloaded_call<'a>(fcx: &FnCtxt,
2147
2147
_ => { }
2148
2148
}
2149
2149
2150
- // Try `FnOnce`, then `FnMut`, then `Fn` .
2150
+ // Try the options that are least restrictive on the caller first .
2151
2151
for & ( maybe_function_trait, method_name) in [
2152
- ( fcx. tcx( ) . lang_items. fn_once_trait ( ) , token:: intern( "call_once " ) ) ,
2152
+ ( fcx. tcx( ) . lang_items. fn_trait ( ) , token:: intern( "call " ) ) ,
2153
2153
( fcx. tcx( ) . lang_items. fn_mut_trait( ) , token:: intern( "call_mut" ) ) ,
2154
- ( fcx. tcx( ) . lang_items. fn_trait ( ) , token:: intern( "call " ) )
2154
+ ( fcx. tcx( ) . lang_items. fn_once_trait ( ) , token:: intern( "call_once " ) ) ,
2155
2155
] . iter( ) {
2156
2156
let function_trait = match maybe_function_trait {
2157
2157
None => continue ,
You can’t perform that action at this time.
0 commit comments