diff options
Diffstat (limited to 'tests/ui/parser/method-call-on-struct-literal-in-if-condition.rs')
| -rw-r--r-- | tests/ui/parser/method-call-on-struct-literal-in-if-condition.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.rs b/tests/ui/parser/method-call-on-struct-literal-in-if-condition.rs deleted file mode 100644 index 3211b6c7bb9..00000000000 --- a/tests/ui/parser/method-call-on-struct-literal-in-if-condition.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub struct Example { a: i32 } - -impl Example { - fn is_pos(&self) -> bool { self.a > 0 } -} - -fn one() -> i32 { 1 } - -fn main() { - if Example { a: one(), }.is_pos() { //~ ERROR struct literals are not allowed here - println!("Positive!"); - } -} |
