]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/enum.rs
Honor `#[rustfmt::skip::attributes(derive)]` attribute
[rust.git] / tests / target / enum.rs
index 33eb211a4b5f55d8416448d480146ac41eaff48b..9a25126b44ecb49888e74c358e95382a822c9528 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-wrap_comments: true
-// rustfmt-error_on_line_overflow: false
 // Enums test
 
 #[atrr]
@@ -146,8 +145,8 @@ pub enum Bencoding<'i> {
     Int(i64),
     List(Vec<Bencoding<'i>>),
     /// A bencoded dict value. The first element the slice of bytes in the
-    /// source that the dict is composed of. The second is the dict,
-    /// decoded into an ordered map.
+    /// source that the dict is composed of. The second is the dict, decoded
+    /// into an ordered map.
     // TODO make Dict "structlike" AKA name the two values.
     Dict(&'i [u8], BTreeMap<&'i [u8], Bencoding<'i>>),
 }
@@ -256,10 +255,8 @@ pub enum QlError {
     TranslationError(String, String),
     // (kind, input, expected)
     #[fail(
-        display = "Could not find {}: Found: {}, expected: {:?}",
-        0,
-        1,
-        2
+        display = "aaaaaaaaaaaaCould not find {}: Found: {}, expected: {:?}",
+        0, 1, 2
     )]
     ResolveError(&'static str, String, Option<String>),
 }
@@ -267,3 +264,26 @@ pub enum QlError {
 // #2594
 enum Foo {}
 enum Bar {}
+
+// #3562
+enum PublishedFileVisibility {
+    Public =
+        sys::ERemoteStoragePublishedFileVisibility_k_ERemoteStoragePublishedFileVisibilityPublic,
+    FriendsOnly = sys::ERemoteStoragePublishedFileVisibility_k_ERemoteStoragePublishedFileVisibilityFriendsOnly,
+    Private =
+        sys::ERemoteStoragePublishedFileVisibility_k_ERemoteStoragePublishedFileVisibilityPrivate,
+}
+
+// #3771
+//#![feature(arbitrary_enum_discriminant)]
+#[repr(u32)]
+pub enum E {
+    A {
+        a: u32,
+    } = 0x100,
+    B {
+        field1: u32,
+        field2: u8,
+        field3: m::M,
+    } = 0x300, // comment
+}