@@ -681,7 +681,7 @@ unstable_cli_options!(
681681 no_index_update: bool = ( "Do not update the registry index even if the cache is outdated" ) ,
682682 panic_abort_tests: bool = ( "Enable support to run tests with -Cpanic=abort" ) ,
683683 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 " ) ,
685685 target_applies_to_host: bool = ( "Enable the `target-applies-to-host` key in the .cargo/config.toml file" ) ,
686686 rustdoc_map: bool = ( "Allow passing external documentation mappings to rustdoc" ) ,
687687 separate_nightlies: bool = ( HIDDEN ) ,
@@ -749,6 +749,11 @@ const STABILIZED_TIMINGS: &str = "The -Ztimings option has been stabilized as --
749749
750750const STABILISED_MULTITARGET : & str = "Multiple `--target` options are now always available." ;
751751
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+
752757fn deserialize_build_std < ' de , D > ( deserializer : D ) -> Result < Option < Vec < String > > , D :: Error >
753758where
754759 D : serde:: Deserializer < ' de > ,
@@ -955,7 +960,10 @@ impl CliUnstable {
955960 "multitarget" => stabilized_warn ( k, "1.64" , STABILISED_MULTITARGET ) ,
956961 "rustdoc-map" => self . rustdoc_map = parse_empty ( k, v) ?,
957962 "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+ }
959967 "namespaced-features" => stabilized_warn ( k, "1.60" , STABILISED_NAMESPACED_FEATURES ) ,
960968 "weak-dep-features" => stabilized_warn ( k, "1.60" , STABILIZED_WEAK_DEP_FEATURES ) ,
961969 "credential-process" => self . credential_process = parse_empty ( k, v) ?,
0 commit comments