Since these plot points are fairly important for Avengers: Endgame I'm going to put them all in spoiler paragraphs.
The Avengers are able to
bring back all of the characters who were snapped in the last film, including Doctor Strange. Stark finds Strange in the final battle and asks him about what he saw in Avengers: Infinity War when he saw 1 successful outcome in 14,000,605 and whether they were living in that reality. Strange says that if he were to tell Stark whether they were in that successful version or not then it could not come to pass (or words to that effect).
Later on, at a pivotal moment,
Strange turns to Stark and indicates the number one to him. This prompts Stark to sacrifice himself. However, didn't this violate the very rule which Strange had outlined just a few moments before? Didn't telling Stark that by taking on Thanos he could realise Strange's vision mean that, by Strange's own logic, that Stark should have failed?
So was Strange talking nonsense when he said that
he couldn't let Stark in on the secret? Or is there some other explanation for what happened that I've missed?