Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2895e07

Browse files
committed
Auto merge of rust-lang#139725 - davidtwco:sized-hierarchy-no-constness, r=<try>
[PERF] sized hierarchy w/out constness rust-lang#137944 w/out the constness parts - for benchmarking. r? `@ghost`
2 parents 9ffde4b + beb875d commit 2895e07

File tree

275 files changed

+4086
-1017
lines changed

Some content is hidden

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

275 files changed

+4086
-1017
lines changed

compiler/rustc_codegen_cranelift/example/mini_core.rs

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414
#![no_core]
1515
#![allow(dead_code, internal_features, ambiguous_wide_pointer_comparisons)]
1616

17+
#[lang = "pointee_sized"]
18+
pub trait PointeeSized {}
19+
20+
#[lang = "meta_sized"]
21+
pub trait MetaSized: PointeeSized {}
22+
1723
#[lang = "sized"]
18-
pub trait Sized {}
24+
pub trait Sized: MetaSized {}
1925

2026
#[lang = "destruct"]
2127
pub trait Destruct {}
@@ -24,35 +30,35 @@ pub trait Destruct {}
2430
pub trait Tuple {}
2531

2632
#[lang = "unsize"]
27-
pub trait Unsize<T: ?Sized> {}
33+
pub trait Unsize<T: PointeeSized>: PointeeSized {}
2834

2935
#[lang = "coerce_unsized"]
3036
pub trait CoerceUnsized<T> {}
3137

32-
impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {}
33-
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a mut U> for &'a mut T {}
34-
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
35-
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
38+
impl<'a, 'b: 'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<&'a U> for &'b T {}
39+
impl<'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<&'a mut U> for &'a mut T {}
40+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*const U> for *const T {}
41+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*mut U> for *mut T {}
3642

3743
#[lang = "dispatch_from_dyn"]
3844
pub trait DispatchFromDyn<T> {}
3945

4046
// &T -> &U
41-
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<&'a U> for &'a T {}
47+
impl<'a, T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<&'a U> for &'a T {}
4248
// &mut T -> &mut U
43-
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<&'a mut U> for &'a mut T {}
49+
impl<'a, T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<&'a mut U> for &'a mut T {}
4450
// *const T -> *const U
45-
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
51+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<*const U> for *const T {}
4652
// *mut T -> *mut U
47-
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}
48-
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Box<U>> for Box<T> {}
53+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<*mut U> for *mut T {}
54+
impl<T: MetaSized + Unsize<U>, U: MetaSized> DispatchFromDyn<Box<U>> for Box<T> {}
4955

5056
#[lang = "legacy_receiver"]
5157
pub trait LegacyReceiver {}
5258

53-
impl<T: ?Sized> LegacyReceiver for &T {}
54-
impl<T: ?Sized> LegacyReceiver for &mut T {}
55-
impl<T: ?Sized> LegacyReceiver for Box<T> {}
59+
impl<T: PointeeSized> LegacyReceiver for &T {}
60+
impl<T: PointeeSized> LegacyReceiver for &mut T {}
61+
impl<T: MetaSized> LegacyReceiver for Box<T> {}
5662

5763
#[lang = "copy"]
5864
pub trait Copy {}
@@ -74,9 +80,9 @@ impl Copy for isize {}
7480
impl Copy for f32 {}
7581
impl Copy for f64 {}
7682
impl Copy for char {}
77-
impl<'a, T: ?Sized> Copy for &'a T {}
78-
impl<T: ?Sized> Copy for *const T {}
79-
impl<T: ?Sized> Copy for *mut T {}
83+
impl<'a, T: PointeeSized> Copy for &'a T {}
84+
impl<T: PointeeSized> Copy for *const T {}
85+
impl<T: PointeeSized> Copy for *mut T {}
8086
impl<T: Copy> Copy for Option<T> {}
8187

8288
#[lang = "sync"]
@@ -94,17 +100,17 @@ unsafe impl Sync for i32 {}
94100
unsafe impl Sync for isize {}
95101
unsafe impl Sync for char {}
96102
unsafe impl Sync for f32 {}
97-
unsafe impl<'a, T: ?Sized> Sync for &'a T {}
103+
unsafe impl<'a, T: PointeeSized> Sync for &'a T {}
98104
unsafe impl<T: Sync, const N: usize> Sync for [T; N] {}
99105

