Handle safety keyword for extern block inner items
This commit is contained in:
parent
bbddc9b58f
commit
2a377122dd
52 changed files with 168 additions and 84 deletions
|
@ -886,7 +886,7 @@ impl<'hir> Map<'hir> {
|
|||
Node::Variant(variant) => named_span(variant.span, variant.ident, None),
|
||||
Node::ImplItem(item) => named_span(item.span, item.ident, Some(item.generics)),
|
||||
Node::ForeignItem(item) => match item.kind {
|
||||
ForeignItemKind::Fn(decl, _, _) => until_within(item.span, decl.output.span()),
|
||||
ForeignItemKind::Fn(decl, _, _, _) => until_within(item.span, decl.output.span()),
|
||||
_ => named_span(item.span, item.ident, None),
|
||||
},
|
||||
Node::Ctor(_) => return self.span(self.tcx.parent_hir_id(hir_id)),
|
||||
|
|
|
@ -201,7 +201,7 @@ pub fn provide(providers: &mut Providers) {
|
|||
..
|
||||
})
|
||||
| Node::ForeignItem(&ForeignItem {
|
||||
kind: ForeignItemKind::Fn(_, idents, _),
|
||||
kind: ForeignItemKind::Fn(_, idents, _, _),
|
||||
..
|
||||
}) = tcx.hir_node(tcx.local_def_id_to_hir_id(def_id))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue