Answer
Does not contradicts Rolle's theorem because $\tan x$ is not continuous over the interval $(0,\pi)$.
Work Step by Step
Given, $f(x)=\tan x$. $f(0)=\tan 0=0$. Similary, $f(\pi)=\tan\pi=0$. From Rolle's theorem we expect to find a number $c$ in $(0,\pi)$ such that $f'(c)=0$. Let's differentiate $f$ with respect to $x$, $$f'(x)=\sec^2x\implies \sec^2c=0$$ $$\frac{1}{\cos^2c}=0$$ This is not possible for any $c$ in $(0,\pi)$. This looks like it contradicts the Rolle's theorem but if we see $f(x)=\tan x$, we will realize that it is not continuous in $(0,\pi)$. In fact it has an infinite discontinuity as $x=\pi/2$.