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 use std::{self, any, ascii, borrow, boxed, char, borrow, boxed, char, borrow, borrow, boxed, char,
21 borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char,
22 borrow, boxed, char, borrow, boxed, char, borrow, boxed, char};
28 // sfdgfffffffffffffffffffffffffffffffffffffffffffffffffffffff
29 // ffffffffffffffffffffffffffffffffffffffffff
31 fn foo(a: isize, b: u32 /* blah blah */, c: f64) {}
33 fn foo() -> Box<Write + 'static>
40 fn baz<'a: 'b, // comment on 'a
41 T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType /* comment on T */>
59 fn qux(a: dadsfa, // Comment 1
60 b: sdfasdfa, // Comment 2
61 c: dsfdsafa) // Comment 3
69 a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
70 b: sdfasdfsdfasfs /* closing comment */)
83 /// The `nodes` and `edges` method each return instantiations of
84 /// `Cow<[T]>` to leave implementers the freedom to create
86 /// entirely new vectors or to pass back slices into internally owned
88 pub trait GraphWalk<'a, N, E> {
89 /// Returns all the nodes in this graph.
90 fn nodes(&'a self) -> Nodes<'a, N>;
91 /// Returns all of the edges in this graph.
92 fn edges(&'a self) -> Edges<'a, E>;
93 /// The source node for `edge`.
94 fn source(&'a self, edge: &E) -> N;
95 /// The target node for `edge`.
96 fn target(&'a self, edge: &E) -> N;
103 f : SomeType, // Comment beside a field
104 f: SomeType, // Comment beside a field
105 // Comment on a field
107 /// A doc comment on a field
113 // With a where clause and generics.
114 pub struct Foo<'a, Y: Baz>
117 f: SomeType, // Comment beside a field
120 fn foo(ann: &'a (PpAnn + 'a)) {}
132 let rc = Cell::new(42usize,
135 remaining_widthremaining_widthremaining_widthremaining_width),
137 let rc = RefCell::new(42usize, remaining_width, remaining_width); // a comment
138 let x = "Hello!!!!!!!!! abcd abcd abcd abcd abcd abcd\n abcd abcd abcd abcd abcd abcd abcd \
139 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
140 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
142 let s = expand(a, b);
151 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)
155 fn deconstruct(foo: Bar)
161 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {