Through no one knows what would have happened had Cory lived, Ryan Murphy had a plan. While not giving away any specific plot points, spoilered just in case:
Murphy: The final year of the show, which will be next year, was designed around Rachel and Cory/Finn’s story. I always knew that, I always knew how it would end. I knew what the last shot was, he was in it. I knew what the last line was—she said it to him.