1 // rustfmt-normalize_comments: true
2 // rustfmt-wrap_comments: true
3 // rustfmt-error_on_line_overflow: false
9 f : SomeType, // Comment beside a field
10 f: SomeType, // Comment beside a field
14 /// A doc comment on a field
16 pub i: TypeForPublicField,
22 // This will NOT get deleted!
28 // `x` is an important number.
29 #[allow(unused)] // TODO: use
34 #[allow(missing_docs)]
35 pub struct Writebatch<K: Key> {
36 #[allow(dead_code)] // only used for holding the internal pointer
37 writebatch: RawWritebatch,
38 marker: PhantomData<K>,
43 struct NewType(Type, OtherType);
45 struct NewInt<T: Copy>(pub i32, SomeType /* inline comment */, T /* sup */);
50 G: Labeller<'a, N, E> + GraphWalk<'a, N, E>,
53 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, // Comment
54 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
64 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
66 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
69 // With a where clause and generics.
70 pub struct Foo<'a, Y: Baz>
74 f: SomeType, // Comment beside a field
110 // Will this be a one-liner?
111 struct Tuple(A /* Comment */, B);
113 pub struct State<F: FnMut() -> time::Timespec> {
117 pub struct State<F: FnMut() -> ()> {
121 pub struct State<F: FnMut()> {
126 /// A map of indizes in the palette to a count of pixels in approximately
131 // Splitting a single line comment into a block previously had a misalignment
132 // when the field had attributes
133 struct FieldsWithAttributes {
135 #[rustfmt_skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
136 * BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
137 // Another pre comment
140 pub id: usize, /* CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCC
141 * CCCCCCCCCCCCCC CCCCCCCCCCCC */
145 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
146 node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>,
156 UUUUUUUUUUUUUUUUUUUUUUUU,
160 struct Foo<T>(TTTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTT)
163 struct Foo<T>(TTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTTTT)
168 UUUUUUUUUUUUUUUUUUUUUUUU,
175 TTTTTTTTTTTTTTTTT, // Foo
176 UUUUUUUUUUUUUUUUUUUUUUUU, // Bar
179 // Qux (FIXME #572 - doc comment)
199 pub ptr: *const libc::c_void,
200 pub trace: fn(obj: *const libc::c_void, tracer: *mut JSTracer),
211 struct Foo { /* comment */ }
212 struct Foo( /* comment */ );
216 the_quick_brown_fox_jumps_over_the_lazy_dog:
217 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
221 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
222 node::Handle<IdRef<'id, Node<Key, Value>>, Type, NodeType>,
225 struct Foo<C = ()>(String);
229 convex_shape.set_point(0, &Vector2f { x: 400.0, y: 100.0 });
230 convex_shape.set_point(1, &Vector2f { x: 500.0, y: 70.0 });
231 convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
232 convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });