Even very old stars are probably still too hot for rocks to form. The elements may be there, but they don't form compounds at stellar temperatures. And if a star does cool down enough for rocks to form, it's not really a star anymore, is it? It's just a rock.