]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/rustfmt/tests/target/fn_once.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / target / fn_once.rs
diff --git a/src/tools/rustfmt/tests/target/fn_once.rs b/src/tools/rustfmt/tests/target/fn_once.rs
new file mode 100644 (file)
index 0000000..42b8f98
--- /dev/null
@@ -0,0 +1,8 @@
+struct Add(usize);
+
+impl FnOnce<(usize,)> for Add {
+    type Output = Add;
+    extern "rust-call" fn call_once(self, to: (usize,)) -> Add {
+        Add(self.0 + to.0)
+    }
+}