@@ -1011,41 +1011,19 @@ impl CliUnstable {
1011
1011
}
1012
1012
1013
1013
match k {
1014
- "print-im-a-teapot" => self . print_im_a_teapot = parse_bool ( k, v) ?,
1014
+ // Permanently unstable features
1015
+ // Sorted alphabetically:
1015
1016
"allow-features" => self . allow_features = Some ( parse_features ( v) . into_iter ( ) . collect ( ) ) ,
1016
- "unstable-options" => self . unstable_options = parse_empty ( k, v) ?,
1017
- "no-index-update" => self . no_index_update = parse_empty ( k, v) ?,
1018
- "avoid-dev-deps" => self . avoid_dev_deps = parse_empty ( k, v) ?,
1019
- "minimal-versions" => self . minimal_versions = parse_empty ( k, v) ?,
1020
- "direct-minimal-versions" => self . direct_minimal_versions = parse_empty ( k, v) ?,
1021
- "advanced-env" => self . advanced_env = parse_empty ( k, v) ?,
1022
- "config-include" => self . config_include = parse_empty ( k, v) ?,
1023
- "check-cfg" => {
1024
- self . check_cfg = v. map_or ( Ok ( None ) , |v| parse_check_cfg ( v. split ( ',' ) ) ) ?
1025
- }
1026
- "dual-proc-macros" => self . dual_proc_macros = parse_empty ( k, v) ?,
1027
- // can also be set in .cargo/config or with and ENV
1028
- "mtime-on-use" => self . mtime_on_use = parse_empty ( k, v) ?,
1029
- "named-profiles" => stabilized_warn ( k, "1.57" , STABILIZED_NAMED_PROFILES ) ,
1030
- "binary-dep-depinfo" => self . binary_dep_depinfo = parse_empty ( k, v) ?,
1031
- "bindeps" => self . bindeps = parse_empty ( k, v) ?,
1032
- "build-std" => {
1033
- self . build_std = Some ( crate :: core:: compiler:: standard_lib:: parse_unstable_flag ( v) )
1034
- }
1035
- "build-std-features" => self . build_std_features = Some ( parse_features ( v) ) ,
1036
- "doctest-xcompile" => self . doctest_xcompile = parse_empty ( k, v) ?,
1037
- "doctest-in-workspace" => self . doctest_in_workspace = parse_empty ( k, v) ?,
1038
- "panic-abort-tests" => self . panic_abort_tests = parse_empty ( k, v) ?,
1039
- "jobserver-per-rustc" => self . jobserver_per_rustc = parse_empty ( k, v) ?,
1040
- "gitoxide" => {
1041
- self . gitoxide = v. map_or_else (
1042
- || Ok ( Some ( GitoxideFeatures :: all ( ) ) ) ,
1043
- |v| parse_gitoxide ( v. split ( ',' ) ) ,
1044
- ) ?
1045
- }
1046
- "host-config" => self . host_config = parse_empty ( k, v) ?,
1047
- "target-applies-to-host" => self . target_applies_to_host = parse_empty ( k, v) ?,
1048
- "publish-timeout" => self . publish_timeout = parse_empty ( k, v) ?,
1017
+ "print-im-a-teapot" => self . print_im_a_teapot = parse_bool ( k, v) ?,
1018
+
1019
+ // Stabilized features
1020
+ // Sorted by version, then alphabetically:
1021
+ "compile-progress" => stabilized_warn ( k, "1.30" , STABILIZED_COMPILE_PROGRESS ) ,
1022
+ "offline" => stabilized_err ( k, "1.36" , STABILIZED_OFFLINE ) ?,
1023
+ "cache-messages" => stabilized_warn ( k, "1.40" , STABILIZED_CACHE_MESSAGES ) ,
1024
+ "install-upgrade" => stabilized_warn ( k, "1.41" , STABILIZED_INSTALL_UPGRADE ) ,
1025
+ "config-profile" => stabilized_warn ( k, "1.43" , STABILIZED_CONFIG_PROFILE ) ,
1026
+ "crate-versions" => stabilized_warn ( k, "1.47" , STABILIZED_CRATE_VERSIONS ) ,
1049
1027
"features" => {
1050
1028
// `-Z features` has been stabilized since 1.51,
1051
1029
// but `-Z features=compare` is still allowed for convenience
@@ -1067,35 +1045,65 @@ impl CliUnstable {
1067
1045
}
1068
1046
self . features = Some ( feats) ;
1069
1047
}
1070
- "separate-nightlies" => self . separate_nightlies = parse_empty ( k, v) ?,
1071
- "multitarget" => stabilized_warn ( k, "1.64" , STABILISED_MULTITARGET ) ,
1072
- "rustdoc-map" => self . rustdoc_map = parse_empty ( k, v) ?,
1073
- "terminal-width" => stabilized_warn ( k, "1.68" , STABILIZED_TERMINAL_WIDTH ) ,
1074
- "sparse-registry" => stabilized_warn ( k, "1.68" , STABILISED_SPARSE_REGISTRY ) ,
1075
- "registry-auth" => self . registry_auth = parse_empty ( k, v) ?,
1076
- "namespaced-features" => stabilized_warn ( k, "1.60" , STABILISED_NAMESPACED_FEATURES ) ,
1077
- "weak-dep-features" => stabilized_warn ( k, "1.60" , STABILIZED_WEAK_DEP_FEATURES ) ,
1078
- "credential-process" => self . credential_process = parse_empty ( k, v) ?,
1079
- "rustdoc-scrape-examples" => self . rustdoc_scrape_examples = parse_empty ( k, v) ?,
1080
- "skip-rustdoc-fingerprint" => self . skip_rustdoc_fingerprint = parse_empty ( k, v) ?,
1081
- "compile-progress" => stabilized_warn ( k, "1.30" , STABILIZED_COMPILE_PROGRESS ) ,
1082
- "offline" => stabilized_err ( k, "1.36" , STABILIZED_OFFLINE ) ?,
1083
- "cache-messages" => stabilized_warn ( k, "1.40" , STABILIZED_CACHE_MESSAGES ) ,
1084
- "install-upgrade" => stabilized_warn ( k, "1.41" , STABILIZED_INSTALL_UPGRADE ) ,
1085
- "config-profile" => stabilized_warn ( k, "1.43" , STABILIZED_CONFIG_PROFILE ) ,
1086
- "crate-versions" => stabilized_warn ( k, "1.47" , STABILIZED_CRATE_VERSIONS ) ,
1087
1048
"package-features" => stabilized_warn ( k, "1.51" , STABILIZED_PACKAGE_FEATURES ) ,
1088
- "extra-link-arg" => stabilized_warn ( k, "1.56" , STABILIZED_EXTRA_LINK_ARG ) ,
1089
1049
"configurable-env" => stabilized_warn ( k, "1.56" , STABILIZED_CONFIGURABLE_ENV ) ,
1050
+ "extra-link-arg" => stabilized_warn ( k, "1.56" , STABILIZED_EXTRA_LINK_ARG ) ,
1090
1051
"patch-in-config" => stabilized_warn ( k, "1.56" , STABILIZED_PATCH_IN_CONFIG ) ,
1052
+ "named-profiles" => stabilized_warn ( k, "1.57" , STABILIZED_NAMED_PROFILES ) ,
1091
1053
"future-incompat-report" => {
1092
1054
stabilized_warn ( k, "1.59.0" , STABILIZED_FUTURE_INCOMPAT_REPORT )
1093
1055
}
1056
+ "namespaced-features" => stabilized_warn ( k, "1.60" , STABILISED_NAMESPACED_FEATURES ) ,
1094
1057
"timings" => stabilized_warn ( k, "1.60" , STABILIZED_TIMINGS ) ,
1058
+ "weak-dep-features" => stabilized_warn ( k, "1.60" , STABILIZED_WEAK_DEP_FEATURES ) ,
1059
+ "multitarget" => stabilized_warn ( k, "1.64" , STABILISED_MULTITARGET ) ,
1060
+ "sparse-registry" => stabilized_warn ( k, "1.68" , STABILISED_SPARSE_REGISTRY ) ,
1061
+ "terminal-width" => stabilized_warn ( k, "1.68" , STABILIZED_TERMINAL_WIDTH ) ,
1062
+
1063
+ // Unstable features
1064
+ // Sorted alphabetically:
1065
+ "advanced-env" => self . advanced_env = parse_empty ( k, v) ?,
1066
+ "avoid-dev-deps" => self . avoid_dev_deps = parse_empty ( k, v) ?,
1067
+ "binary-dep-depinfo" => self . binary_dep_depinfo = parse_empty ( k, v) ?,
1068
+ "bindeps" => self . bindeps = parse_empty ( k, v) ?,
1069
+ "build-std" => {
1070
+ self . build_std = Some ( crate :: core:: compiler:: standard_lib:: parse_unstable_flag ( v) )
1071
+ }
1072
+ "build-std-features" => self . build_std_features = Some ( parse_features ( v) ) ,
1073
+ "check-cfg" => {
1074
+ self . check_cfg = v. map_or ( Ok ( None ) , |v| parse_check_cfg ( v. split ( ',' ) ) ) ?
1075
+ }
1095
1076
"codegen-backend" => self . codegen_backend = parse_empty ( k, v) ?,
1096
- "profile-rustflags" => self . profile_rustflags = parse_empty ( k, v) ?,
1097
- "msrv-policy" => self . msrv_policy = parse_empty ( k, v) ?,
1077
+ "config-include" => self . config_include = parse_empty ( k, v) ?,
1078
+ "credential-process" => self . credential_process = parse_empty ( k, v) ?,
1079
+ "direct-minimal-versions" => self . direct_minimal_versions = parse_empty ( k, v) ?,
1080
+ "doctest-in-workspace" => self . doctest_in_workspace = parse_empty ( k, v) ?,
1081
+ "doctest-xcompile" => self . doctest_xcompile = parse_empty ( k, v) ?,
1082
+ "dual-proc-macros" => self . dual_proc_macros = parse_empty ( k, v) ?,
1083
+ "gitoxide" => {
1084
+ self . gitoxide = v. map_or_else (
1085
+ || Ok ( Some ( GitoxideFeatures :: all ( ) ) ) ,
1086
+ |v| parse_gitoxide ( v. split ( ',' ) ) ,
1087
+ ) ?
1088
+ }
1089
+ "host-config" => self . host_config = parse_empty ( k, v) ?,
1090
+ "jobserver-per-rustc" => self . jobserver_per_rustc = parse_empty ( k, v) ?,
1098
1091
"lints" => self . lints = parse_empty ( k, v) ?,
1092
+ "minimal-versions" => self . minimal_versions = parse_empty ( k, v) ?,
1093
+ "msrv-policy" => self . msrv_policy = parse_empty ( k, v) ?,
1094
+ // can also be set in .cargo/config or with and ENV
1095
+ "mtime-on-use" => self . mtime_on_use = parse_empty ( k, v) ?,
1096
+ "no-index-update" => self . no_index_update = parse_empty ( k, v) ?,
1097
+ "panic-abort-tests" => self . panic_abort_tests = parse_empty ( k, v) ?,
1098
+ "profile-rustflags" => self . profile_rustflags = parse_empty ( k, v) ?,
1099
+ "publish-timeout" => self . publish_timeout = parse_empty ( k, v) ?,
1100
+ "registry-auth" => self . registry_auth = parse_empty ( k, v) ?,
1101
+ "rustdoc-map" => self . rustdoc_map = parse_empty ( k, v) ?,
1102
+ "rustdoc-scrape-examples" => self . rustdoc_scrape_examples = parse_empty ( k, v) ?,
1103
+ "separate-nightlies" => self . separate_nightlies = parse_empty ( k, v) ?,
1104
+ "skip-rustdoc-fingerprint" => self . skip_rustdoc_fingerprint = parse_empty ( k, v) ?,
1105
+ "target-applies-to-host" => self . target_applies_to_host = parse_empty ( k, v) ?,
1106
+ "unstable-options" => self . unstable_options = parse_empty ( k, v) ?,
1099
1107
_ => bail ! ( "unknown `-Z` flag specified: {}" , k) ,
1100
1108
}
1101
1109
0 commit comments