File tree Expand file tree Collapse file tree 2 files changed +17
-54
lines changed Expand file tree Collapse file tree 2 files changed +17
-54
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: 259ea4e4b49cfe00efdb39e0226211a71807ec76
5
+ refs/heads/try: 87c3a5c1a3e2daee39afb60be83133bf4caf4413
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -125,7 +125,12 @@ fn should_not_extract_crate_name_if_no_name_value_in_link_attribute() {
125
125
assert attrs. name == none;
126
126
}
127
127
128
- fn parse_mod ( attrs : [ ast:: attribute ] ) -> mod_attrs {
128
+ fn parse_basic (
129
+ attrs : [ ast:: attribute ]
130
+ ) -> {
131
+ brief : option < str > ,
132
+ desc : option < str >
133
+ } {
129
134
parse_short_doc_or (
130
135
attrs,
131
136
{ |desc|
@@ -134,19 +139,17 @@ fn parse_mod(attrs: [ast::attribute]) -> mod_attrs {
134
139
desc: desc
135
140
}
136
141
} ,
137
- parse_mod_long_doc
142
+ { |_items, brief, desc|
143
+ {
144
+ brief: brief,
145
+ desc: desc
146
+ }
147
+ }
138
148
)
139
149
}
140
150
141
- fn parse_mod_long_doc (
142
- _items : [ @ast:: meta_item ] ,
143
- brief : option < str > ,
144
- desc : option < str >
145
- ) -> mod_attrs {
146
- {
147
- brief: brief,
148
- desc: desc
149
- }
151
+ fn parse_mod ( attrs : [ ast:: attribute ] ) -> mod_attrs {
152
+ parse_basic ( attrs)
150
153
}
151
154
152
155
#[ test]
@@ -327,27 +330,7 @@ fn parse_fn_should_parse_failure_conditions() {
327
330
}
328
331
329
332
fn parse_const ( attrs : [ ast:: attribute ] ) -> const_attrs {
330
- parse_short_doc_or (
331
- attrs,
332
- { |desc|
333
- {
334
- brief: none,
335
- desc: desc
336
- }
337
- } ,
338
- parse_const_long_doc
339
- )
340
- }
341
-
342
- fn parse_const_long_doc (
343
- _items : [ @ast:: meta_item ] ,
344
- brief : option < str > ,
345
- desc : option < str >
346
- ) -> const_attrs {
347
- {
348
- brief: brief,
349
- desc: desc
350
- }
333
+ parse_basic ( attrs)
351
334
}
352
335
353
336
#[ test]
@@ -368,27 +351,7 @@ fn should_parse_const_long_doc() {
368
351
}
369
352
370
353
fn parse_enum ( attrs : [ ast:: attribute ] ) -> enum_attrs {
371
- parse_short_doc_or (
372
- attrs,
373
- { |desc|
374
- {
375
- brief: none,
376
- desc: desc
377
- }
378
- } ,
379
- parse_enum_long_doc
380
- )
381
- }
382
-
383
- fn parse_enum_long_doc (
384
- _items : [ @ast:: meta_item ] ,
385
- brief : option < str > ,
386
- desc : option < str >
387
- ) -> enum_attrs {
388
- {
389
- brief: brief,
390
- desc: desc
391
- }
354
+ parse_basic ( attrs)
392
355
}
393
356
394
357
#[ test]
You can’t perform that action at this time.
0 commit comments