Skip to content

Commit ab7f02d

Browse files
add documentation from doc(include) to analysis data
1 parent da569fa commit ab7f02d

File tree

1 file changed

+11
-0
lines changed
  • src/librustc_save_analysis

1 file changed

+11
-0
lines changed

src/librustc_save_analysis/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,17 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
870870
result.push_str(&val.as_str());
871871
}
872872
result.push('\n');
873+
} else if let Some(meta_list) = attr.meta_item_list() {
874+
meta_list.into_iter()
875+
.filter(|it| it.check_name("include"))
876+
.filter_map(|it| it.meta_item_list().map(|l| l.to_owned()))
877+
.flat_map(|it| it)
878+
.filter(|meta| meta.check_name("contents"))
879+
.filter_map(|meta| meta.value_str())
880+
.for_each(|val| {
881+
result.push_str(&val.as_str());
882+
result.push('\n');
883+
});
873884
}
874885
}
875886
}

0 commit comments

Comments
 (0)