1 // rustfmt-normalize_comments: true
2 // rustfmt-wrap_comments: true
3 // rustfmt-format_strings: true
4 // Test of lots of random stuff.
5 // FIXME split this into multiple, self-contained tests.
20 self, any, ascii, borrow, borrow, borrow, borrow, borrow, borrow, borrow, borrow, borrow,
21 borrow, borrow, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed, char,
22 char, char, char, char, char, char, char, char, char,
28 // sfdgfffffffffffffffffffffffffffffffffffffffffffffffffffffff
29 // ffffffffffffffffffffffffffffffffffffffffff
31 fn foo(a: isize, b: u32 /* blah blah */, c: f64) {}
33 fn foo() -> Box<Write + 'static>
42 'a: 'b, // comment on 'a
43 T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType, // comment on T
62 fn qux(a: dadsfa, // Comment 1
63 b: sdfasdfa, // Comment 2
64 c: dsfdsafa) // Comment 3
73 a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
74 b: sdfasdfsdfasfs, // closing comment
87 /// The `nodes` and `edges` method each return instantiations of
88 /// `Cow<[T]>` to leave implementers the freedom to create
90 /// entirely new vectors or to pass back slices into internally owned
92 pub trait GraphWalk<'a, N, E> {
93 /// Returns all the nodes in this graph.
94 fn nodes(&'a self) -> Nodes<'a, N>;
95 /// Returns all of the edges in this graph.
96 fn edges(&'a self) -> Edges<'a, E>;
97 /// The source node for `edge`.
98 fn source(&'a self, edge: &E) -> N;
99 /// The target node for `edge`.
100 fn target(&'a self, edge: &E) -> N;
107 f : SomeType, // Comment beside a field
108 f: SomeType, // Comment beside a field
109 // Comment on a field
111 /// A doc comment on a field
117 // With a where-clause and generics.
118 pub struct Foo<'a, Y: Baz>
122 f: SomeType, // Comment beside a field
125 fn foo(ann: &'a (PpAnn + 'a)) {}
141 remaining_widthremaining_widthremaining_widthremaining_width,
145 let rc = RefCell::new(42usize, remaining_width, remaining_width); // a comment
146 let x = "Hello!!!!!!!!! abcd abcd abcd abcd abcd abcd\n abcd abcd abcd abcd abcd abcd abcd \
147 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
148 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
150 let s = expand(a, b);
153 fn deconstruct() -> (
159 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
171 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,