]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/exhaustive_items.rs
Addition `manual_map` test for `unsafe` blocks
[rust.git] / tests / ui / exhaustive_items.rs
index b476f09f8a0872178c1874b549c8bd3f18bedc20..6f59dbf2da59b126f0537c2b034193e076ca1164 100644 (file)
@@ -53,27 +53,36 @@ enum NonExhaustivePrivate {
 
 pub mod structs {
     pub struct Exhaustive {
-        foo: u8,
-        bar: String,
+        pub foo: u8,
+        pub bar: String,
     }
 
     // no warning, already non_exhaustive
     #[non_exhaustive]
     pub struct NonExhaustive {
-        foo: u8,
+        pub foo: u8,
+        pub bar: String,
+    }
+
+    // no warning, private fields
+    pub struct ExhaustivePrivateFieldTuple(u8);
+
+    // no warning, private fields
+    pub struct ExhaustivePrivateField {
+        pub foo: u8,
         bar: String,
     }
 
     // no warning, private
     struct ExhaustivePrivate {
-        foo: u8,
-        bar: String,
+        pub foo: u8,
+        pub bar: String,
     }
 
     // no warning, private
     #[non_exhaustive]
     struct NonExhaustivePrivate {
-        foo: u8,
-        bar: String,
+        pub foo: u8,
+        pub bar: String,
     }
 }