Warning: Spoilers follow for Avengers: Infinity War.
The Thanos snap that wiped out half of all life in the universe at the end of Avengers: Infinity War was originally discussed for the upcoming Avengers: Endgame in early drafts.
In a new interview with Empire magazine, co-writer Stephen McFeely revealed that early on in the writing process, the original placement of the snap was going to take place after Avengers: Infinity War.
Source: IGN.com Thanos' Snap Almost Happened in Avengers: Endgame