In the following version of Cantor's diagonal argument, where is the assumption that the $n$-th digit of $r$ must be different from $0$ or $9$ used?
Suppose $f$ is a $1$-$1$ mapping between the positive integers and the reals.
Let $d_n$ be the function that returns the $n$-th digit of a real number.
Now, let's construct a real number, $r$. For the $n$-th digit of $r$, select something different from $d_n(f(n))$, and not $0$ or $9$.
Now, suppose $f(m) = r$. Then, the $m$-th digit of $r$ must be $d_m(r) = d_m(f(m))$, but by construction that cannot be the $m$-th digit of $r$.
Therefore, no such $f$ exists.
Thus, there is no $1$-$1$ mapping between the positive integers and the reals.
The important thing to note is when I construct $r$, it really is a real number.
(by $n$-th digit, I mean to the right of the decimal point)