You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there are some types missing from special-types-and-traits.md. In particular, I thinkFn, FnMut, and FnOnce are special. What is the criteria for being special? Is there anything else missing from the list?
Things to consider adding:
cmp:
Eq
PartialEq
Ord
PartialOrd
ops:
Add
AddAssign
BitAnd
BitAndAssign
BitOr
BitOrAssign
BitXor
BitXorAssign
Div
DivAssign
Fn
FnMut
FnOnce
Index
IndexMut
Mul
MulAssign
Neg
Not
Rem
RemAssign
Shl
ShlAssign
Shr
ShrAssign
Sub
SubAssign
Misc:
Unpin — Automatically implemented on most types, but not otherwise "used" by the language?
And type or trait is special if it requires or is a dependency of compiler machinery. The types you think are missing are probably the operator traits and we should probably duplicate that list into the page.
cmp and ops are covered by lang-types.ops, #149 UnsafeCell has lang-types.unsafe-cell, #149 MaybeUninit has lang-types.maybe-uninit starting in the 1.101.0 docs, #2393 Unpin is mentioned in lang-types.auto-traits.intro, #854 VaListImpl was replaced with just VaList in rust-lang/rust#141980, and that is documented in lang-types.va-list, #2177
ManuallyDrop is mentioned in destructors.manually-suppressing but not on the special types page, #128 Unsize and CoerceUnsized mentioned in coerce.unsize.trait, again on a different page, #190 Future mentioned in items.fn.async.desugar-brief on a different page, #635 IntoIterator is mentioned in expr.loop.for.intro, on a different page, discussed since at least 4a2bdf8
drop_in_place() is discussed in destructors.drop_in_place, #128, and isn't really a special type or trait, but rather a special function
Not documented: IntoFuture
Not sure what this is asking for: start, eh_personality, eh_catch_typeinfo, exchange_malloc, box_free, oom, alloc_layout, align_offset
Activity
Havvy commentedon Apr 22, 2019
And type or trait is special if it requires or is a dependency of compiler machinery. The types you think are missing are probably the operator traits and we should probably duplicate that list into the page.
DanielEScherzer commentedon Nov 19, 2026
As of 1.100.0
cmpandopsare covered bylang-types.ops, #149UnsafeCellhaslang-types.unsafe-cell, #149MaybeUninithaslang-types.maybe-uninitstarting in the 1.101.0 docs, #2393Unpinis mentioned inlang-types.auto-traits.intro, #854VaListImplwas replaced with justVaListin rust-lang/rust#141980, and that is documented inlang-types.va-list, #2177ManuallyDropis mentioned indestructors.manually-suppressingbut not on the special types page, #128UnsizeandCoerceUnsizedmentioned incoerce.unsize.trait, again on a different page, #190Futurementioned initems.fn.async.desugar-briefon a different page, #635IntoIteratoris mentioned inexpr.loop.for.intro, on a different page, discussed since at least 4a2bdf8StructuralEqwas removed in 1.77, rust-lang/rust#116167Still unstable: DispatchFromDyn, Receiver, Try, Freeze, StructuralPartialEq
Generatorrenamed toCoroutine, rust-lang/rust#116958, still unstableGeneratorStaterenamed toCoroutineState, rust-lang/rust#116958, still unstabledrop_in_place()is discussed indestructors.drop_in_place, #128, and isn't really a special type or trait, but rather a special functionNot documented: IntoFuture
Not sure what this is asking for: start, eh_personality, eh_catch_typeinfo, exchange_malloc, box_free, oom, alloc_layout, align_offset