Hypera rumicis - Cocoons with pupae inside
Here are some of the beetles that emerged:
The weevils in the the subfamily Hyperinae are untypical for weevils in their development as the larvae are free living on the host plant's surface, much like most butterfly caterpillars. Most weevils develop underground or internally in the plant. The larvae also look a little bit like caterpillars. When these are ready to pupate they will create a cocoon made of secretions and pupate inside of it. The cocoons can be quite different in appearance and substance between species.
For example, here is the (empty) cocoon of Hypera arator: