A rocky composition for an Earth-sized exoplanet