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;
46 let block_body_with_comment = args.iter()
48 // Emitting only dep-info is possible only for final crate type, as
49 // as others may emit required metadata for dependent crate types
50 if a.starts_with("--emit") && is_final_crate_type && !self.workspace_mode {
62 'c > |_: &'a (), _: &'b (), _: &'c ()| -> () {};
67 let func = |x| println!("{}", x);
73 let closure = |x| match x {
80 let hash: &Fn(&&Block) -> u64 = &|block| -> u64 {
81 let mut h = SpanlessHash::new(cx);
86 let hash: &Fn(&&Block) -> u64 = &|block| -> u64 {
87 let mut h = SpanlessHash::new(cx);
93 impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
94 pub fn eq_expr(&self, left: &Expr, right: &Expr) -> bool {
95 match (&left.node, &right.node) {
96 (&ExprBinary(l_op, ref ll, ref lr), &ExprBinary(r_op, ref rl, ref rr)) => {
97 l_op.node == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) ||
98 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))
105 lifetimes_iter___map(|lasdfasfd| {
106 let hi = if l.bounds.is_empty() {
113 open_raw_fd(fd, b'r')
114 .and_then(|file| Capture::new_raw(None, |_, err| unsafe {
115 raw::pcap_fopen_offline(file, err)
120 let vertex_buffer = frame.scope(|ctx| {
122 ctx.create_host_visible_buffer::<VertexBuffer<Vertex>>(&vertices);
123 ctx.create_device_local_buffer(buffer)
129 let explicit_arg_decls =
130 explicit_arguments.into_iter()
132 .map(|(index, (ty, pattern))| {
133 let lvalue = Lvalue::Arg(index as u32);
134 block = this.pattern(block,
136 hair::PatternRef::Hair(pattern),
147 push_closure_out_to_100_chars: iter(otherwise_it_works_ok.into_iter().map(|f| {
155 aaaaaaaaaaaaaaaa.map(|x| {
163 let f = || unsafe { xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx };
167 Test.func_a(A_VERY_LONG_CONST_VARIABLE_NAME, move |arg1, arg2, arg3, arg4| arg1 + arg2 + arg3 + arg4)
171 foooooo(|_referencefffffffff: _, _target_reference: _, _oid: _, _target_oid: _| format!("refs/pull/{}/merge", pr_id))
176 || recurse(left, is_less, pred, limit),
177 || recurse(right, is_less, Some(pivot), limit),
182 || recurse(left, is_less, pred, limit),
184 || recurse(right, is_less, Some(pivot), limit),
189 |ctx: Ctx<(String, String)>| -> io::Result<Response> {
190 Ok(Response::new().with_body(ctx.params.0))
195 let f = |x| {{{{x}}}};
214 a_very_very_very_very_very_very_very_long_function_name_or_anything_else()
219 result.init(&mut result.slave.borrow_mut(), &mut (result.strategy)()).map_err(|factory| Error {