Skip to content

Commit 8f6b68c

Browse files
committed
rebased
1 parent 28173d3 commit 8f6b68c

File tree

1 file changed

+4
-0
lines changed
  • src/librustc_save_analysis

1 file changed

+4
-0
lines changed

Diff for: src/librustc_save_analysis/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
124124
match item.node {
125125
ast::ForeignItemKind::Fn(ref decl, ref generics) => {
126126
let sub_span = self.span_utils.sub_span_after_keyword(item.span, keywords::Fn);
127+
filter!(self.span_utils, sub_span, item.span, None);
127128
Some(Data::FunctionData(FunctionData {
128129
id: item.id,
129130
name: item.ident.to_string(),
@@ -136,11 +137,13 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
136137
parent: None,
137138
docs: docs_for_attrs(&item.attrs),
138139
sig: self.sig_base_extern(item),
140+
attributes: item.attrs.clone(),
139141
}))
140142
}
141143
ast::ForeignItemKind::Static(ref ty, m) => {
142144
let keyword = if m { keywords::Mut } else { keywords::Static };
143145
let sub_span = self.span_utils.sub_span_after_keyword(item.span, keyword);
146+
filter!(self.span_utils, sub_span, item.span, None);
144147
Some(Data::VariableData(VariableData {
145148
id: item.id,
146149
kind: VariableKind::Static,
@@ -154,6 +157,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
154157
visibility: From::from(&item.vis),
155158
docs: docs_for_attrs(&item.attrs),
156159
sig: Some(self.sig_base_extern(item)),
160+
attributes: item.attrs.clone(),
157161
}))
158162
}
159163
}

0 commit comments

Comments
 (0)