  We study differential inclusions $Du\in \Pi$ in an open set
$\Omega\subset\mathbb R^2$, where $\Pi\subset \mathbb R^{2\times 2}$ is a
compact connected $C^2$ curve without rank-one connections, but non-elliptic:
tangent lines to $\Pi$ may have rank-one connections, so that classical
regularity and rigidity results do not apply. For a wide class of such curves
$\Pi$, we show that $Du$ is locally Lipschitz outside a discrete set, and is
rigidly characterized around each singularity. Moreover, in the partially
elliptic case where at least one tangent line to $\Pi$ has no rank-one
connections, or under some topological restrictions on the tangent bundle of
$\Pi$, there are no singularities. This goes well beyond previously known
particular cases related to Burgers' equation and to the Aviles-Giga
functional. The key is the identification and appropriate use of a general
underlying structure: an infinite family of conservation laws, called entropy
productions in reference to the theory of scalar conservation laws.
