@@ -681,7 +681,7 @@ unstable_cli_options!(
681
681
no_index_update: bool = ( "Do not update the registry index even if the cache is outdated" ) ,
682
682
panic_abort_tests: bool = ( "Enable support to run tests with -Cpanic=abort" ) ,
683
683
host_config: bool = ( "Enable the [host] section in the .cargo/config.toml file" ) ,
684
- sparse_registry: bool = ( "Support plain-HTTP-based crate registries " ) ,
684
+ sparse_registry: bool = ( "Use the sparse protocol when accessing crates.io " ) ,
685
685
target_applies_to_host: bool = ( "Enable the `target-applies-to-host` key in the .cargo/config.toml file" ) ,
686
686
rustdoc_map: bool = ( "Allow passing external documentation mappings to rustdoc" ) ,
687
687
separate_nightlies: bool = ( HIDDEN ) ,
@@ -749,6 +749,11 @@ const STABILIZED_TIMINGS: &str = "The -Ztimings option has been stabilized as --
749
749
750
750
const STABILISED_MULTITARGET : & str = "Multiple `--target` options are now always available." ;
751
751
752
+ const STABILISED_SPARSE_REGISTRY : & str = "This flag currently still sets the default protocol\
753
+ to `sparse` when accessing crates.io. However, this will be removed in the future. \n \
754
+ The stable equivalent is to set the config value `registries.crates-io.protocol = 'sparse'`\n \
755
+ or environment variable `CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse`";
756
+
752
757
fn deserialize_build_std < ' de , D > ( deserializer : D ) -> Result < Option < Vec < String > > , D :: Error >
753
758
where
754
759
D : serde:: Deserializer < ' de > ,
@@ -955,7 +960,10 @@ impl CliUnstable {
955
960
"multitarget" => stabilized_warn ( k, "1.64" , STABILISED_MULTITARGET ) ,
956
961
"rustdoc-map" => self . rustdoc_map = parse_empty ( k, v) ?,
957
962
"terminal-width" => self . terminal_width = Some ( parse_usize_opt ( v) ?) ,
958
- "sparse-registry" => self . sparse_registry = parse_empty ( k, v) ?,
963
+ "sparse-registry" => {
964
+ stabilized_warn ( k, "1.66" , STABILISED_SPARSE_REGISTRY ) ;
965
+ self . sparse_registry = parse_empty ( k, v) ?;
966
+ }
959
967
"namespaced-features" => stabilized_warn ( k, "1.60" , STABILISED_NAMESPACED_FEATURES ) ,
960
968
"weak-dep-features" => stabilized_warn ( k, "1.60" , STABILIZED_WEAK_DEP_FEATURES ) ,
961
969
"credential-process" => self . credential_process = parse_empty ( k, v) ?,
0 commit comments