100106
#[lang = "freeze"]
101107
unsafe auto trait Freeze {}
102108

103-
unsafe impl<T: ?Sized> Freeze for PhantomData<T> {}
104-
unsafe impl<T: ?Sized> Freeze for *const T {}
105-
unsafe impl<T: ?Sized> Freeze for *mut T {}
106-
unsafe impl<T: ?Sized> Freeze for &T {}
107-
unsafe impl<T: ?Sized> Freeze for &mut T {}
109+
unsafe impl<T: PointeeSized> Freeze for PhantomData<T> {}
110+
unsafe impl<T: PointeeSized> Freeze for *const T {}
111+
unsafe impl<T: PointeeSized> Freeze for *mut T {}
112+
unsafe impl<T: PointeeSized> Freeze for &T {}
113+
unsafe impl<T: PointeeSized> Freeze for &mut T {}
108114

109115
#[lang = "structural_peq"]
110116
pub trait StructuralPartialEq {}
@@ -443,7 +449,7 @@ pub enum Option<T> {
443449
pub use Option::*;
444450

445451
#[lang = "phantom_data"]
446-
pub struct PhantomData<T: ?Sized>;
452+
pub struct PhantomData<T: PointeeSized>;
447453

448454
#[lang = "fn_once"]
449455
#[rustc_paren_sugar]
@@ -546,18 +552,18 @@ pub trait Deref {
546552
#[repr(transparent)]
547553
#[rustc_layout_scalar_valid_range_start(1)]
548554
#[rustc_nonnull_optimization_guaranteed]
549-
pub struct NonNull<T: ?Sized>(pub *const T);
555+
pub struct NonNull<T: PointeeSized>(pub *const T);
550556

551-
impl<T: ?Sized, U: ?Sized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
552-
impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
557+
impl<T: PointeeSized, U: PointeeSized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
558+
impl<T: PointeeSized, U: PointeeSized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
553559

554-
pub struct Unique<T: ?Sized> {
560+
pub struct Unique<T: PointeeSized> {
555561
pub pointer: NonNull<T>,
556562
pub _marker: PhantomData<T>,
557563
}
558564

559-
impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> {}
560-
impl<T: ?Sized, U: ?Sized> DispatchFromDyn<Unique<U>> for Unique<T> where T: Unsize<U> {}
565+
impl<T: PointeeSized, U: PointeeSized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> {}
566+
impl<T: PointeeSized, U: PointeeSized> DispatchFromDyn<Unique<U>> for Unique<T> where T: Unsize<U> {}
561567

562568
#[lang = "global_alloc_ty"]
563569
pub struct Global;

compiler/rustc_codegen_gcc/example/mini_core.rs

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ unsafe extern "C" fn _Unwind_Resume() {
1111
intrinsics::unreachable();
1212
}
1313

14+
#[lang = "pointee_sized"]
15+
pub trait PointeeSized {}
16+
17+
#[lang = "meta_sized"]
18+
pub trait MetaSized: PointeeSized {}
19+
1420
#[lang = "sized"]
15-
pub trait Sized {}
21+
pub trait Sized: MetaSized {}
1622

1723
#[lang = "destruct"]
1824
pub trait Destruct {}
@@ -21,35 +27,35 @@ pub trait Destruct {}
2127
pub trait Tuple {}
2228

2329
#[lang = "unsize"]
24-
pub trait Unsize<T: ?Sized> {}
30+
pub trait Unsize<T: PointeeSized>: PointeeSized {}
2531

2632
#[lang = "coerce_unsized"]
2733
pub trait CoerceUnsized<T> {}
2834

29-
impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {}
30-
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a mut U> for &'a mut T {}
31-
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
32-
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
35+
impl<'a, 'b: 'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<&'a U> for &'b T {}
36+
impl<'a, T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<&'a mut U> for &'a mut T {}
37+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*const U> for *const T {}
38+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> CoerceUnsized<*mut U> for *mut T {}
3339

3440
#[lang = "dispatch_from_dyn"]
3541
pub trait DispatchFromDyn<T> {}
3642

3743
// &T -> &U
38-
impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<&'a U> for &'a T {}
44+
impl<'a, T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<&'a U> for &'a T {}
3945
// &mut T -> &mut U
40-
impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<&'a mut U> for &'a mut T {}
46+
impl<'a, T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<&'a mut U> for &'a mut T {}
4147
// *const T -> *const U
42-
impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
48+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<*const U> for *const T {}
4349
// *mut T -> *mut U
44-
impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}
45-
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Box<U, ()>> for Box<T, ()> {}
50+
impl<T: PointeeSized + Unsize<U>, U: PointeeSized> DispatchFromDyn<*mut U> for *mut T {}
51+
impl<T: MetaSized + Unsize<U>, U: MetaSized> DispatchFromDyn<Box<U, ()>> for Box<T, ()> {}
4652

4753
#[lang = "legacy_receiver"]
4854
pub trait LegacyReceiver {}
4955

50-
impl<T: ?Sized> LegacyReceiver for &T {}
51-
impl<T: ?Sized> LegacyReceiver for &mut T {}
52-
impl<T: ?Sized, A: Allocator> LegacyReceiver for Box<T, A> {}
56+
impl<T: PointeeSized> LegacyReceiver for &T {}
57+
impl<T: PointeeSized> LegacyReceiver for &mut T {}
58+
impl<T: MetaSized> LegacyReceiver for Box<T> {}
5359

5460
#[lang = "copy"]
5561
pub trait Copy {}
@@ -70,9 +76,9 @@ impl Copy for isize {}
7076
impl Copy for f32 {}
7177
impl Copy for f64 {}
7278
impl Copy for char {}
73-
impl<'a, T: ?Sized> Copy for &'a T {}
74-
impl<T: ?Sized> Copy for *const T {}
75-
impl<T: ?Sized> Copy for *mut T {}
79+
impl<'a, T: PointeeSized> Copy for &'a T {}
80+
impl<T: PointeeSized> Copy for *const T {}
81+
impl<T: PointeeSized> Copy for *mut T {}
7682

7783
#[lang = "sync"]
7884
pub unsafe trait Sync {}
@@ -88,17 +94,17 @@ unsafe impl Sync for i16 {}
8894
unsafe impl Sync for i32 {}
8995
unsafe impl Sync for isize {}
9096
unsafe impl Sync for char {}
91-
unsafe impl<'a, T: ?Sized> Sync for &'a T {}
97+
unsafe impl<'a, T: PointeeSized> Sync for &'a T {}
9298
unsafe impl Sync for [u8; 16] {}
9399

94100
#[lang = "freeze"]
95101
unsafe auto trait Freeze {}
96102

97-
unsafe impl<T: ?Sized> Freeze for PhantomData<T> {}
98-
unsafe impl<T: ?Sized> Freeze for *const T {}
99-
unsafe impl<T: ?Sized> Freeze for *mut T {}
100-
unsafe impl<T: ?Sized> Freeze for &T {}
101-
unsafe impl<T: ?Sized> Freeze for &mut T {}
103+
unsafe impl<T: PointeeSized> Freeze for PhantomData<T> {}
104+
unsafe impl<T: PointeeSized> Freeze for *const T {}
105+
unsafe impl<T: PointeeSized> Freeze for *mut T {}
106+
unsafe impl<T: PointeeSized> Freeze for &T {}
107+
unsafe impl<T: PointeeSized> Freeze for &mut T {}
102108

103109
#[lang = "structural_peq"]
104110
pub trait StructuralPartialEq {}
@@ -403,7 +409,7 @@ pub enum Option<T> {
403409
pub use Option::*;
404410

405411
#[lang = "phantom_data"]
406-
pub struct PhantomData<T: ?Sized>;
412+
pub struct PhantomData<T: PointeeSized>;
407413

408414
#[lang = "fn_once"]
409415
#[rustc_paren_sugar]
@@ -520,18 +526,18 @@ impl Allocator for Global {}
520526
#[repr(transparent)]
521527
#[rustc_layout_scalar_valid_range_start(1)]
522528
#[rustc_nonnull_optimization_guaranteed]
523-
pub struct NonNull<T: ?Sized>(pub *const T);
529+
pub struct NonNull<T: PointeeSized>(pub *const T);
524530

525-
impl<T: ?Sized, U: ?Sized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
526-
impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
531+
impl<T: PointeeSized, U: PointeeSized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
532+
impl<T: PointeeSized, U: PointeeSized> DispatchFromDyn<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
527533

528-
pub struct Unique<T: ?Sized> {
534+
pub struct Unique<T: PointeeSized> {
529535
pub pointer: NonNull<T>,
530536
pub _marker: PhantomData<T>,
531537
}
532538

533-
impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> {}
534-
impl<T: ?Sized, U: ?Sized> DispatchFromDyn<Unique<U>> for Unique<T> where T: Unsize<U> {}
539+
impl<T: PointeeSized, U: PointeeSized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> {}
540+
impl<T: PointeeSized, U: PointeeSized> DispatchFromDyn<Unique<U>> for Unique<T> where T: Unsize<U> {}
535541

536542
#[lang = "owned_box"]
537543
pub struct Box<T: ?Sized, A: Allocator = Global>(Unique<T>, A);

compiler/rustc_data_structures/src/aligned.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::marker::PointeeSized;
12
use std::ptr::Alignment;
23

34
/// Returns the ABI-required minimum alignment of a type in bytes.
@@ -17,7 +18,7 @@ pub const fn align_of<T: ?Sized + Aligned>() -> Alignment {
1718
/// example `[T]` has alignment of `T`.
1819
///
1920
/// [`align_of::<Self>()`]: align_of
20-
pub unsafe trait Aligned {
21+
pub unsafe trait Aligned: PointeeSized {
2122
/// Alignment of `Self`.
2223
const ALIGN: Alignment;
2324
}

compiler/rustc_data_structures/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#![feature(ptr_alignment_type)]
3333
#![feature(rustc_attrs)]
3434
#![feature(rustdoc_internals)]
35+
#![feature(sized_hierarchy)]
3536
#![feature(test)]
3637
#![feature(thread_id_value)]
3738
#![feature(type_alias_impl_trait)]

compiler/rustc_data_structures/src/marker.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::alloc::Allocator;
2+
use std::marker::PointeeSized;
23

34
#[rustc_on_unimplemented(message = "`{Self}` doesn't implement `DynSend`. \
45
Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Send`")]
@@ -15,7 +16,7 @@ pub unsafe auto trait DynSend {}
1516
pub unsafe auto trait DynSync {}
1617

1718
// Same with `Sync` and `Send`.
18-
unsafe impl<T: DynSync + ?Sized> DynSend for &T {}
19+
unsafe impl<T: DynSync + ?Sized + PointeeSized> DynSend for &T {}
1920

2021
macro_rules! impls_dyn_send_neg {
2122
($([$t1: ty $(where $($generics1: tt)*)?])*) => {
@@ -27,9 +28,9 @@ macro_rules! impls_dyn_send_neg {
2728
impls_dyn_send_neg!(
2829
[std::env::Args]
2930
[std::env::ArgsOs]
30-
[*const T where T: ?Sized]
31-
[*mut T where T: ?Sized]
32-
[std::ptr::NonNull<T> where T: ?Sized]
31+
[*const T where T: ?Sized + PointeeSized]
32+
[*mut T where T: ?Sized + PointeeSized]
33+
[std::ptr::NonNull<T> where T: ?Sized + PointeeSized]
3334
[std::rc::Rc<T, A> where T: ?Sized, A: Allocator]
3435
[std::rc::Weak<T, A> where T: ?Sized, A: Allocator]
3536
[std::sync::MutexGuard<'_, T> where T: ?Sized]
@@ -93,12 +94,12 @@ macro_rules! impls_dyn_sync_neg {
9394
impls_dyn_sync_neg!(
9495
[std::env::Args]
9596
[std::env::ArgsOs]
96-
[*const T where T: ?Sized]
97-
[*mut T where T: ?Sized]
97+
[*const T where T: ?Sized + PointeeSized]
98+
[*mut T where T: ?Sized + PointeeSized]
9899
[std::cell::Cell<T> where T: ?Sized]
99100
[std::cell::RefCell<T> where T: ?Sized]
100101
[std::cell::UnsafeCell<T> where T: ?Sized]
101-
[std::ptr::NonNull<T> where T: ?Sized]
102+
[std::ptr::NonNull<T> where T: ?Sized + PointeeSized]
102103
[std::rc::Rc<T, A> where T: ?Sized, A: Allocator]
103104
[std::rc::Weak<T, A> where T: ?Sized, A: Allocator]
104105
[std::cell::OnceCell<T> where T]
@@ -161,10 +162,10 @@ impl_dyn_sync!(
161162
[thin_vec::ThinVec<T> where T: DynSync]
162163
);
163164

164-
pub fn assert_dyn_sync<T: ?Sized + DynSync>() {}
165-
pub fn assert_dyn_send<T: ?Sized + DynSend>() {}
166-
pub fn assert_dyn_send_val<T: ?Sized + DynSend>(_t: &T) {}
167-
pub fn assert_dyn_send_sync_val<T: ?Sized + DynSync + DynSend>(_t: &T) {}
165+
pub fn assert_dyn_sync<T: ?Sized + PointeeSized + DynSync>() {}
166+
pub fn assert_dyn_send<T: ?Sized + PointeeSized + DynSend>() {}
167+
pub fn assert_dyn_send_val<T: ?Sized + PointeeSized + DynSend>(_t: &T) {}
168+
pub fn assert_dyn_send_sync_val<T: ?Sized + PointeeSized + DynSync + DynSend>(_t: &T) {}
168169

169170
#[derive(Copy, Clone)]
170171
pub struct FromDyn<T>(T);
@@ -217,10 +218,10 @@ impl<T> std::ops::DerefMut for FromDyn<T> {
217218
// an instance of `DynSend` and `DynSync`, since the compiler cannot infer
218219
// it automatically in some cases. (e.g. Box<dyn Send / Sync>)
219220
#[derive(Copy, Clone)]
220-
pub struct IntoDynSyncSend<T: ?Sized>(pub T);
221+
pub struct IntoDynSyncSend<T: ?Sized + PointeeSized>(pub T);
221222

222-
unsafe impl<T: ?Sized + Send> DynSend for IntoDynSyncSend<T> {}
223-
unsafe impl<T: ?Sized + Sync> DynSync for IntoDynSyncSend<T> {}
223+
unsafe impl<T: ?Sized + PointeeSized + Send> DynSend for IntoDynSyncSend<T> {}
224+
unsafe impl<T: ?Sized + PointeeSized + Sync> DynSync for IntoDynSyncSend<T> {}
224225

225226
impl<T> std::ops::Deref for IntoDynSyncSend<T> {
226227
type Target = T;

compiler/rustc_feature/src/unstable.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ declare_features! (
235235
(internal, profiler_runtime, "1.18.0", None),
236236
/// Allows using `rustc_*` attributes (RFC 572).
237237
(internal, rustc_attrs, "1.0.0", None),
238+
/// Introduces a hierarchy of `Sized` traits (RFC 3729).
239+
(unstable, sized_hierarchy, "CURRENT_RUSTC_VERSION", None),
238240
/// Allows using the `#[stable]` and `#[unstable]` attributes.
239241
(internal, staged_api, "1.0.0", None),
240242
/// Added for testing unstable lints; perma-unstable.

compiler/rustc_hir/src/lang_items.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ pub fn extract(attrs: &[impl AttributeExt]) -> Option<(Symbol, Span)> {
165165
language_item_table! {
166166
// Variant name, Name, Getter method name, Target Generic requirements;
167167
Sized, sym::sized, sized_trait, Target::Trait, GenericRequirement::Exact(0);
168+
MetaSized, sym::meta_sized, meta_sized_trait, Target::Trait, GenericRequirement::Exact(0);
169+
PointeeSized, sym::pointee_sized, pointee_sized_trait, Target::Trait, GenericRequirement::Exact(0);
168170
Unsize, sym::unsize, unsize_trait, Target::Trait, GenericRequirement::Minimum(1);
169171
/// Trait injected by `#[derive(PartialEq)]`, (i.e. "Partial EQ").
170172
StructuralPeq, sym::structural_peq, structural_peq_trait, Target::Trait, GenericRequirement::None;

0 commit comments

Comments
 (0)