1 // rustfmt-normalize_comments: true
2 // rustfmt-wrap_comments: true
8 f : SomeType, // Comment beside a field
9 f: SomeType, // Comment beside a field
13 /// A doc comment on a field
15 pub i: TypeForPublicField
21 // This will NOT get deleted!
27 // `x` is an important number.
28 #[allow(unused)] // TODO: use
33 #[allow(missing_docs)]
34 pub union Writebatch<K: Key> {
35 #[allow(dead_code)] //only used for holding the internal pointer
36 writebatch: RawWritebatch,
37 marker: PhantomData<K>,
40 // With a where-clause and generics.
41 pub union Foo<'a, Y: Baz>
44 f: SomeType, // Comment beside a field
90 pub union State<F: FnMut() -> time::Timespec> { now: F }
92 pub union State<F: FnMut() -> ()> { now: F }
94 pub union State<F: FnMut()> { now: F }
96 union Palette { /// A map of indices in the palette to a count of pixels in approximately that color
99 // Splitting a single line comment into a block previously had a misalignment
100 // when the field had attributes
101 union FieldsWithAttributes {
103 #[rustfmt::skip] pub host:String, // Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB
104 //Another pre comment
106 #[attr2] pub id: usize // CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCC CCCCCCCCCCCC
110 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep: node::Handle<IdRef<'id, Node<K, V>>,
116 union X<T> where T: Sized {
122 pub ptr: *const libc::c_void,
124 *const libc::c_void, tracer : *mut JSTracer ),
138 union Foo { /* comment */ }
142 the_quick_brown_fox_jumps_over_the_lazy_dog:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
146 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep: node::Handle<IdRef<'id, Node<Key, Value>>,
153 convex_shape.set_point(0, &Vector2f { x: 400.0, y: 100.0 });
154 convex_shape.set_point(1, &Vector2f { x: 500.0, y: 70.0 });
155 convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
156 convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });
159 // Vertical alignment
166 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 1
168 zzz: u32, // comment3
170 aaaaaa: u32, // comment4
176 aaaaaaa: u32, /* multi
182 do_not_push_this_comment1: u32, // comment1
183 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 2
184 please_do_not_push_this_comment3: u32, // comment3
186 do_not_push_this_comment1: u32, // comment1
188 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 2
189 please_do_not_push_this_comment3: u32, // comment3
191 do_not_push_this_comment1: u32, // comment1
192 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 2
194 please_do_not_push_this_comment3: u32, // comment3