1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/// `alpha` pre-release identifier applied by a version bump.
pub const PRERELEASE_ALPHA: &str = "alpha";
/// `beta` pre-release identifier applied by a version bump.
pub const PRERELEASE_BETA: &str = "beta";
/// Literal prefix of a Rust `#[derive(...)]` attribute.
pub const DERIVE_PREFIX: &str = "#[derive(";
/// Regular expression capturing the trait list of a `#[derive(...)]` attribute.
pub const DERIVE_PATTERN: &str = r"#\[derive\s*\(([^)]+)\)\]";
/// Panic message when the derive-pattern regular expression fails to compile.
pub const ERROR_DERIVE_PATTERN_INVALID: &str = "Invalid regex pattern";
/// Error message when installing the clippy component fails.
pub const ERROR_CLIPPY_INSTALL_FAILED: &str = "failed to install cargo-clippy";
/// Error message when `cargo clippy --fix` exits non-zero.
pub const ERROR_CLIPPY_FIX_FAILED: &str = "cargo clippy --fix failed";
/// Error message when `cargo fmt` exits non-zero.
pub const ERROR_FMT_FAILED: &str = "cargo fmt failed";
/// Error message when `[workspace.package].version` is absent from a manifest.
pub const ERROR_WORKSPACE_PACKAGE_VERSION_MISSING: &str =
"workspace.package.version not found";
/// Error message when `[package].version` is absent from a manifest.
pub const ERROR_PACKAGE_VERSION_MISSING: &str = "package.version not found";
/// Error message when a manifest declares neither version location.
pub const ERROR_NO_VERSION_SLOT: &str =
"neither [package] nor [workspace.package] found in Cargo.toml";
/// Error message when a manifest version slot is not a string.
pub const ERROR_VERSION_NOT_STRING: &str = "version field is not a string";
/// Report text emitted when a workspace declares no members.
pub const REPORT_ZERO_WORKSPACE_MEMBERS: &str = "0 workspace members";
/// Report placeholder used when no shared workspace version exists.
pub const REPORT_PER_MEMBER_VERSION: &str = "per-member";
/// `cargo publish` stderr fragment for a version already on the registry.
///
/// This is the live template in cargo: `crate {name}@{version} already
/// exists on {registry}`. Matched on the shared clause rather than the
/// registry name, because the clause survives both a renamed registry and a
/// `sparse+` source replacement, and no other cargo message pairs these
/// words in this order.
pub const STDERR_ALREADY_EXISTS_ON: &str = "already exists on";
/// `cargo publish` stderr fragment for an already uploaded package.
///
/// Retained from older toolchains. Cargo split the publish into an upload
/// and a commit step, and the first reported this when the `.crate` file
/// was already stored; the split no longer emits it.
pub const STDERR_ALREADY_BEEN_UPLOADED: &str = "already been uploaded";
/// `cargo publish` stderr fragment for an already published package.
///
/// Retained from older toolchains, which worded the duplicate case this way
/// before the index check produced the message above.
pub const STDERR_IS_ALREADY_PUBLISHED: &str = "is already published";
/// `cargo publish` stderr fragment for a registry rate-limit refusal.
pub const STDERR_TOO_MANY_REQUESTS: &str = "429 Too Many Requests";
/// `cargo publish` stderr fragment naming the new-crate rate limit.
pub const STDERR_TOO_MANY_NEW_CRATES: &str =
"published too many new crates in a short period of time";
/// `cargo publish` stderr fragment introducing the retry deadline.
pub const STDERR_TRY_AGAIN_AFTER: &str = "Please try again after ";
/// `cargo publish` stderr fragment ending the retry deadline sentence.
pub const STDERR_TRY_AGAIN_AFTER_END: &str = " GMT";