What details foreshadow the story's ending?
One of the first elements of foreshadowing occurs at the beginning of Section 2:
So she vanquished them, horse and foot, just as she had vanquished their fathers thirty years before about the smell.
The townspeople assume that the smell is the result of Emily's kitchen being in charge of a man--in this case, her servant, Tobe. We understand later that the smell arises from a decaying corpse, but this is the first clue that seemingly unimportant occurrences may signal a horrific ending.
A very important foreshadowing event is Emily's reaction to her father's death:
She told them that her father was not dead. She did that for three days, with the ministers calling on her, and the doctors, trying to persuade her to let them dispose of the body.
Emily reluctantly gives in and lets them bury her father, but, when we finally reach the end of this grotesque tale, we reflect on this incident as the forerunner of her inability to let Homer Barron go even in death.
Several other foreshadowing elements include the resolution to the horrible smell--the spreading of lime around Emily's property--and, perhaps most dramatic, Emily's purchase of "the best you have" poison, which is labeled "for rats," an appropriate characterization of Homer Barron. A subtle, but important, bit of foreshadowing occurs when Emily purchases a toiletry set with Homer Barron's initials, a very traditional wedding gift from bride to groom. Lastly, another fairly subtle element of foreshadowing is in the description of Homer Barron as a man who "liked men" and "was not a marrying man," perhaps a veiled reference to Homer Barron's sexual orientation, which would have made a true union between Emily and Barron at least unlikely, if not impossible.