@@ -200,7 +200,7 @@ impl<T: ?Sized> Deref for Rc<T> {
200
200
201
201
impl <T > Rc <T > {
202
202
pub fn new (value : T ) -> Self {
203
- let inner = Box :: new (ArcInner {
203
+ let inner = Box :: new (RcInner {
204
204
refcount : 1 ,
205
205
value ,
206
206
});
@@ -284,8 +284,8 @@ Given the following example code:
284
284
``` rust
285
285
#[derive(SmartPointer )]
286
286
struct MySmartPointer <'a , #[pointee] T : ? Sized , A >{
287
- ptr : & 'a T
288
- phantom : PhantomData <A >
287
+ ptr : & 'a T ,
288
+ phantom : PhantomData <A >,
289
289
}
290
290
```
291
291
@@ -296,13 +296,14 @@ we'll get the following expansion:
296
296
impl <'a , T , A , U > :: core :: ops :: CoerceUnsized <MySmartPointer <'a , U , A >> for MySmartPointer <'a , T , A >
297
297
where
298
298
T : ? Sized + :: core :: marker :: Unsize <U >,
299
- U : ? :: core :: marker :: Sized
299
+ U : ? :: core :: marker :: Sized ,
300
+ {}
300
301
301
302
#[automatically_derived]
302
303
impl <'a , T , A , U > :: core :: ops :: DispatchFromDyn <MySmartPointer <'a , U , A >> for MySmartPointer <'a , T , A >
303
304
where
304
305
T : ? Sized + :: core :: marker :: Unsize <U >,
305
- U : ? :: core :: marker :: Sized
306
+ U : ? :: core :: marker :: Sized ,
306
307
{}
307
308
```
308
309
@@ -321,7 +322,7 @@ you can use them for dynamic dispatch.
321
322
## Vtable requirements
322
323
323
324
As seen in the ` Rc ` example, the macro needs to be usable even if the pointer
324
- is ` NonNull<ArcInner <T>> ` (as opposed to ` NonNull<T> ` ).
325
+ is ` NonNull<RcInner <T>> ` (as opposed to ` NonNull<T> ` ).
325
326
326
327
# Drawbacks
327
328
[ drawbacks ] : #drawbacks
@@ -469,7 +470,7 @@ progress by reducing the scope and stabilizing a subset.
469
470
470
471
There have already been [ previous attempts to stabilize the underlying
471
472
traits] [ pre-rfc ] , and they did not make much progress. Therefore, this RFC
472
- proposes to reduce ths scope and instead stabilize a derive macro.
473
+ proposes to reduce the scope and instead stabilize a derive macro.
473
474
474
475
[ ast-scope ] : https://github.com/rust-lang/rfcs/pull/3519#discussion_r1492385549
475
476
[ rpit ] : https://blog.rust-lang.org/2023/12/21/async-fn-rpit-in-traits.html
0 commit comments