9
9
/// ```
10
10
/// # #![feature(pin, arbitrary_self_types)]
11
11
/// # #[macro_use] extern crate pin_utils;
12
- /// # use std::mem ::PinMut;
12
+ /// # use std::pin ::PinMut;
13
13
/// # use std::marker::Unpin;
14
14
/// struct Foo<T> {
15
15
/// field: T,
32
32
macro_rules! unsafe_pinned {
33
33
( $f: tt: $t: ty) => (
34
34
fn $f<' __a>(
35
- self : & ' __a mut $crate:: core_reexport:: mem :: PinMut <Self >
36
- ) -> $crate:: core_reexport:: mem :: PinMut <' __a, $t> {
35
+ self : & ' __a mut $crate:: core_reexport:: pin :: PinMut <Self >
36
+ ) -> $crate:: core_reexport:: pin :: PinMut <' __a, $t> {
37
37
unsafe {
38
- $crate:: core_reexport:: mem :: PinMut :: map_unchecked(
38
+ $crate:: core_reexport:: pin :: PinMut :: map_unchecked(
39
39
self . reborrow( ) , |x| & mut x. $f
40
40
)
41
41
}
@@ -53,7 +53,7 @@ macro_rules! unsafe_pinned {
53
53
/// ```
54
54
/// # #![feature(pin, arbitrary_self_types)]
55
55
/// # #[macro_use] extern crate pin_utils;
56
- /// # use std::mem ::PinMut;
56
+ /// # use std::pin ::PinMut;
57
57
/// # struct Bar;
58
58
/// struct Foo {
59
59
/// field: Bar,
@@ -71,10 +71,10 @@ macro_rules! unsafe_pinned {
71
71
macro_rules! unsafe_unpinned {
72
72
( $f: tt: $t: ty) => (
73
73
fn $f<' __a>(
74
- self : & ' __a mut $crate:: core_reexport:: mem :: PinMut <Self >
74
+ self : & ' __a mut $crate:: core_reexport:: pin :: PinMut <Self >
75
75
) -> & ' __a mut $t {
76
76
unsafe {
77
- & mut $crate:: core_reexport:: mem :: PinMut :: get_mut_unchecked(
77
+ & mut $crate:: core_reexport:: pin :: PinMut :: get_mut_unchecked(
78
78
self . reborrow( )
79
79
) . $f
80
80
}
0 commit comments