summaryrefslogtreecommitdiffstats
path: root/vendor/pest/src/iterators
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /vendor/pest/src/iterators
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/pest/src/iterators')
-rw-r--r--vendor/pest/src/iterators/flat_pairs.rs4
-rw-r--r--vendor/pest/src/iterators/pair.rs6
-rw-r--r--vendor/pest/src/iterators/pairs.rs6
-rw-r--r--vendor/pest/src/iterators/tokens.rs8
4 files changed, 12 insertions, 12 deletions
diff --git a/vendor/pest/src/iterators/flat_pairs.rs b/vendor/pest/src/iterators/flat_pairs.rs
index 85171a3b6..6d310272e 100644
--- a/vendor/pest/src/iterators/flat_pairs.rs
+++ b/vendor/pest/src/iterators/flat_pairs.rs
@@ -38,7 +38,7 @@ pub unsafe fn new<R: RuleType>(
input: &str,
start: usize,
end: usize,
-) -> FlatPairs<R> {
+) -> FlatPairs<'_, R> {
FlatPairs {
queue,
input,
@@ -130,7 +130,7 @@ impl<'i, R: RuleType> DoubleEndedIterator for FlatPairs<'i, R> {
}
impl<'i, R: RuleType> fmt::Debug for FlatPairs<'i, R> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("FlatPairs")
.field("pairs", &self.clone().collect::<Vec<_>>())
.finish()
diff --git a/vendor/pest/src/iterators/pair.rs b/vendor/pest/src/iterators/pair.rs
index 0a8f735a4..62c95e037 100644
--- a/vendor/pest/src/iterators/pair.rs
+++ b/vendor/pest/src/iterators/pair.rs
@@ -52,7 +52,7 @@ pub unsafe fn new<R: RuleType>(
queue: Rc<Vec<QueueableToken<R>>>,
input: &str,
start: usize,
-) -> Pair<R> {
+) -> Pair<'_, R> {
Pair {
queue,
input,
@@ -268,7 +268,7 @@ impl<'i, R: RuleType> Pairs<'i, R> {
}
impl<'i, R: RuleType> fmt::Debug for Pair<'i, R> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Pair")
.field("rule", &self.as_rule())
.field("span", &self.as_span())
@@ -278,7 +278,7 @@ impl<'i, R: RuleType> fmt::Debug for Pair<'i, R> {
}
impl<'i, R: RuleType> fmt::Display for Pair<'i, R> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let rule = self.as_rule();
let start = self.pos(self.start);
let end = self.pos(self.pair());
diff --git a/vendor/pest/src/iterators/pairs.rs b/vendor/pest/src/iterators/pairs.rs
index 654b7dade..e478cebf2 100644
--- a/vendor/pest/src/iterators/pairs.rs
+++ b/vendor/pest/src/iterators/pairs.rs
@@ -43,7 +43,7 @@ pub fn new<R: RuleType>(
input: &str,
start: usize,
end: usize,
-) -> Pairs<R> {
+) -> Pairs<'_, R> {
Pairs {
queue,
input,
@@ -246,13 +246,13 @@ impl<'i, R: RuleType> DoubleEndedIterator for Pairs<'i, R> {
}
impl<'i, R: RuleType> fmt::Debug for Pairs<'i, R> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_list().entries(self.clone()).finish()
}
}
impl<'i, R: RuleType> fmt::Display for Pairs<'i, R> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"[{}]",
diff --git a/vendor/pest/src/iterators/tokens.rs b/vendor/pest/src/iterators/tokens.rs
index f21cf072c..0d462711e 100644
--- a/vendor/pest/src/iterators/tokens.rs
+++ b/vendor/pest/src/iterators/tokens.rs
@@ -39,7 +39,7 @@ pub fn new<R: RuleType>(
input: &str,
start: usize,
end: usize,
-) -> Tokens<R> {
+) -> Tokens<'_, R> {
if cfg!(debug_assertions) {
for tok in queue.iter() {
match *tok {
@@ -123,7 +123,7 @@ impl<'i, R: RuleType> DoubleEndedIterator for Tokens<'i, R> {
}
impl<'i, R: RuleType> fmt::Debug for Tokens<'i, R> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_list().entries(self.clone()).finish()
}
}
@@ -138,9 +138,9 @@ mod tests {
#[test]
fn double_ended_iter_for_tokens() {
let pairs = AbcParser::parse(Rule::a, "abcde").unwrap();
- let mut tokens = pairs.clone().tokens().collect::<Vec<Token<Rule>>>();
+ let mut tokens = pairs.clone().tokens().collect::<Vec<Token<'_, Rule>>>();
tokens.reverse();
- let reverse_tokens = pairs.tokens().rev().collect::<Vec<Token<Rule>>>();
+ let reverse_tokens = pairs.tokens().rev().collect::<Vec<Token<'_, Rule>>>();
assert_eq!(tokens, reverse_tokens);
}
}