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 struct Writebatch<K: Key> {
35 #[allow(dead_code)] // only used for holding the internal pointer
36 writebatch: RawWritebatch,
37 marker: PhantomData<K>,
42 struct NewType(Type, OtherType);
44 struct NewInt<T: Copy>(pub i32, SomeType /* inline comment */, T /* sup */);
49 G: Labeller<'a, N, E> + GraphWalk<'a, N, E>,
52 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, // Comment
53 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
63 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
65 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
68 // With a where clause and generics.
69 pub struct Foo<'a, Y: Baz>
73 f: SomeType, // Comment beside a field
109 // Will this be a one-liner?
110 struct Tuple(A /* Comment */, B);
112 pub struct State<F: FnMut() -> time::Timespec> {
116 pub struct State<F: FnMut() -> ()> {
120 pub struct State<F: FnMut()> {
125 /// A map of indizes in the palette to a count of pixels in approximately
130 // Splitting a single line comment into a block previously had a misalignment
131 // when the field had attributes
132 struct FieldsWithAttributes {
134 #[rustfmt_skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
135 * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
136 // Another pre comment
139 pub id: usize, /* CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC
140 * CCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCC CCCCCCCCCCCC */
144 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
145 node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>,
155 UUUUUUUUUUUUUUUUUUUUUUUU,
159 struct Foo<T>(TTTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTT)
162 struct Foo<T>(TTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTTTT)
167 UUUUUUUUUUUUUUUUUUUUUUUU,
174 TTTTTTTTTTTTTTTTT, // Foo
175 UUUUUUUUUUUUUUUUUUUUUUUU, // Bar
178 // Qux (FIXME #572 - doc comment)
198 pub ptr: *const libc::c_void,
199 pub trace: fn(obj: *const libc::c_void, tracer: *mut JSTracer),
210 struct Foo { /* comment */ }
211 struct Foo( /* comment */ );
215 the_quick_brown_fox_jumps_over_the_lazy_dog:
216 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
220 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
221 node::Handle<IdRef<'id, Node<Key, Value>>, Type, NodeType>,
224 struct Foo<C = ()>(String);
228 convex_shape.set_point(0, &Vector2f { x: 400.0, y: 100.0 });
229 convex_shape.set_point(1, &Vector2f { x: 500.0, y: 70.0 });
230 convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
231 convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });