File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ fn drop_impl(
313
313
// if it also implements `Drop`
314
314
trait MustNotImplDrop { }
315
315
#[ expect( drop_bounds) ]
316
- impl <T : :: core:: ops:: Drop > MustNotImplDrop for T { }
316
+ impl <T : :: core:: ops:: Drop + ? :: core :: marker :: Sized > MustNotImplDrop for T { }
317
317
impl #impl_generics MustNotImplDrop for #ident #ty_generics
318
318
#whr
319
319
{ }
@@ -322,8 +322,8 @@ fn drop_impl(
322
322
// `PinnedDrop` as the parameter to `#[pin_data]`.
323
323
#[ expect( non_camel_case_types) ]
324
324
trait UselessPinnedDropImpl_you_need_to_specify_PinnedDrop { }
325
- impl <T : :: pin_init:: PinnedDrop > UselessPinnedDropImpl_you_need_to_specify_PinnedDrop
326
- for T { }
325
+ impl <T : :: pin_init:: PinnedDrop + ? :: core :: marker :: Sized >
326
+ UselessPinnedDropImpl_you_need_to_specify_PinnedDrop for T { }
327
327
impl #impl_generics
328
328
UselessPinnedDropImpl_you_need_to_specify_PinnedDrop for #ident #ty_generics
329
329
#whr
Original file line number Diff line number Diff line change @@ -931,15 +931,15 @@ macro_rules! __pin_data {
931
931
// if it also implements `Drop`
932
932
trait MustNotImplDrop { }
933
933
#[ expect( drop_bounds) ]
934
- impl <T : :: core:: ops:: Drop > MustNotImplDrop for T { }
934
+ impl <T : :: core:: ops:: Drop + ? :: core :: marker :: Sized > MustNotImplDrop for T { }
935
935
impl <$( $impl_generics) * > MustNotImplDrop for $name<$( $ty_generics) * >
936
936
where $( $whr) * { }
937
937
// We also take care to prevent users from writing a useless `PinnedDrop` implementation.
938
938
// They might implement `PinnedDrop` correctly for the struct, but forget to give
939
939
// `PinnedDrop` as the parameter to `#[pin_data]`.
940
940
#[ expect( non_camel_case_types) ]
941
941
trait UselessPinnedDropImpl_you_need_to_specify_PinnedDrop { }
942
- impl <T : $crate:: PinnedDrop >
942
+ impl <T : $crate:: PinnedDrop + ? :: core :: marker :: Sized >
943
943
UselessPinnedDropImpl_you_need_to_specify_PinnedDrop for T { }
944
944
impl <$( $impl_generics) * >
945
945
UselessPinnedDropImpl_you_need_to_specify_PinnedDrop for $name<$( $ty_generics) * >
Original file line number Diff line number Diff line change @@ -56,11 +56,12 @@ const _: () = {
56
56
{ }
57
57
trait MustNotImplDrop { }
58
58
#[ expect( drop_bounds) ]
59
- impl < T : :: core:: ops:: Drop > MustNotImplDrop for T { }
59
+ impl < T : :: core:: ops:: Drop + ? :: core :: marker :: Sized > MustNotImplDrop for T { }
60
60
impl MustNotImplDrop for Foo { }
61
61
#[ expect( non_camel_case_types) ]
62
62
trait UselessPinnedDropImpl_you_need_to_specify_PinnedDrop { }
63
- impl < T : :: pin_init:: PinnedDrop > UselessPinnedDropImpl_you_need_to_specify_PinnedDrop
64
- for T { }
63
+ impl <
64
+ T : :: pin_init:: PinnedDrop + ?:: core:: marker:: Sized ,
65
+ > UselessPinnedDropImpl_you_need_to_specify_PinnedDrop for T { }
65
66
impl UselessPinnedDropImpl_you_need_to_specify_PinnedDrop for Foo { }
66
67
} ;
You can’t perform that action at this time.
0 commit comments