I didn't put any particular care into what happens to the materials, so they're simply destroyed (along with any output that has not yet been taken by an inserter). I'll see about doing something smarter in the future, but for now it's probably best to load these carefully, so you don't pile up anything expensive in there! (I was mostly proving it could be done, a chem plant and asm3 are coming too.)