-
- fn check_item(&mut self, _: &LateContext<'a, 'tcx>, item: &'tcx Item) {
- if item.attrs.iter().any(|a| a.check_name(*sym::automatically_derived)) {
- debug_assert!(self.derived_item.is_none());
- self.derived_item = Some(item.hir_id);
- }
- }
-
- fn check_item_post(&mut self, _: &LateContext<'a, 'tcx>, item: &'tcx Item) {
- if let Some(id) = self.derived_item {
- if item.hir_id == id {
- self.derived_item = None;
- }
- }
- }