Parshas Naso · Passuk 6:5
Throughout the term of their vow as nazirite, no razor shall touch their head; it shall remain consecrated until the completion of their term as nazirite of the LORD, the hair of their head being left to grow untrimmed.
Torah Temimah points to Nazir (verified).
English: “He shall be holy.” R’ Elazar said: Anyone who sits in a fast is called holy, as it is said “he shall be holy, letting the hair of his head grow untrimmed.”
A / D — Semantic or conceptual inference
The Nazir’s holiness from refraining from one thing implies that one who refrains more broadly (a faster) is also called holy.