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
|
@ -801,7 +801,7 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) {
|
|||
|
||||
let item = tcx.hir().foreign_item(item.id);
|
||||
match &item.kind {
|
||||
hir::ForeignItemKind::Fn(fn_decl, _, _) => {
|
||||
hir::ForeignItemKind::Fn(fn_decl, _, _, _) => {
|
||||
require_c_abi_if_c_variadic(tcx, fn_decl, abi, item.span);
|
||||
}
|
||||
hir::ForeignItemKind::Static(..) => {
|
||||
|
|
|
@ -29,7 +29,7 @@ fn equate_intrinsic_type<'tcx>(
|
|||
let (own_counts, span) = match tcx.hir_node_by_def_id(def_id) {
|
||||
hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn(_, generics, _), .. })
|
||||
| hir::Node::ForeignItem(hir::ForeignItem {
|
||||
kind: hir::ForeignItemKind::Fn(.., generics),
|
||||
kind: hir::ForeignItemKind::Fn(.., generics, _),
|
||||
..
|
||||
}) => {
|
||||
let own_counts = tcx.generics_of(def_id).own_counts();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue