diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-33687.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-33687.rs b/src/test/ui/issues/issue-33687.rs new file mode 100644 index 000000000..ac802ed86 --- /dev/null +++ b/src/test/ui/issues/issue-33687.rs @@ -0,0 +1,17 @@ +// run-pass +#![feature(unboxed_closures)] +#![feature(fn_traits)] + +struct Test; + +impl FnOnce<(u32, u32)> for Test { + type Output = u32; + + extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { + a + b + } +} + +fn main() { + assert_eq!(Test(1u32, 2u32), 3u32); +} |