X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Ftarget%2Fenum.rs;h=9a25126b44ecb49888e74c358e95382a822c9528;hb=8984438a6faf11e0cb8e876e80f177a42a43904d;hp=e429e45287e2a5327ee3844ac1ce1f0583d49a5a;hpb=af5976cf1eb72a35ef196bdf2d174e5f6ce5c30c;p=rust.git diff --git a/tests/target/enum.rs b/tests/target/enum.rs index e429e45287e..9a25126b44e 100644 --- a/tests/target/enum.rs +++ b/tests/target/enum.rs @@ -1,5 +1,4 @@ // rustfmt-wrap_comments: true -// rustfmt-error_on_line_overflow: false // Enums test #[atrr] @@ -65,7 +64,7 @@ pub enum EnumWithAttributes { TupleVar(usize, usize, usize), /* AAAA AAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAA * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA */ // Pre Comment - #[rustfmt_skip] + #[rustfmt::skip] SkippedItem(String,String,), // Post-comment #[another_attr] #[attr2] @@ -146,8 +145,8 @@ pub enum Bencoding<'i> { Int(i64), List(Vec>), /// 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>>), } @@ -255,10 +254,36 @@ pub enum QlError { #[fail(display = "Translation error: from {} to {}", 0, 1)] TranslationError(String, String), // (kind, input, expected) - #[fail(display = "Could not find {}: Found: {}, expected: {:?}", 0, 1, 2)] + #[fail( + display = "aaaaaaaaaaaaCould not find {}: Found: {}, expected: {:?}", + 0, 1, 2 + )] ResolveError(&'static str, String, Option), } // #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 +}