parent
8a1dda92ba
commit
03c28b4ac5
5 changed files with 5 additions and 5 deletions
|
@ -8,11 +8,11 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern: Unit-like struct construction is written with no trailing `{ }`
|
||||
struct Foo;
|
||||
|
||||
fn f2() {
|
||||
let _end_stmt = Foo { };
|
||||
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern: Unit-like struct construction is written with no trailing `{ }`
|
||||
struct Foo;
|
||||
|
||||
fn g3() {
|
||||
let _mid_tuple = (Foo { }, 2);
|
||||
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern: Unit-like struct construction is written with no trailing `{ }`
|
||||
struct Foo;
|
||||
|
||||
fn h4() {
|
||||
let _end_of_tuple = (3, Foo { });
|
||||
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern: Unit-like struct construction is written with no trailing `{ }`
|
||||
struct Foo;
|
||||
|
||||
fn i5() {
|
||||
let _end_of_block = { Foo { } };
|
||||
//~^ ERROR: Unit-like struct construction is written with no trailing `{ }`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern: Unit-like struct definition should be written as `struct Foo;`
|
||||
struct Foo {}
|
||||
//~^ ERROR: Unit-like struct definition should be written as `struct Foo;`
|
||||
|
||||
fn main() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue