One joking characterization of a topologist is someone who can't tell their donut from their coffee mug. As a novelty, I would very much like a food I can drink coffee out of. Does this exist? If not, what could I do to make it? It doesn't have to be anything like a donut, but if it is, that would be excellent.
As far as foods that double as dishes, off the top of my head I could only thing of a bread bowl for soup. You could certainly drink coffee out of a bread bowl, but I don't think it will be enjoyable.
A bit of googling leads me to:
The trick behind this is that it's a cookie lined with "special icing sugar" that works as a semi-waterproof barrier and an insulator. It will dissolve over a long enough time, though, and will sweeten the coffee as it sits in the cup. I can't find any information on when it hits stores, but it's a Lavazza product.
As long as you're content with single-use edible containers, a hard vegetable which can be eaten raw would serve. For example, you could drill a carrot to make a shot glass; if you get a big carrot then it would hold an espresso. The flavour imparted might not be so great, though: it would probably be better for vodka or other beverages which are known to mix well with carrot juice, because even if you dry the inside after drilling juice will continue to leach into it.
Repeated use would suffer from problems of mould, as well as from the inner surface becoming cooked.
As a child, if i was every lucky, i used to have hot chocolate and croissants on saturday mornings. One thing i would do is tear one of the arms off the croissant, dip it into the hot chocolate, and use it as a tiny drinking horn.
It is surely not beyond the wit of man to put these two ideas together: make some sort of cup out of croissant dough, probably bake it a bit to give it some shape, then deep-fry it.
It won't be the same texture as a doughnut. It will, however, be topologically equivalent to a doughnut - a jam doughnut!
I'd attack this by making a cup shaped pastry (or some kind of hard cookie dough in a cup shape) and then sealing the inside of it with high temperature chocolate. You could then serve coffee in it as long as it isn't too hot to melt the chocolate.
Note that regular chocolate melts at too low a temperature, you'd need to shop around for the right product.
This is probably as close as you are going to get, at least that I know of.