Preheat the oven to 450 degrees F (230 degrees C). Lightly grease a baking tray with nonstick spray.
Place asparagus and mushrooms in a bowl. Drizzle with olive oil, then season with rosemary, salt, and pepper; toss well. Lay vegetables on the prepared tray in an even layer.
Roast in the preheated oven until asparagus is tender, about 15 minutes.
