  We study the small-time asymptotics of the heat content of smooth
non-characteristic domains of a general rank-varying sub-Riemannian structure,
equipped with an arbitrary smooth measure. By adapting to the sub-Riemannian
case a technique due to Savo, we establish the existence of the full asymptotic
series: \begin{equation} Q_\Omega(t) = \sum_{k=0}^{\infty} a_k t^{k/2}, \qquad
\text{as } t\to 0. \end{equation} We compute explicitly the coefficients up to
order $k=5$, in terms of sub-Riemannian invariants of the domain and its
boundary. Furthermore, we prove that every coefficient can be obtained as the
limit of the corresponding one for a suitable Riemannian extension. As a
particular case we recover, using non-probabilistic techniques, the order $2$
formula due to Tyson and Wang in the first Heisenberg group [J. Tyson, J. Wang,
Comm. PDE, 2018]. An intriguing byproduct of our fifth-order analysis is the
evidence for new phenomena in presence of characteristic points. In particular,
we prove that the higher order coefficients in the expansion can blow-up in
their presence. A key tool for this last result is an exact formula for the
sub-Riemannian distance from a specific surface with an isolated characteristic
point in the first Heisenberg group, which is of independent interest.
