"for the rest of your life" functions as an adverb.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
English 1b3
I was aware of that, but I thought they had to match in form, not function... I guess I was wrong...
Mr Wordy
I see. Well, your sentence seems good English to me, as do these other examples that I just made up at random: