|
8 | 8 |
|
9 | 9 | Allow users to add explicit dependencies on standard library crates in the |
10 | 10 | `Cargo.toml`. This enables Cargo to determine which standard library crates are |
11 | | -required by the crate graph without `build-std-crates` being set and for |
| 11 | +required by the crate graph without `build-std.crates` being set and for |
12 | 12 | different crates to require different standard library crates. |
13 | 13 |
|
14 | 14 | **This RFC is is part of the [build-std project goal] and a series of build-std |
@@ -706,7 +706,7 @@ required: |
706 | 706 |
|
707 | 707 | - Cargo could allow the user to specify which crates are required to be built, |
708 | 708 | such as with the existing options to the `-Zbuild-std=` flag. |
709 | | - [`build-std=always`][rfcs#3874-proposal] proposes a `build-std-crates` flag to |
| 709 | + [`build-std=always`][rfcs#3874-proposal] proposes a `build-std.crates` flag to |
710 | 710 | enable explicit dependencies to be a separate part of this RFC. |
711 | 711 |
|
712 | 712 | Furthermore, supporting explicit dependencies on standard library crates enables |
@@ -810,7 +810,7 @@ Supporting implicit dependencies allows the majority of the Rust ecosystem from |
810 | 810 | having to make any changes - `no_std` crates (or crates with a `std` feature) |
811 | 811 | will still benefit from adding explicit dependencies as allow them to be easily |
812 | 812 | used with `no_std` targets but users can still work around any legacy crates in |
813 | | -the graph with [`build-std-crates`][rfcs#3874-proposal]. |
| 813 | +the graph with [`build-std.crates`][rfcs#3874-proposal]. |
814 | 814 |
|
815 | 815 | ↩ [*Proposal*][proposal] |
816 | 816 |
|
@@ -1046,12 +1046,13 @@ There are many possible follow-ups to this part of the RFC: |
1046 | 1046 | [future-replace-no_std]: #replace-no_std-as-the-source-of-truth-for-whether-a-crate-depends-on-std |
1047 | 1047 |
|
1048 | 1048 | Crates can currently use the crate attribute `#![no_std]` to indicate a lack of |
1049 | | -dependency on `std`. Introducing `build-std-crates` from [RFC #3874][rfcs#3874] |
| 1049 | +dependency on `std`. Introducing `build-std.crates` from [RFC #3874][rfcs#3874] |
1050 | 1050 | or explicit dependencies would add a second way for the user to indicate a lack |
1051 | 1051 | of dependency on the standard library. It could therefore be desirable to |
1052 | 1052 | deprecate `#![no_std]` so that there remains only a single way to express a |
1053 | 1053 | dependency on the standard library. |
1054 | 1054 |
|
| 1055 | +
|
1055 | 1056 | `#![no_std]` serves two purposes - it stops the compiler from adding `std` to |
1056 | 1057 | the extern prelude and it prevents the user from depending on anything from |
1057 | 1058 | `std` accidentally. rustc's default behaviour of loading `std` when not |
|
0 commit comments