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>(
46 SomeType, // inline comment
54 G: Labeller<'a, N, E> + GraphWalk<'a, N, E>,
57 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA, // Comment
58 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
68 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
70 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB,
73 // With a where clause and generics.
74 pub struct Foo<'a, Y: Baz>
78 f: SomeType, // Comment beside a field
114 // Will this be a one-liner?
120 pub struct State<F: FnMut() -> time::Timespec> {
124 pub struct State<F: FnMut() -> ()> {
128 pub struct State<F: FnMut()> {
133 /// A map of indizes in the palette to a count of pixels in approximately
138 // Splitting a single line comment into a block previously had a misalignment
139 // when the field had attributes
140 struct FieldsWithAttributes {
142 #[rustfmt_skip] pub host:String, /* Post comment BBBBBBBBBBBBBB BBBBBBBBBBBBBBBB
143 * BBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB BBBBBBBBBBB */
144 // Another pre comment
147 pub id: usize, /* CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCC
148 * CCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCC CCCCCCCCCCCC */
152 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
153 node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>,
163 UUUUUUUUUUUUUUUUUUUUUUUU,
169 UUUUUUUUUUUUUUUUUUUUUUUU,
176 UUUUUUUUUUUUUUUUUUUUUUUU,
177 TTTTTTTTTTTTTTTTTTTTT,
183 UUUUUUUUUUUUUUUUUUUUUUUU,
190 TTTTTTTTTTTTTTTTT, // Foo
191 UUUUUUUUUUUUUUUUUUUUUUUU, // Bar
194 // Qux (FIXME #572 - doc comment)
214 pub ptr: *const libc::c_void,
215 pub trace: fn(obj: *const libc::c_void, tracer: *mut JSTracer),
226 struct Foo { /* comment */ }
227 struct Foo( /* comment */ );
231 the_quick_brown_fox_jumps_over_the_lazy_dog:
232 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
236 deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep:
237 node::Handle<IdRef<'id, Node<Key, Value>>, Type, NodeType>,
240 struct Foo<C = ()>(String);
244 convex_shape.set_point(0, &Vector2f { x: 400.0, y: 100.0 });
245 convex_shape.set_point(1, &Vector2f { x: 500.0, y: 70.0 });
246 convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
247 convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });