Consolidate tests for non_camel_case_types
This commit is contained in:
parent
6473cf1757
commit
76c8b83efa
@ -1,7 +0,0 @@
|
|||||||
#[forbid(non_camel_case_types)]
|
|
||||||
struct foo { //~ ERROR type, variant, or trait must be camel case
|
|
||||||
bar: int,
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
#[forbid(non_camel_case_types)]
|
|
||||||
enum foo { //~ ERROR type, variant, or trait must be camel case
|
|
||||||
Bar
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
#[forbid(non_camel_case_types)]
|
|
||||||
struct foo { //~ ERROR type, variant, or trait must be camel case
|
|
||||||
bar: int
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
#[forbid(non_camel_case_types)]
|
|
||||||
type foo = int; //~ ERROR type, variant, or trait must be camel case
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
}
|
|
24
src/test/compile-fail/lint-non-camel-case-types.rs
Normal file
24
src/test/compile-fail/lint-non-camel-case-types.rs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#[forbid(non_camel_case_types)];
|
||||||
|
|
||||||
|
struct foo { //~ ERROR type, variant, or trait must be camel case
|
||||||
|
bar: int,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum foo2 { //~ ERROR type, variant, or trait must be camel case
|
||||||
|
Bar
|
||||||
|
}
|
||||||
|
|
||||||
|
struct foo3 { //~ ERROR type, variant, or trait must be camel case
|
||||||
|
bar: int
|
||||||
|
}
|
||||||
|
|
||||||
|
type foo4 = int; //~ ERROR type, variant, or trait must be camel case
|
||||||
|
|
||||||
|
enum Foo5 {
|
||||||
|
bar //~ ERROR type, variant, or trait must be camel case
|
||||||
|
}
|
||||||
|
|
||||||
|
trait foo6 { //~ ERROR type, variant, or trait must be camel case
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() { }
|
@ -1,7 +0,0 @@
|
|||||||
#[forbid(non_camel_case_types)]
|
|
||||||
enum Foo {
|
|
||||||
bar //~ ERROR type, variant, or trait must be camel case
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user