to waste your effort by trying to do sth that is no longer possible
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition