File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: f053f06973afde6400528e409d6332ea2171fda2
2
+ refs/heads/master: 2576a3c2c9584365fa134bfc1755112855ddfcd2
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ fn parse_item_attrs<T:send>(
93
93
astsrv:: exec ( srv) { |ctxt|
94
94
let attrs = alt ctxt. ast_map . get ( id) {
95
95
ast_map:: node_item ( item, _) { item. attrs }
96
+ ast_map:: node_native_item ( item, _) { item. attrs }
96
97
_ {
97
98
fail "parse_item_attrs: not an item" ;
98
99
}
@@ -113,6 +114,18 @@ fn should_extract_top_mod_attributes() {
113
114
assert doc. topmod . desc ( ) == some ( "test" ) ;
114
115
}
115
116
117
+ #[ test]
118
+ fn should_extract_native_mod_attributes ( ) {
119
+ let doc = test:: mk_doc ( "#[doc = \" test\" ] native mod a { }" ) ;
120
+ assert doc. topmod . nmods ( ) [ 0 ] . desc ( ) == some ( "test" ) ;
121
+ }
122
+
123
+ #[ test]
124
+ fn should_extract_native_fn_attributes ( ) {
125
+ let doc = test:: mk_doc ( "native mod a { #[doc = \" test\" ] fn a(); }" ) ;
126
+ assert doc. topmod . nmods ( ) [ 0 ] . fns [ 0 ] . desc ( ) == some ( "test" ) ;
127
+ }
128
+
116
129
fn fold_fn (
117
130
fold : fold:: fold < astsrv:: srv > ,
118
131
doc : doc:: fndoc
You can’t perform that action at this time.
0 commit comments