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.
8 #[attr1] extern crate foo;
9 #[attr2] #[attr3] extern crate foo;
10 #[attr1]extern crate foo;
11 #[attr2]#[attr3]extern crate foo;
14 use std::{any, ascii, self, borrow, boxed, char, borrow, boxed, char, borrow, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char, borrow, boxed, char};
20 // sfdgfffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffff
23 b: u32, /* blah blah */
28 fn foo()->Box<Write+'static> where 'a: 'b, for<'a> D<'b>: 'a {
32 fn baz<'a: 'b /* comment on 'a */, T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType /* comment on T */>(a: A, b: B /* comment on b */, c: C) -> Bob {
33 #[attr1] extern crate foo;
34 #[attr2] #[attr3] extern crate foo;
35 #[attr1]extern crate foo;
36 #[attr2]#[attr3]extern crate foo;
40 fn qux(a: dadsfa, // Comment 1
41 b: sdfasdfa, // Comment 2
42 c: dsfdsafa) // Comment 3
49 fn foo(&mut self, a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
50 b: sdfasdfsdfasfs /*closing comment*/ ) -> isize {}
62 /// The `nodes` and `edges` method each return instantiations of
63 /// `Cow<[T]>` to leave implementers the freedom to create
65 /// entirely new vectors or to pass back slices into internally owned
67 pub trait GraphWalk<'a, N, E> {
68 /// Returns all the nodes in this graph.
69 fn nodes(&'a self) -> Nodes<'a, N>;
70 /// Returns all of the edges in this graph.
71 fn edges(&'a self) -> Edges<'a, E>;
72 /// The source node for `edge`.
73 fn source(&'a self, edge: &E) -> N;
74 /// The target node for `edge`.
75 fn target(&'a self, edge: &E) -> N;
82 f : SomeType, // Comment beside a field
83 f : SomeType, // Comment beside a field
86 /// A doc comment on a field
91 // With a where clause and generics.
92 pub struct Foo<'a, Y: Baz>
95 f: SomeType, // Comment beside a field
98 fn foo(ann: &'a (PpAnn+'a)) {}
110 let rc = Cell::new(42usize,42usize, Cell::new(42usize, remaining_widthremaining_widthremaining_widthremaining_width), 42usize);
111 let rc = RefCell::new(42usize,remaining_width, remaining_width); // a comment
112 let x = "Hello!!!!!!!!! abcd abcd abcd abcd abcd abcd\n abcd abcd abcd abcd abcd abcd abcd abcd abcd \
113 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
114 abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd";
119 fn deconstruct() -> (SocketAddr, Method, Headers,
120 RequestUri, HttpVersion,
121 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {
124 fn deconstruct(foo: Bar) -> (SocketAddr, Method, Headers,
125 RequestUri, HttpVersion,
126 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {