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,
62 struct Tuple(// Comment 1
63 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
65 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB);
67 // With a where clause and generics.
68 pub struct Foo<'a, Y: Baz>
71 f: SomeType, // Comment beside a field
107 // Will this be a one-liner?
108 struct Tuple(A /* Comment */, B);
110 pub struct State<F: FnMut() -> time::Timespec> {
114 pub struct State<F: FnMut() -> ()> {
118 pub struct State<F: FnMut()> {
123 /// A map of indizes in the palette to a count of pixels in approximately
128 // Splitting a single line comment into a block previously had a misalignment
129 // when the field had attributes
130 struct FieldsWithAttributes {
132 #[rustfmt_skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
133 * BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
134 // Another pre comment
137 pub id: usize, /* CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCC
138 * CCCCCCCCCCCCCC CCCCCCCCCCCC */
142 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
143 node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>,
150 struct Foo<T>(TTTTTTTTTTTTTTTTT,
151 UUUUUUUUUUUUUUUUUUUUUUUU,
153 UUUUUUUUUUUUUUUUUUU);
154 struct Foo<T>(TTTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTT) where T: PartialEq;
155 struct Foo<T>(TTTTTTTTTTTTTTTTT, UUUUUUUUUUUUUUUUUUUUUUUU, TTTTTTTTTTTTTTTTTTTTT)
157 struct Foo<T>(TTTTTTTTTTTTTTTTT,
158 UUUUUUUUUUUUUUUUUUUUUUUU,
162 struct Foo<T>(TTTTTTTTTTTTTTTTT, // Foo
163 UUUUUUUUUUUUUUUUUUUUUUUU, // Bar
166 // Qux (FIXME #572 - doc comment)
167 UUUUUUUUUUUUUUUUUUU);
177 struct Foo<T>(TTTTTTTTTTTTTTTTTTT,
179 UUUUUUUUUUUUUUUUUUU);
182 pub ptr: *const libc::c_void,
183 pub trace: fn(obj: *const libc::c_void, tracer: *mut JSTracer),
194 struct Foo { /* comment */ }
195 struct Foo( /* comment */ );
199 the_quick_brown_fox_jumps_over_the_lazy_dog:
200 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
204 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
205 node::Handle<IdRef<'id, Node<Key, Value>>, Type, NodeType>,
208 struct Foo<C = ()>(String);
212 convex_shape.set_point(0, &Vector2f { x: 400.0, y: 100.0 });
213 convex_shape.set_point(1, &Vector2f { x: 500.0, y: 70.0 });
214 convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
215 convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });