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.
19 use std::{self, any, ascii, borrow, borrow, borrow, borrow, borrow, borrow, borrow, borrow,
20 borrow, borrow, borrow, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed, boxed,
21 boxed, char, char, char, char, char, char, char, char, char, char};
26 // sfdgfffffffffffffffffffffffffffffffffffffffffffffffffffffff
27 // ffffffffffffffffffffffffffffffffffffffffff
29 fn foo(a: isize, b: u32 /* blah blah */, c: f64) {}
31 fn foo() -> Box<Write + 'static>
40 'a: 'b, // comment on 'a
41 T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType, // comment on T
60 fn qux(a: dadsfa, // Comment 1
61 b: sdfasdfa, // Comment 2
62 c: dsfdsafa) // Comment 3
71 a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
72 b: sdfasdfsdfasfs, // closing comment
85 /// The `nodes` and `edges` method each return instantiations of
86 /// `Cow<[T]>` to leave implementers the freedom to create
88 /// entirely new vectors or to pass back slices into internally owned
90 pub trait GraphWalk<'a, N, E> {
91 /// Returns all the nodes in this graph.
92 fn nodes(&'a self) -> Nodes<'a, N>;
93 /// Returns all of the edges in this graph.
94 fn edges(&'a self) -> Edges<'a, E>;
95 /// The source node for `edge`.
96 fn source(&'a self, edge: &E) -> N;
97 /// The target node for `edge`.
98 fn target(&'a self, edge: &E) -> N;
105 f : SomeType, // Comment beside a field
106 f: SomeType, // Comment beside a field
107 // Comment on a field
109 /// A doc comment on a field
115 // With a where clause and generics.
116 pub struct Foo<'a, Y: Baz>
120 f: SomeType, // Comment beside a field
123 fn foo(ann: &'a (PpAnn + 'a)) {}
139 remaining_widthremaining_widthremaining_widthremaining_width,
143 let rc = RefCell::new(42usize, remaining_width, remaining_width); // a comment
144 let x = "Hello!!!!!!!!! abcd abcd abcd abcd abcd abcd\n abcd abcd abcd abcd abcd abcd abcd \
145 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
146 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
148 let s = expand(a, b);
151 fn deconstruct() -> (
157 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
169 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,