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
{
57 let func
= |x
| println
!("{}", x
);
63 let closure
= |x
| match x
{
70 let hash
: &Fn(&&Block
) -> u64 = &|block
| -> u64 {
71 let mut h
= SpanlessHash
::new(cx
);
76 let hash
: &Fn(&&Block
) -> u64 = &|block
| -> u64 {
77 let mut h
= SpanlessHash
::new(cx
);
83 impl<'a
, 'tcx
: 'a
> SpanlessEq
<'a
, 'tcx
> {
84 pub fn eq_expr(&self, left
: &Expr
, right
: &Expr
) -> bool
{
85 match (&left
.node
, &right
.node
) {
86 (&ExprBinary(l_op
, ref ll
, ref lr
), &ExprBinary(r_op
, ref rl
, ref rr
)) => {
87 l_op
.node
== r_op
.node
&& self.eq_expr(ll
, rl
) && self.eq_expr(lr
, rr
) ||
88 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
))
95 lifetimes_iter___map(|lasdfasfd
| {
96 let hi
= if l
.bounds
.is_empty() {
103 open_raw_fd(fd
, b'r'
)
104 .and_then(|file
| Capture
::new_raw(None
, |_
, err
| unsafe {
105 raw
::pcap_fopen_offline(file
, err
)
110 let vertex_buffer
= frame
.scope(|ctx
| {
112 ctx
.create_host_visible_buffer
::<VertexBuffer
<Vertex
>>(&vertices
);
113 ctx
.create_device_local_buffer(buffer
)
119 let explicit_arg_decls
=
120 explicit_arguments
.into_iter()
122 .map(|(index
, (ty
, pattern
))| {
123 let lvalue
= Lvalue
::Arg(index
as u32);
124 block
= this
.pattern(block
,
126 hair
::PatternRef
::Hair(pattern
),
137 push_closure_out_to_100_chars
: iter(otherwise_it_works_ok
.into_iter().map(|f
| {
145 aaaaaaaaaaaaaaaa
.map(|x
| {
153 let f
= || unsafe { xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx }
;
157 Test
.func_a(A_VERY_LONG_CONST_VARIABLE_NAME
, move |arg1
, arg2
, arg3
, arg4
| arg1
+ arg2
+ arg3
+ arg4
)
161 foooooo(|_referencefffffffff
: _
, _target_reference
: _
, _oid
: _
, _target_oid
: _
| format
!("refs/pull/{}/merge", pr_id
))
166 || recurse(left
, is_less
, pred
, limit
),
167 || recurse(right
, is_less
, Some(pivot
), limit
),
172 || recurse(left
, is_less
, pred
, limit
),
174 || recurse(right
, is_less
, Some(pivot
), limit
),
179 |ctx
: Ctx
<(String
, String
)>| -> io
::Result
<Response
> {
180 Ok(Response
::new().with_body(ctx
.params
.0))
185 let f
= |x
| {{{{x}
}}};
204 a_very_very_very_very_very_very_very_long_function_name_or_anything_else()
209 result
.init(&mut result
.slave
.borrow_mut(), &mut (result
.strategy
)()).map_err(|factory
| Error
{