If the target is illegal as Rust Harvester’s last ability tries to resolve, it won’t resolve and none of its effects will happen. You won’t put a +1/+1 counter on Rust Harvester.
2025-07-25 • wotc
If Rust Harvester leaves the battlefield before its last ability resolves, it won’t have a +1/+1 counter put on it when the ability resolves. Use its power as it last existed on the battlefield to determine how much damage is dealt.