1 // rustfmt-normalize_comments: true
5 let square = ( |i: i32 | i * i );
7 let commented = |/* first */ a /*argument*/, /* second*/ b: WithType /* argument*/, /* ignored */ _ |
8 (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb);
10 let block_body = move |xxxxxxxxxxxxxxxxxxxxxxxxxxxxx, ref yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy| {
11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
14 let loooooooooooooong_name = |field| {
16 if field.node.attrs.len() > 0 { field.node.attrs[0].span.lo
21 let unblock_me = |trivial| {
27 let simple = |arg| { /* comment formatting */ foo(arg) };
29 let test = | | { do_something(); do_something_else(); };
31 let arg_test = |big_argument_name, test123| looooooooooooooooooong_function_naaaaaaaaaaaaaaaaame();
33 let arg_test = |big_argument_name, test123| {looooooooooooooooooong_function_naaaaaaaaaaaaaaaaame()};
35 let simple_closure = move || -> () {};
37 let closure = |input: Ty| -> Option<String> {
41 let closure_with_return_type = |aaaaaaaaaaaaaaaaaaaaaaarg1, aaaaaaaaaaaaaaaaaaaaaaarg2| -> Strong { "sup".to_owned() };
43 |arg1, arg2, _, _, arg3, arg4| { let temp = arg4 + arg3;
48 let func = |x| println!("{}", x);
54 let closure = |x| match x {
61 let hash: &Fn(&&Block) -> u64 = &|block| -> u64 {
62 let mut h = SpanlessHash::new(cx);
67 let hash: &Fn(&&Block) -> u64 = &|block| -> u64 {
68 let mut h = SpanlessHash::new(cx);
74 impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
75 pub fn eq_expr(&self, left: &Expr, right: &Expr) -> bool {
76 match (&left.node, &right.node) {
77 (&ExprBinary(l_op, ref ll, ref lr), &ExprBinary(r_op, ref rl, ref rr)) => {
78 l_op.node == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) ||
79 swap_binop(l_op.node, ll, lr).map_or(false, |(l_op, ll, lr)| l_op == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr))
86 lifetimes_iter___map(|lasdfasfd| {
87 let hi = if l.bounds.is_empty() {
95 .and_then(|file| Capture::new_raw(None, |_, err| unsafe {
96 raw::pcap_fopen_offline(file, err)
101 let vertex_buffer = frame.scope(|ctx| {
103 ctx.create_host_visible_buffer::<VertexBuffer<Vertex>>(&vertices);
104 ctx.create_device_local_buffer(buffer)
110 let explicit_arg_decls =
111 explicit_arguments.into_iter()
113 .map(|(index, (ty, pattern))| {
114 let lvalue = Lvalue::Arg(index as u32);
115 block = this.pattern(block,
117 hair::PatternRef::Hair(pattern),
128 push_closure_out_to_100_chars: iter(otherwise_it_works_ok.into_iter().map(|f| {
136 aaaaaaaaaaaaaaaa.map(|x| {
144 let f = || unsafe { xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx };
148 Test.func_a(A_VERY_LONG_CONST_VARIABLE_NAME, move |arg1, arg2, arg3, arg4| arg1 + arg2 + arg3 + arg4)
152 foooooo(|_referencefffffffff: _, _target_reference: _, _oid: _, _target_oid: _| format!("refs/pull/{}/merge", pr_id))
157 || recurse(left, is_less, pred, limit),
158 || recurse(right, is_less, Some(pivot), limit),
163 || recurse(left, is_less, pred, limit),
165 || recurse(right, is_less, Some(pivot), limit),