  One of the eminent generalizations of theory of general relativity is the
Rastall gravity which was {constructed} based on the assumption of the
non-conserved energy-momentum tensor of the matter field. Despite in the
literature several solutions of black holes in the Rastall gravity coupled to
the electromagnetic field have been presented, in the current paper we argue
that the Rastall gravity with non-conserved energy-momentum tensor (with
$\lambda\neq0$ and $R\neq0$) cannot couple to the electrodynamics, i.e., the
electromagnetically charged black hole solution cannot be obtained in this
case. This statement is adequate for both linear and nonlinear electrodynamics
with the electric, magnetic, or dyonic charges coupled to the Rastall gravity.
