Skip to content

Commit 9757e90

Browse files
committedMar 13, 2020
Auto merge of #69958 - Centril:rollup-ecgx11p, r=Centril
Rollup of 8 pull requests Successful merges: - #68746 (Make macro metavars respect (non-)hygiene) - #69189 (Erase regions in writeback) - #69402 (Extend search) - #69403 (Implement `Copy` for `IoSlice`) - #69460 (Move some `build-pass` tests to `check-pass`) - #69802 (fix more clippy findings) - #69809 (remove lifetimes that can be elided (clippy::needless_lifetimes)) - #69949 (triagebot.toml: add ping aliases) Failed merges: - #69589 (ast: `Mac`/`Macro` -> `MacCall`) r? @ghost
2 parents 54b7d21 + e1f3da1 commit 9757e90

File tree

132 files changed

+770
-552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+770
-552
lines changed
 

‎src/liballoc/collections/linked_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ impl<'a, T> CursorMut<'a, T> {
14271427
/// `CursorMut`, which means it cannot outlive the `CursorMut` and that the
14281428
/// `CursorMut` is frozen for the lifetime of the `Cursor`.
14291429
#[unstable(feature = "linked_list_cursors", issue = "58533")]
1430-
pub fn as_cursor<'cm>(&'cm self) -> Cursor<'cm, T> {
1430+
pub fn as_cursor(&self) -> Cursor<'_, T> {
14311431
Cursor { list: self.list, current: self.current, index: self.index }
14321432
}
14331433
}

‎src/libcore/str/pattern.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,7 @@ unsafe impl<'a> ReverseSearcher<'a> for CharSearcher<'a> {
365365
let haystack = self.haystack.as_bytes();
366366
loop {
367367
// get the haystack up to but not including the last character searched
368-
let bytes = if let Some(slice) = haystack.get(self.finger..self.finger_back) {
369-
slice
370-
} else {
371-
return None;
372-
};
368+
let bytes = haystack.get(self.finger..self.finger_back)?;
373369
// the last byte of the utf8 encoded needle
374370
// SAFETY: we have an invariant that `utf8_size < 5`
375371
let last_byte = unsafe { *self.utf8_encoded.get_unchecked(self.utf8_size - 1) };
@@ -575,11 +571,12 @@ macro_rules! pattern_methods {
575571

576572
#[inline]
577573
fn is_suffix_of(self, haystack: &'a str) -> bool
578-
where $t: ReverseSearcher<'a>
574+
where
575+
$t: ReverseSearcher<'a>,
579576
{
580577
($pmap)(self).is_suffix_of(haystack)
581578
}
582-
}
579+
};
583580
}
584581

585582
macro_rules! searcher_methods {
@@ -614,7 +611,7 @@ macro_rules! searcher_methods {
614611
fn next_reject_back(&mut self) -> Option<(usize, usize)> {
615612
self.0.next_reject_back()
616613
}
617-
}
614+
};
618615
}
619616

620617
/////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)
Please sign in to comment.