Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 986 Bytes

File metadata and controls

31 lines (20 loc) · 986 Bytes

#[fundamental] types

Status: Stub

Type annotated with the #[fundamental] attribute have different coherence rules. See RFC 1023 for details. That includes:

  • &T
  • &mut T
  • Box<T>
  • Pin<T>

Typically, the scope of breakage in new trait impls is limited to inference and deref-coercion. New trait impls on #[fundamental] types may overlap with downstream impls and cause other kinds of breakage.

For reviewers

Look out for blanket trait implementations for fundamental types, like:

impl<'a, T> PublicTrait for &'a T
where
    T: SomeBound,
{

}

unless the blanket implementation is being stabilized along with PublicTrait. In cases where we really want to do this, a crater run can help estimate the scope of the breakage.