8. The set of all $x$ that makes the complex number $z=\frac{\sin x+\sin 2 x+\mathrm{i}\left(2 \cos ^{2} x \sin x-\tan x\right)}{\cos x-\mathrm{i}}$ a real number is $\qquad$ .
8. $\{x \mid x=k \pi, k \in \mathbf{Z}\}$