1 // rustfmt-wrap_comments: true
2 // Test of lots of random stuff.
3 // FIXME split this into multiple, self-contained tests.
18 use std::{self, any, ascii, borrow, boxed, char, borrow, boxed, char, borrow, borrow, boxed, char,
19 borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char,
20 borrow, boxed, char, borrow, boxed, char, borrow, boxed, char};
26 // sfdgfffffffffffffffffffffffffffffffffffffffffffffffffffffff
27 // ffffffffffffffffffffffffffffffffffffffffff
29 fn foo(a: isize, b: u32 /* blah blah */, c: f64) { }
31 fn foo() -> Box<Write + 'static>
38 fn baz<'a: 'b, // comment on 'a
39 T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType /* comment on T */>
57 fn qux(a: dadsfa, // Comment 1
58 b: sdfasdfa, // Comment 2
59 c: dsfdsafa) // Comment 3
67 a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
68 b: sdfasdfsdfasfs /* closing comment */)
78 fn f3(self) -> Dog { }
81 /// The `nodes` and `edges` method each return instantiations of
82 /// `Cow<[T]>` to leave implementers the freedom to create
84 /// entirely new vectors or to pass back slices into internally owned
86 pub trait GraphWalk<'a, N, E> {
87 /// Returns all the nodes in this graph.
88 fn nodes(&'a self) -> Nodes<'a, N>;
89 /// Returns all of the edges in this graph.
90 fn edges(&'a self) -> Edges<'a, E>;
91 /// The source node for `edge`.
92 fn source(&'a self, edge: &E) -> N;
93 /// The target node for `edge`.
94 fn target(&'a self, edge: &E) -> N;
101 f : SomeType, // Comment beside a field
102 f: SomeType, // Comment beside a field
103 // Comment on a field
105 /// A doc comment on a field
111 // With a where clause and generics.
112 pub struct Foo<'a, Y: Baz>
115 f: SomeType, // Comment beside a field
118 fn foo(ann: &'a (PpAnn + 'a)) { }
130 let rc = Cell::new(42usize,
133 remaining_widthremaining_widthremaining_widthremaining_width),
135 let rc = RefCell::new(42usize, remaining_width, remaining_width); // a comment
136 let x = "Hello!!!!!!!!! abcd abcd abcd abcd abcd abcd\n abcd abcd abcd abcd abcd abcd abcd \
137 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
138 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
140 let s = expand(a, b);
149 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA)
153 fn deconstruct(foo: Bar)
159 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {