Skip to content

Commit 5619150

Browse files
MajorBreakfastcramertj
authored andcommitted
Prevent lifetime name collisions
1 parent b3cb448 commit 5619150

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

futures-util/src/macros/pin.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
#[macro_export]
3232
macro_rules! unsafe_pinned {
3333
($f:tt: $t:ty) => (
34-
fn $f<'a>(
35-
self: &'a mut $crate::core_reexport::mem::PinMut<Self>
36-
) -> $crate::core_reexport::mem::PinMut<'a, $t> {
34+
fn $f<'__a>(
35+
self: &'__a mut $crate::core_reexport::mem::PinMut<Self>
36+
) -> $crate::core_reexport::mem::PinMut<'__a, $t> {
3737
unsafe {
3838
$crate::core_reexport::mem::PinMut::map_unchecked(
3939
self.reborrow(), |x| &mut x.$f
@@ -70,9 +70,9 @@ macro_rules! unsafe_pinned {
7070
#[macro_export]
7171
macro_rules! unsafe_unpinned {
7272
($f:tt: $t:ty) => (
73-
fn $f<'a>(
74-
self: &'a mut $crate::core_reexport::mem::PinMut<Self>
75-
) -> &'a mut $t {
73+
fn $f<'__a>(
74+
self: &'__a mut $crate::core_reexport::mem::PinMut<Self>
75+
) -> &'__a mut $t {
7676
unsafe {
7777
&mut $crate::core_reexport::mem::PinMut::get_mut_unchecked(
7878
self.reborrow()

futures-util/src/try_stream/try_next.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ pub struct TryNext<'a, St: 'a> {
1515

1616
impl<'a, St: TryStream + Unpin> Unpin for TryNext<'a, St> {}
1717

18-
impl<'b, St: TryStream + Unpin> TryNext<'b, St> {
19-
pub(super) fn new(stream: &'b mut St) -> Self {
18+
impl<'a, St: TryStream + Unpin> TryNext<'a, St> {
19+
pub(super) fn new(stream: &'a mut St) -> Self {
2020
TryNext { stream }
2121
}
2222
}

0 commit comments

Comments
 (0)