gcc/testsuite/rust/compile/issue-3554-2.rs
raw| 1 | #[lang = "sized"] |
| 2 | pub trait Sized {} |
| 3 | |
| 4 | #[lang = "fn_once"] |
| 5 | pub trait FnOnce<Args> { |
| 6 | #[lang = "fn_once_output"] |
| 7 | type Output; |
| 8 | |
| 9 | extern "rust-call" fn call_once(self, args: Args) -> Self::Output; |
| 10 | } |
| 11 | trait Tr { |
| 12 | fn foo(); |
| 13 | |
| 14 | fn bar(&self) { |
| 15 | (|| self.foo())() |
| 16 | // { dg-error "no method named .foo. found in the current scope .E0599." "" { target *-*-* } .-1 } |
| 17 | } |
| 18 | } |