Pastry refers to a variety of doughs, as well as the sweet and savoury
baked goods made from them. These goods are often called pastries as a
synecdoche, and the dough may be accordingly called pastry dough for
clarity. Sweetened pastries are often described as bakers'
confectionery.
📖
Read on Wikipedia