@@ -471,9 +471,9 @@ epoch**.
471
471
resolve to a top-level definition of ` foo ` , and otherwise fall back to
472
472
available external crates.
473
473
474
- - Cargo will provide a new ` crate ` key for aliasing dependencies, so that
475
- e.g. users who want to use the ` rand ` crate but call it ` random ` instead can
476
- now write ` random = { version = "0.3", crate = "rand " }` .
474
+ - Cargo will provide a new ` alias ` key for aliasing dependencies, so that
475
+ e.g. users who want to use the ` rand ` crate but call its library crate
476
+ ` random ` instead can now write ` rand = { version = "0.3", alias = "random " }` .
477
477
478
478
- We introduce several lints, which all start out allow-by-default but are
479
479
expected to ratchet up over time:
@@ -574,6 +574,15 @@ motivation. The crucial insight of the design is that, by making absolute paths
574
574
unambiguous about which crate they draw from, we can solve a number of
575
575
confusions and papercuts with the module system.
576
576
577
+ ## Epoch-based migration story
578
+
579
+ We can avoid the need for fallback in resolution by leveraging epochs instead.
580
+ On the current epoch, we would make ` crate:: ` paths available and start warning
581
+ about * not* using them for crate-internal paths, but we would not issue warnings
582
+ about ` extern crate ` . In the next epoch, we would change absolute path
583
+ interpretations, such that warning-free code on the previous epoch would
584
+ continue to compile and have the same meaning.
585
+
577
586
## Bike-sheddy choices
578
587
579
588
There are a few aspects of this proposal that could be colored a bit differently
@@ -643,4 +652,6 @@ ideas off into a separate *experimental* RFC:
643
652
# Unresolved questions
644
653
[ unresolved ] : #unresolved-questions
645
654
646
- None.
655
+ - How should we approach migration? Via a fallback, as proposed, or via epochs?
656
+ It is probably best to make this determination with more experience,
657
+ e.g. after we have a ` rustfix ` tool in hand.
0 commit comments