File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,25 @@ A non-`None` edition will be considered deprecated
164
164
# Rationale and alternatives
165
165
[ rationale-and-alternatives ] : #rationale-and-alternatives
166
166
167
+ ## One Edition field controlling another
168
+
169
+ The exact semantics of ` package.edition ` vs ` <build-target>.edition ` have not been well defined when it comes to the manifest format itself.
170
+
171
+ ` package.edition ` 's [ documentation] ( https://doc.rust-lang.org/cargo/reference/manifest.html#the-edition-field ) says:
172
+
173
+ > [ it] affects which Rust Edition your package is compiled with
174
+
175
+ while ` <build-target>.edition ` [ documentation] ( https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-edition-field ) says:
176
+
177
+ > [ it] defines the Rust edition the target will use
178
+
179
+ For Edition 2024, support for ` <build-target>.proc_macro ` and ` <build-target>.crate_type `
180
+ was removed based on ` package.edition ` and not ` <build-target>.edition ` .
181
+
182
+ By having ` package.edition ` affect ` <build-target>.edition ` ,
183
+ we are effectively saying that ` package.edition ` affects the manifest format
184
+ while ` <build-target>.edition ` affects only affects the source code of the build-target.
185
+
167
186
# Prior art
168
187
[ prior-art ] : #prior-art
169
188
You can’t perform that action at this time.
0 commit comments