Ah, d'bat'.
It's pretty simple dude. If you're in check yah gotta get out of it.
So Rd8 doesn't remedy the situation and is an illegal move
Ah, d'bat'.