Skip to content

Commit 3a7609a

Browse files
committed
Unquoted versions may negstively interact with target_version
1 parent 0fed553 commit 3a7609a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

text/3857-cfg-version.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ If we were stricter on the syntax,
314314
we could allow for version numbers to be directly accepted, without quotes
315315
(e.g. `#[cfg(since(rust, 1.95.0))]`).
316316
If we ever decided to support operators (e.g.`#[cfg(since(rust, "=1.95.0"))]`, see `--check-cfg`), then we'd need to decide if those also go outside the string or then require a string, being inconsistent.
317+
This may limit us if we decide to allow for alternative version formats like with [target_version](#cfg_target_version) as they may not have formats that map well to SemVer.
318+
Worst case, we'd need to accept arbitrary bare words.
317319
This would also be inconsistent with other uses of `cfg`s
318320
*but* maybe that would just be the start to natively supporting more types in `cfg`,
319321
like integers which are of interest to embedded folks.

0 commit comments

Comments
 (0)