-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Double-check cfg_version test coverage #141452
Copy link
Copy link
Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.F-cfg_version`#![feature(cfg_version)]``#![feature(cfg_version)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.F-cfg_version`#![feature(cfg_version)]``#![feature(cfg_version)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
#[cfg(version("1.49.0"))]to be this feature-gate test without#![feature(cfg_version)]and the user should get the "this is unstable" error message.version(..)as a sort of "interface". In particular, I'd consider splitting tests for:version(..)): known vs unknown major version string "1", known vs unknown major-minor version string, known vs unknown major-minor-patch version string, empty version string, some "hello world" nonsense version string.version = ".."or bareversion).--cfg versionor--cfg version=".."they are not affected and usable with or without feature gate (I need to double-check that).This is also fine as a follow-up, I can probably write those coverage.
Originally posted by @jieyouxu in #141413 (comment)