Heat oven to 375° F. Spread the pecans on a rimmed baking sheet and toast in oven, tossing once, until fragrant, 6 to 8 minutes. Let cool, then roughly chop.
Meanwhile, in a large saucepan, combine the carrots, brown sugar, butter, rosemary, cayenne, ½ cup water, 1½ teaspoons salt, and ¼ teaspoon pepper. Bring to a boil, reduce heat, cover, and simmer until the carrots begin to soften, 8 to 10 minutes. Uncover the saucepan and cook, stirring often, until the carrots are tender and the liquid has thickened, 10 to 15 minutes more.
Discard the rosemary and toss the carrots with the lemon juice and pecans.
My dil made these for Thanksgiving, and they were the best carrots I ever ate, even though we forgot to put the pecans on.