-
- fn check_item(&mut self, _: &LateContext<'tcx>, item: &'tcx Item<'_>) {
- if is_automatically_derived(item.attrs) {
- debug_assert!(self.derived_item.is_none());
- self.derived_item = Some(item.hir_id);
- }
- }
-
- fn check_item_post(&mut self, _: &LateContext<'tcx>, item: &'tcx Item<'_>) {
- if let Some(id) = self.derived_item {
- if item.hir_id == id {
- self.derived_item = None;
- }
- }
- }