diff options
Diffstat (limited to 'gcc/testsuite/rust/compile/issue-3711.rs')
-rw-r--r-- | gcc/testsuite/rust/compile/issue-3711.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/issue-3711.rs b/gcc/testsuite/rust/compile/issue-3711.rs new file mode 100644 index 0000000..a3f9c39 --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-3711.rs @@ -0,0 +1,17 @@ +#[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() {} |