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