Skip to content

Typo in -Z sparse-registry stabilization warning #11752

@lexeyOK

Description

@lexeyOK

Problem

when using -Z sparse-registry flag on rust 1.68 and 1.69 the stabilisation message has a typo in words protocolto

warning: flag `-Z sparse-registry` has been stabilized in the 1.68 release, and is no longer necessary
  This flag currently still sets the default protocolto `sparse` when accessing crates.io. However, this will be removed in the future.
  The stable equivalent is to set the config value `registries.crates-io.protocol = 'sparse'`
  or environment variable `CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse`

because of missing \n in

const STABILISED_SPARSE_REGISTRY: &str = "This flag currently still sets the default protocol\

Steps

  1. run cargo c -Z cparse-registry on any rust project in rust 1.69 or rust 1.68 nightly

Possible Solution(s)

change line

const STABILISED_SPARSE_REGISTRY: &str = "This flag currently still sets the default protocol\

to

const STABILISED_SPARSE_REGISTRY: &str = "This flag currently still sets the default protocol\n\

or remove \n\ constructions from string while removing indentation
https://doc.rust-lang.org/rust-by-example/std/str.html#literals-and-escapes

Notes

this probably should be an easy issue and good (?) first issue, i don't want to make a pull request for it tho

Version

cargo 1.69.0-nightly (17b3d0de0 2023-02-17)
release: 1.69.0-nightly
commit-hash: 17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6
commit-date: 2023-02-17
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: Ubuntu 22.04 (jammy) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions