]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/lint-non-camel-case-types.rs
auto merge of #15421 : catharsis/rust/doc-ffi-minor-fixes, r=alexcrichton
[rust.git] / src / test / compile-fail / lint-non-camel-case-types.rs
index 2cabdfe5bb0981be0fd6ff0fa3d6850da5598a76..784930003d047570b32b4d7dc027b761983ff824 100644 (file)
@@ -8,27 +8,33 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[forbid(non_camel_case_types)];
+#![forbid(non_camel_case_types)]
+#![allow(dead_code)]
 
-struct foo { //~ ERROR type `foo` should have a camel case identifier
+struct foo { //~ ERROR type `foo` should have a camel case name such as `Foo`
     bar: int,
 }
 
-enum foo2 { //~ ERROR type `foo2` should have a camel case identifier
+enum foo2 { //~ ERROR type `foo2` should have a camel case name such as `Foo2`
     Bar
 }
 
-struct foo3 { //~ ERROR type `foo3` should have a camel case identifier
+struct foo3 { //~ ERROR type `foo3` should have a camel case name such as `Foo3`
     bar: int
 }
 
-type foo4 = int; //~ ERROR type `foo4` should have a camel case identifier
+type foo4 = int; //~ ERROR type `foo4` should have a camel case name such as `Foo4`
 
 enum Foo5 {
-    bar //~ ERROR variant `bar` should have a camel case identifier
+    bar //~ ERROR variant `bar` should have a camel case name such as `Bar`
 }
 
-trait foo6 { //~ ERROR trait `foo6` should have a camel case identifier
+trait foo6 { //~ ERROR trait `foo6` should have a camel case name such as `Foo6`
+}
+
+#[repr(C)]
+struct foo7 {
+    bar: int,
 }
 
 fn main() { }