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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
use std::path::PathBuf;
error_chain! {
foreign_links {
Io(::std::io::Error) #[doc = "An error from the std::io module"];
Git(::git2::Error)#[doc = "An error from the git2 crate"];
CargoMetadata(::cargo_metadata::Error)#[doc = "An error from the cargo_metadata crate"];
Semver(::semver::Error)#[doc = "An error from the semver crate"];
CratesIndex(::crates_index::Error)#[doc = "An error from the crates-index crate"];
}
errors {
ReadHomeDirFailure {
description("Failed to read home directory")
}
InvalidSummaryJson {
description("Invalid JSON in registry index")
}
EmptyCrateName{
description("Found empty crate name")
}
NoCrate(name: String) {
description("The crate could not be found in registry index.")
display("The crate `{}` could not be found in registry index.", name)
}
NoVersionsAvailable {
description("No available versions exist. Either all were yanked \
or only prerelease versions exist. Trying with the \
--allow-prerelease flag might solve the issue."
)
}
ParseCargoToml {
description("Unable to parse external Cargo.toml")
}
MissingManifest {
description("Unable to find Cargo.toml")
}
InvalidManifest {
description("Cargo.toml missing expected `package` or `project` fields")
}
UnexpectedRootManifest {
description("Found virtual manifest, but this command requires running against an \
actual package in this workspace.")
}
NonExistentTable(table: String) {
description("non existent table")
display("The table `{}` could not be found.", table)
}
NonExistentDependency(name: String, table: String) {
description("non existent dependency")
display("The dependency `{}` could not be found in `{}`.", name, table)
}
InvalidCargoConfig {
description("Invalid cargo config")
}
NoSuchSourceFound(name: String) {
description("Unable to find the source specified by 'replace-with'")
display("The source '{}' could not be found", name)
}
NoSuchRegistryFound(name: String) {
display("The registry '{}' could not be found", name)
}
ParseVersion(version: String, dep: String) {
description("Failed to parse a version for a dependency")
display("The version `{}` for the dependency `{}` couldn't be parsed", version, dep)
}
MissingRegistraryCheckout(path: PathBuf) {
description("Missing registry checkout in the cargo registry")
display("Looks like ({}) is empty", path.display())
}
NonUnicodeGitPath {
description("Path to cargos registry contains non unicode characters")
}
UnsupportedPrereleaseVersionScheme {
display("This version scheme is not supported. Use format like `pre`, `dev` or `alpha.1` for prerelease symbol")
}
InvalidReleaseLevel(actual: &'static str, version: semver::Version) {
display("Cannot increment the {} field for {}", actual, version)
}
UnsupportedVersionReq(req: String) {
display("Support for modifying {} is currently unsupported", req)
}
}
}