  A famous conjecture of Caccetta and H\"aggkvist is that in a digraph on $n$
vertices and minimum out-degree at least $\frac{n}{r}$ there is a directed
cycle of length $r$ or less. We consider the following generalization: in an
undirected graph on $n$ vertices, any collection of $n$ disjoint sets of edges,
each of size at least $\frac{n}{r}$, has a rainbow cycle of length $r$ or less.
We focus on the case $r=3$, and prove the existence of a rainbow triangle under
somewhat stronger conditions than in the conjecture. For any fixed $k$ and
large enough $n$, we determine the maximum number of edges in an $n$-vertex
edge-coloured graph where all colour classes have size at most $k$ and there is
no rainbow triangle. Moreover, we characterize the extremal graphs for this
problem.
