This was already fixed in:
bb01719f0e1 but we require fn_once lang item
to be defined as we are working on libcore support still.
Fixes Rust-GCC#3711
gcc/testsuite/ChangeLog:
* rust/compile/issue-3711.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
--- /dev/null
+#[lang = "sized"]
+pub trait Sized {}
+
+#[lang = "fn_once"]
+pub trait FnOnce<Args> {
+ #[lang = "fn_once_output"]
+ type Output;
+
+ extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+}
+
+fn returns_closure() -> _ {
+ // { dg-error "the type placeholder ._. is not allowed within types on item signatures .E0121." "" { target *-*-* } .-1 }
+ || 0
+}
+
+fn main() {}