FIXME(eddyb) DRY this somehow and make it reusable from somewhere in `rustc`.
(tcx: TyCtxt<'_>, module_def_id: LocalDefId)
| 485 | |
| 486 | // FIXME(eddyb) DRY this somehow and make it reusable from somewhere in `rustc`. |
| 487 | fn check_mod_attrs(tcx: TyCtxt<'_>, module_def_id: LocalDefId) { |
| 488 | let check_spirv_attr_visitor = &mut CheckSpirvAttrVisitor { |
| 489 | tcx, |
| 490 | sym: Symbols::get(), |
| 491 | }; |
| 492 | tcx.hir() |
| 493 | .visit_item_likes_in_module(module_def_id, check_spirv_attr_visitor); |
| 494 | if module_def_id.is_top_level_module() { |
| 495 | check_spirv_attr_visitor.check_spirv_attributes(CRATE_HIR_ID, Target::Mod); |
| 496 | } |
| 497 | } |
| 498 | |
| 499 | pub(crate) fn provide(providers: &mut Providers) { |
| 500 | *providers = Providers { |
no test coverage detected