diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/glob | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/glob')
-rw-r--r-- | vendor/glob/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/glob/Cargo.toml | 24 | ||||
-rw-r--r-- | vendor/glob/README.md | 6 | ||||
-rw-r--r-- | vendor/glob/src/lib.rs | 39 | ||||
-rw-r--r-- | vendor/glob/triagebot.toml | 1 |
5 files changed, 51 insertions, 21 deletions
diff --git a/vendor/glob/.cargo-checksum.json b/vendor/glob/.cargo-checksum.json index 69a6e094a..e31f7a613 100644 --- a/vendor/glob/.cargo-checksum.json +++ b/vendor/glob/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"a1fd2890b64fd6c1b6a7e5b18265e9534ee47191c910f69e1f100a9c8af1c3b6","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"4b22450aac7688553179f479ad3577006d2d8a0e3e74ac2b9b2030a3eb72147b","src/lib.rs":"731115c0fe1c0aa265944833d88c203fea076e8a996c67d367168b02ad52d90a","tests/glob-std.rs":"b0a0aa11d7b8cc2cc0216fb117a543d6e584eec8b51173994dfd19761ab00a62"},"package":"9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"}
\ No newline at end of file +{"files":{"Cargo.toml":"6791dcdd292ecaeeec9535afae7189026dca9d8486211acd27208673edfa995a","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"3482ed957e7e22efdf5f368d92c497b932c665bce3ad17db8ec31c1007164539","src/lib.rs":"b2f3c3f48eb07f1767a7e5bb02847d10e02655f1dbf57281eb63fd001427e28b","tests/glob-std.rs":"b0a0aa11d7b8cc2cc0216fb117a543d6e584eec8b51173994dfd19761ab00a62","triagebot.toml":"a135e10c777cd13459559bdf74fb704c1379af7c9b0f70bc49fa6f5a837daa81"},"package":"d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"}
\ No newline at end of file diff --git a/vendor/glob/Cargo.toml b/vendor/glob/Cargo.toml index 863896fe2..53977177e 100644 --- a/vendor/glob/Cargo.toml +++ b/vendor/glob/Cargo.toml @@ -3,22 +3,28 @@ # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies +# to registry (e.g., crates.io) dependencies. # -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. [package] name = "glob" -version = "0.3.0" +version = "0.3.1" authors = ["The Rust Project Developers"] -description = "Support for matching file paths against Unix shell style patterns.\n" +description = """ +Support for matching file paths against Unix shell style patterns. +""" homepage = "https://github.com/rust-lang/glob" -documentation = "https://docs.rs/glob/0.3.0" +documentation = "https://docs.rs/glob/0.3.1" +readme = "README.md" categories = ["filesystem"] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/glob" + +[dev-dependencies.doc-comment] +version = "0.3" + [dev-dependencies.tempdir] version = "0.3" diff --git a/vendor/glob/README.md b/vendor/glob/README.md index e61a9767f..b68a40e40 100644 --- a/vendor/glob/README.md +++ b/vendor/glob/README.md @@ -3,9 +3,9 @@ glob Support for matching file paths against Unix shell style patterns. -[![Build Status](https://travis-ci.org/rust-lang-nursery/glob.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/glob) +[![Continuous integration](https://github.com/rust-lang/glob/actions/workflows/rust.yml/badge.svg)](https://github.com/rust-lang/glob/actions/workflows/rust.yml) -[Documentation](https://doc.rust-lang.org/glob) +[Documentation](https://docs.rs/glob) ## Usage @@ -13,7 +13,7 @@ To use `glob`, add this to your `Cargo.toml`: ```toml [dependencies] -glob = "0.3.0" +glob = "0.3.1" ``` And add this to your crate root: diff --git a/vendor/glob/src/lib.rs b/vendor/glob/src/lib.rs index b28db9baa..744cabf38 100644 --- a/vendor/glob/src/lib.rs +++ b/vendor/glob/src/lib.rs @@ -58,10 +58,16 @@ #![doc( html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://docs.rs/glob/0.3.0" + html_root_url = "https://docs.rs/glob/0.3.1" )] #![deny(missing_docs)] -#![cfg_attr(all(test, windows), feature(std_misc))] + +#[cfg(test)] +#[macro_use] +extern crate doc_comment; + +#[cfg(test)] +doctest!("../README.md"); use std::cmp; use std::error::Error; @@ -85,6 +91,7 @@ use PatternToken::{AnyChar, AnyRecursiveSequence, AnySequence, AnyWithin, Char}; /// `GlobError` is returned to express this. /// /// See the `glob` function for more details. +#[derive(Debug)] pub struct Paths { dir_patterns: Vec<Pattern>, require_dir: bool, @@ -170,7 +177,6 @@ pub fn glob(pattern: &str) -> Result<Paths, PatternError> { pub fn glob_with(pattern: &str, options: MatchOptions) -> Result<Paths, PatternError> { #[cfg(windows)] fn check_windows_verbatim(p: &Path) -> bool { - use std::path::Prefix; match p.components().next() { Some(Component::Prefix(ref p)) => p.kind().is_verbatim(), _ => false, @@ -287,10 +293,12 @@ impl GlobError { } impl Error for GlobError { + #[allow(deprecated)] fn description(&self) -> &str { self.error.description() } + #[allow(unknown_lints, bare_trait_objects)] fn cause(&self) -> Option<&Error> { Some(&self.error) } @@ -588,11 +596,12 @@ impl Pattern { }); }; - let tokens_len = tokens.len(); - if is_valid { // collapse consecutive AnyRecursiveSequence to a // single one + + let tokens_len = tokens.len(); + if !(tokens_len > 1 && tokens[tokens_len - 1] == AnyRecursiveSequence) { is_recursive = true; tokens.push(AnyRecursiveSequence); @@ -961,7 +970,7 @@ fn chars_eq(a: char, b: char, case_sensitive: bool) -> bool { /// Configuration options to modify the behaviour of `Pattern::matches_with(..)`. #[allow(missing_copy_implementations)] -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] pub struct MatchOptions { /// Whether or not patterns should be matched in a case-sensitive manner. /// This currently only considers upper/lower case relationships between @@ -996,6 +1005,11 @@ impl MatchOptions { /// require_literal_leading_dot: false /// } /// ``` + /// + /// # Note + /// The behavior of this method doesn't match `default()`'s. This returns + /// `case_sensitive` as `true` while `default()` does it as `false`. + // FIXME: Consider unity the behavior with `default()` in a next major release. pub fn new() -> Self { Self { case_sensitive: true, @@ -1078,12 +1092,21 @@ mod test { #[cfg(windows)] fn win() { use std::env::current_dir; - use std::ffi::AsOsStr; + use std::path::Component; // check windows absolute paths with host/device components let root_with_device = current_dir() .ok() - .and_then(|p| p.prefix().map(|p| p.join("*"))) + .and_then(|p| { + match p.components().next().unwrap() { + Component::Prefix(prefix_component) => { + let path = Path::new(prefix_component.as_os_str()); + path.join("*"); + Some(path.to_path_buf()) + } + _ => panic!("no prefix in this path"), + } + }) .unwrap(); // FIXME (#9639): This needs to handle non-utf8 paths assert!(glob(root_with_device.as_os_str().to_str().unwrap()) diff --git a/vendor/glob/triagebot.toml b/vendor/glob/triagebot.toml new file mode 100644 index 000000000..fa0824ac5 --- /dev/null +++ b/vendor/glob/triagebot.toml @@ -0,0 +1 @@ +[assign] |