]>
git.proxmox.com Git - rustc.git/blob - tests/ui/overloaded/overloaded-calls-simple.rs
3 #![feature(lang_items, unboxed_closures, fn_traits)]
10 impl FnMut
<(i32,)> for S1
{
11 extern "rust-call" fn call_mut(&mut self, (z
,): (i32,)) -> i32 {
16 impl FnOnce
<(i32,)> for S1
{
18 extern "rust-call" fn call_once(mut self, args
: (i32,)) -> i32 {
28 impl Fn
<(i32,)> for S2
{
29 extern "rust-call" fn call(&self, (z
,): (i32,)) -> i32 {
34 impl FnMut
<(i32,)> for S2
{
35 extern "rust-call" fn call_mut(&mut self, args
: (i32,)) -> i32 { self.call(args) }
38 impl FnOnce
<(i32,)> for S2
{
40 extern "rust-call" fn call_once(self, args
: (i32,)) -> i32 { self.call(args) }
48 impl FnOnce
<(i32,i32)> for S3
{
50 extern "rust-call" fn call_once(self, (z
,zz
): (i32,i32)) -> i32 {
51 self.x
* self.y
* z
* zz
67 let ans
= s
.call((3,));