Edition::EditionFuture for forwards compatibility #21425
+22
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Like #21423 but for editions.
I would like it so that RA is not necessarily bricked as soon as a new edition comes out. Usually a new edition means RA will have to update (new syntax, new keywords, new trait stuff, etc) but we should allow it to lurch on a little longer if that is not bothering a given user. I have been forced to upgrade because of this and it would have been nice at the time to do that the following month instead of in a mega-upgrade of rustc, 100 crates, rust-analyzer, and buck2 all at once.
I'm not sure if this is the exact right approach. Maybe we just assume all editions will be years and parse the string to a number? Then we can at least inject the prelude using a non-interned symbol to construct a
use ::std::prelude::rust_xxxx::*import, rather than falling back to the latest edition and probably missing some symbols.