summaryrefslogtreecommitdiffstats
path: root/vendor/semver
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /vendor/semver
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/semver')
-rw-r--r--vendor/semver/.cargo-checksum.json2
-rw-r--r--vendor/semver/Cargo.toml4
-rw-r--r--vendor/semver/LICENSE-APACHE25
-rw-r--r--vendor/semver/src/error.rs2
-rw-r--r--vendor/semver/src/lib.rs2
-rw-r--r--vendor/semver/src/parse.rs4
-rw-r--r--vendor/semver/tests/test_autotrait.rs2
-rw-r--r--vendor/semver/tests/test_version.rs5
8 files changed, 13 insertions, 33 deletions
diff --git a/vendor/semver/.cargo-checksum.json b/vendor/semver/.cargo-checksum.json
index 3e0993c1a..51899e7aa 100644
--- a/vendor/semver/.cargo-checksum.json
+++ b/vendor/semver/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"84eaac27f969839e684c9cdf124748de0a8f0b0876a1eacc31cfaa105f35540f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"de1a03443ab8f147676199856a975ec00f3f7334fc5d5d5e056ec8f3fcb61dd5","benches/parse.rs":"6531f66f80ce2fc83878f9bf84f94c42e96f1e709466f2b88be8d95a3cec1511","build.rs":"9a3d42e37b665745044b5d91c6e02dd458152e336a7013654972f4a1a0b562d9","src/backport.rs":"66db55d15d0e2808bffe4cde7cd1d99bda999b26cbe40bb6b5e43b94f9b631d2","src/display.rs":"9ba42f7a6579aa9c7dd72f2380036f5c9664592f3eacd09ea25cef291a3e64e5","src/error.rs":"3bb489f4a29f38d93370e64ae8d6e4e9b451a055cd7d392b6aeacab7eb3e1953","src/eval.rs":"b7e7ec976051b9f87ddf5cfdbaad64654d98d86ae0763f7d88b14eeaeac6013c","src/identifier.rs":"459725383cbd0e2d769aa947decd1f031bdc8732339783ad24eb2b44f0f5d040","src/impls.rs":"79b5a2ac6ca3d4cb46adfb1494756079f53bef780dd81c3a8d3adf86f91395c8","src/lib.rs":"cc912c719047aa679429069a26679f681741b91ff66d847f60ddc519262d588c","src/parse.rs":"ffbb84081f0f66ec47b752a1e32f1bea5f206ca84f464b99d0497451305a92f8","src/serde.rs":"e2a9b9dc3cd2cccc250eaffad049de418ef791bf8c4a34111a48f068353e0a37","tests/node/mod.rs":"2710d9b8daace2038b66db0f8f4cc522dee938e7cbc42d7739c31995343c32f4","tests/test_autotrait.rs":"070500c32ceee14a8a0110c04a01f98278b24614a0aec8c382dcea3da0343f58","tests/test_identifier.rs":"6c3da46c73df210527b60f1069131b15e2c65eb7b5d11793940d00cf66812f4d","tests/test_version.rs":"09e37c3df162205acf3683d1c760a6001e34e1c709fd4a1a265d82450e340003","tests/test_version_req.rs":"b6eea0258cc3b6d567a9f6c42693a97316345083495236c47e85374fd45f7cf0","tests/util/mod.rs":"db61c2cd86af864d8be4f2a3d5f25c86d7712201cc6ab47b715facf5f7f275b7"},"package":"58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"} \ No newline at end of file
+{"files":{"Cargo.toml":"dfbbc0d6c0d8edad66364be43e171797ceade541b13543fbafec7369fae849da","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"de1a03443ab8f147676199856a975ec00f3f7334fc5d5d5e056ec8f3fcb61dd5","benches/parse.rs":"6531f66f80ce2fc83878f9bf84f94c42e96f1e709466f2b88be8d95a3cec1511","build.rs":"9a3d42e37b665745044b5d91c6e02dd458152e336a7013654972f4a1a0b562d9","src/backport.rs":"66db55d15d0e2808bffe4cde7cd1d99bda999b26cbe40bb6b5e43b94f9b631d2","src/display.rs":"9ba42f7a6579aa9c7dd72f2380036f5c9664592f3eacd09ea25cef291a3e64e5","src/error.rs":"895e11a9e454cab207415186b15a29dac1f0a5bf9b8dba7bd45da5bb5a6ace31","src/eval.rs":"b7e7ec976051b9f87ddf5cfdbaad64654d98d86ae0763f7d88b14eeaeac6013c","src/identifier.rs":"459725383cbd0e2d769aa947decd1f031bdc8732339783ad24eb2b44f0f5d040","src/impls.rs":"79b5a2ac6ca3d4cb46adfb1494756079f53bef780dd81c3a8d3adf86f91395c8","src/lib.rs":"6446e36a6aef141237968e3e4e6ba6fc9d6bae115256883188eda3e8923b91fe","src/parse.rs":"920f8327a1ba0c16a28f518f2d50998faf1d6a8db379b92cb72976f176650f09","src/serde.rs":"e2a9b9dc3cd2cccc250eaffad049de418ef791bf8c4a34111a48f068353e0a37","tests/node/mod.rs":"2710d9b8daace2038b66db0f8f4cc522dee938e7cbc42d7739c31995343c32f4","tests/test_autotrait.rs":"2631b78c9c63f1829c814fa88fcab0c5d77eb4e2d9c0c418d50c33e12a511e90","tests/test_identifier.rs":"6c3da46c73df210527b60f1069131b15e2c65eb7b5d11793940d00cf66812f4d","tests/test_version.rs":"4f45827cdab1d965f73b93662b84007d056135c97d5ffaa9973c1d9f58666785","tests/test_version_req.rs":"b6eea0258cc3b6d567a9f6c42693a97316345083495236c47e85374fd45f7cf0","tests/util/mod.rs":"db61c2cd86af864d8be4f2a3d5f25c86d7712201cc6ab47b715facf5f7f275b7"},"package":"bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed"} \ No newline at end of file
diff --git a/vendor/semver/Cargo.toml b/vendor/semver/Cargo.toml
index e0bfea20f..e7fcfb764 100644
--- a/vendor/semver/Cargo.toml
+++ b/vendor/semver/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.31"
name = "semver"
-version = "1.0.16"
+version = "1.0.17"
authors = ["David Tolnay <dtolnay@gmail.com>"]
description = "Parser and evaluator for Cargo's flavor of Semantic Versioning"
documentation = "https://docs.rs/semver"
@@ -27,11 +27,11 @@ license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/semver"
[package.metadata.docs.rs]
-targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = [
"--cfg",
"doc_cfg",
]
+targets = ["x86_64-unknown-linux-gnu"]
[lib]
doc-scrape-examples = false
diff --git a/vendor/semver/LICENSE-APACHE b/vendor/semver/LICENSE-APACHE
index 16fe87b06..1b5ec8b78 100644
--- a/vendor/semver/LICENSE-APACHE
+++ b/vendor/semver/LICENSE-APACHE
@@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/vendor/semver/src/error.rs b/vendor/semver/src/error.rs
index a514e3f11..93b05ee8d 100644
--- a/vendor/semver/src/error.rs
+++ b/vendor/semver/src/error.rs
@@ -2,6 +2,7 @@ use crate::parse::Error;
use core::fmt::{self, Debug, Display};
pub(crate) enum ErrorKind {
+ Empty,
UnexpectedEnd(Position),
UnexpectedChar(Position, char),
UnexpectedCharAfter(Position, char),
@@ -31,6 +32,7 @@ impl std::error::Error for Error {}
impl Display for Error {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
match &self.kind {
+ ErrorKind::Empty => formatter.write_str("empty string, expected a semver version"),
ErrorKind::UnexpectedEnd(pos) => {
write!(formatter, "unexpected end of input while parsing {}", pos)
}
diff --git a/vendor/semver/src/lib.rs b/vendor/semver/src/lib.rs
index 32ed96d1c..d6a8fe3fd 100644
--- a/vendor/semver/src/lib.rs
+++ b/vendor/semver/src/lib.rs
@@ -60,7 +60,7 @@
//!
//! [Specifying Dependencies]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
-#![doc(html_root_url = "https://docs.rs/semver/1.0.16")]
+#![doc(html_root_url = "https://docs.rs/semver/1.0.17")]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![cfg_attr(all(not(feature = "std"), not(no_alloc_crate)), no_std)]
#![cfg_attr(not(no_unsafe_op_in_unsafe_fn_lint), deny(unsafe_op_in_unsafe_fn))]
diff --git a/vendor/semver/src/parse.rs b/vendor/semver/src/parse.rs
index 6a8f6ffba..e92d87abc 100644
--- a/vendor/semver/src/parse.rs
+++ b/vendor/semver/src/parse.rs
@@ -26,6 +26,10 @@ impl FromStr for Version {
type Err = Error;
fn from_str(text: &str) -> Result<Self, Self::Err> {
+ if text.is_empty() {
+ return Err(Error::new(ErrorKind::Empty));
+ }
+
let mut pos = Position::Major;
let (major, text) = numeric_identifier(text, pos)?;
let text = dot(text, pos)?;
diff --git a/vendor/semver/tests/test_autotrait.rs b/vendor/semver/tests/test_autotrait.rs
index af8534bd7..5d1668912 100644
--- a/vendor/semver/tests/test_autotrait.rs
+++ b/vendor/semver/tests/test_autotrait.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::extra_unused_type_parameters)]
+
fn assert_send_sync<T: Send + Sync>() {}
#[test]
diff --git a/vendor/semver/tests/test_version.rs b/vendor/semver/tests/test_version.rs
index 93a528c19..de3628fac 100644
--- a/vendor/semver/tests/test_version.rs
+++ b/vendor/semver/tests/test_version.rs
@@ -12,10 +12,7 @@ use semver::{BuildMetadata, Prerelease, Version};
#[test]
fn test_parse() {
let err = version_err("");
- assert_to_string(
- err,
- "unexpected end of input while parsing major version number",
- );
+ assert_to_string(err, "empty string, expected a semver version");
let err = version_err(" ");
assert_to_string(