We have that
$$
\lim_{x\to a} f(x)=L
$$
if and only if for every $\varepsilon>0$ there exists $\delta>0$ such that if $|x-a|<\delta$, then $|f(x)-L|<\varepsilon$. We prove this is false. Let $\varepsilon =1/2$ and assume it is true. Since for any $\delta>0$, there are infinitely many rational and irrational numbers in the interval $I_\delta:=(a-\delta,a+\delta)$, then we can always find $y\in I_\delta \cap \Bbb Q$, $z\in I_\delta \cap (\Bbb R \backslash \Bbb Q)$. Then, we have that
$$
|f(y)-L|=|1-L|<1/2,
$$
$$
|f(z)-L|=|-1-L|<1/2,
$$
which is a contradiction, since there is no number $L\in \Bbb R$ such that $d(L,1)<1/2$, $d(L,-1)<1/2$.