summaryrefslogtreecommitdiffstats
path: root/vendor/cargo-platform
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/cargo-platform
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/cargo-platform')
-rw-r--r--vendor/cargo-platform/.cargo-checksum.json2
-rw-r--r--vendor/cargo-platform/Cargo.lock32
-rw-r--r--vendor/cargo-platform/Cargo.toml9
-rw-r--r--vendor/cargo-platform/examples/matches.rs4
-rw-r--r--vendor/cargo-platform/src/error.rs4
-rw-r--r--vendor/cargo-platform/src/lib.rs3
6 files changed, 26 insertions, 28 deletions
diff --git a/vendor/cargo-platform/.cargo-checksum.json b/vendor/cargo-platform/.cargo-checksum.json
index 2b06d7377..7c990c2ce 100644
--- a/vendor/cargo-platform/.cargo-checksum.json
+++ b/vendor/cargo-platform/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"9832d7e589baf011943280a694337d220581b600e089793f9935c8e3c34c36c2","Cargo.toml":"7e05573b44b23a026995d557ea85957fa19f437328a116be1ada5400274fe42e","LICENSE-APACHE":"8ada45cd9f843acf64e4722ae262c622a2b3b3007c7310ef36ac1061a30f6adb","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","examples/matches.rs":"5485312cf426b1de01ef3d37cbbc7358d264e62509fa101614ecb44835b98229","src/cfg.rs":"2a5943f53d364c12edc0279db9f4c623add6d65b1a7b70843d8786e5d93d90ba","src/error.rs":"f9e5b3833ebd98ba5f959da34644a1a02687b6d896f94462ff43c05594bad467","src/lib.rs":"1c1ce4eb0143744427a01600541d3a852506922c4d3c558be29d8ce821516711","tests/test_cfg.rs":"d97202ea588e86b4c5603f199afbd7715852ddd8ddad772217a0826c9afd7304"},"package":"cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27"} \ No newline at end of file
+{"files":{"Cargo.lock":"6fab106be61a2865b9bd7566249a1f6eec9a3dd3e2499faca41254f66fab0269","Cargo.toml":"a5a5d48109aff93e0e405de34cd585684cee43b4535205588832f8087d517115","LICENSE-APACHE":"8ada45cd9f843acf64e4722ae262c622a2b3b3007c7310ef36ac1061a30f6adb","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","examples/matches.rs":"029ccbbf5304961a57c057d2e2eb10413ae913a026b027fa141362be88776cc7","src/cfg.rs":"2a5943f53d364c12edc0279db9f4c623add6d65b1a7b70843d8786e5d93d90ba","src/error.rs":"1229940c1cd6dde6f56363f787c27007ba62135371bd3c2a3b671172cf0b6d6b","src/lib.rs":"38abca1bf2ba76e3fa3ab474382cfa2bf316cb3878f92e1936094ba45633d04f","tests/test_cfg.rs":"d97202ea588e86b4c5603f199afbd7715852ddd8ddad772217a0826c9afd7304"},"package":"e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff"} \ No newline at end of file
diff --git a/vendor/cargo-platform/Cargo.lock b/vendor/cargo-platform/Cargo.lock
index 059f73029..598a0f79a 100644
--- a/vendor/cargo-platform/Cargo.lock
+++ b/vendor/cargo-platform/Cargo.lock
@@ -4,43 +4,43 @@ version = 3
[[package]]
name = "cargo-platform"
-version = "0.1.2"
+version = "0.1.5"
dependencies = [
"serde",
]
[[package]]
name = "proc-macro2"
-version = "1.0.28"
+version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612"
+checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
dependencies = [
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.9"
+version = "1.0.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
+checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965"
dependencies = [
"proc-macro2",
]
[[package]]
name = "serde"
-version = "1.0.127"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8"
+checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.127"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc"
+checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [
"proc-macro2",
"quote",
@@ -49,17 +49,17 @@ dependencies = [
[[package]]
name = "syn"
-version = "1.0.74"
+version = "2.0.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c"
+checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
dependencies = [
"proc-macro2",
"quote",
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
-name = "unicode-xid"
-version = "0.2.2"
+name = "unicode-ident"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
+checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
diff --git a/vendor/cargo-platform/Cargo.toml b/vendor/cargo-platform/Cargo.toml
index ebf12c855..1d8d46ad1 100644
--- a/vendor/cargo-platform/Cargo.toml
+++ b/vendor/cargo-platform/Cargo.toml
@@ -10,15 +10,14 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2018"
+edition = "2021"
name = "cargo-platform"
-version = "0.1.2"
-authors = ["The Cargo Project Developers"]
+version = "0.1.5"
description = "Cargo's representation of a target platform."
homepage = "https://github.com/rust-lang/cargo"
documentation = "https://docs.rs/cargo-platform"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cargo"
+
[dependencies.serde]
-version = "1.0.82"
-features = ["derive"]
+version = "1.0.188"
diff --git a/vendor/cargo-platform/examples/matches.rs b/vendor/cargo-platform/examples/matches.rs
index 9ad5d10dd..1b438fb11 100644
--- a/vendor/cargo-platform/examples/matches.rs
+++ b/vendor/cargo-platform/examples/matches.rs
@@ -35,8 +35,8 @@ fn get_target() -> String {
.expect("rustc failed to run");
let stdout = String::from_utf8(output.stdout).unwrap();
for line in stdout.lines() {
- if line.starts_with("host: ") {
- return String::from(&line[6..]);
+ if let Some(line) = line.strip_prefix("host: ") {
+ return String::from(line);
}
}
panic!("Failed to find host: {}", stdout);
diff --git a/vendor/cargo-platform/src/error.rs b/vendor/cargo-platform/src/error.rs
index bf4b35f27..2d5b315f9 100644
--- a/vendor/cargo-platform/src/error.rs
+++ b/vendor/cargo-platform/src/error.rs
@@ -21,7 +21,7 @@ pub enum ParseErrorKind {
}
impl fmt::Display for ParseError {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"failed to parse `{}` as a cfg expression: {}",
@@ -31,7 +31,7 @@ impl fmt::Display for ParseError {
}
impl fmt::Display for ParseErrorKind {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
use ParseErrorKind::*;
match self {
UnterminatedString => write!(f, "unterminated string in cfg"),
diff --git a/vendor/cargo-platform/src/lib.rs b/vendor/cargo-platform/src/lib.rs
index 0a3dcf1af..7911e484e 100644
--- a/vendor/cargo-platform/src/lib.rs
+++ b/vendor/cargo-platform/src/lib.rs
@@ -126,8 +126,7 @@ impl FromStr for Platform {
type Err = ParseError;
fn from_str(s: &str) -> Result<Platform, ParseError> {
- if s.starts_with("cfg(") && s.ends_with(')') {
- let s = &s[4..s.len() - 1];
+ if let Some(s) = s.strip_prefix("cfg(").and_then(|s| s.strip_suffix(')')) {
s.parse().map(Platform::Cfg)
} else {
Platform::validate_named_platform(s)?;