A solar eclipse occurs when the moon passes between the sun and the earth. However the moon can also eclipse a star which is called a lunar occulation. These can be used to measure the size of a large star. When a bright star passes behind the moon astronomers can measure the time it takes the moon to start to cover the star to the moment when the star is completely eclipsed. This time will be a small fraction of a second but with knowing how fast the moon is moving it is enough to calculate the size of the star.
(The Great Courses – The Life and Death of Stars)