1
Fork 0

Add fundamental to trait def

This commit is contained in:
Michael Goulet 2024-07-06 18:16:02 -04:00
parent 382148d9a2
commit b2e30bdec4
3 changed files with 9 additions and 2 deletions

View file

@ -31,7 +31,7 @@ pub struct TraitDef {
/// and thus `impl`s of it are allowed to overlap.
pub is_marker: bool,
/// If `true`, then this trait has to `#[rustc_coinductive]` attribute or
/// If `true`, then this trait has the `#[rustc_coinductive]` attribute or
/// is an auto trait. This indicates that trait solver cycles involving an
/// `X: ThisTrait` goal are accepted.
///
@ -40,6 +40,11 @@ pub struct TraitDef {
/// also have already switched to the new trait solver.
pub is_coinductive: bool,
/// If `true`, then this trait has the `#[fundamental]` attribute. This
/// affects how conherence computes whether a trait may have trait implementations
/// added in the future.
pub is_fundamental: bool,
/// If `true`, then this trait has the `#[rustc_skip_during_method_dispatch(array)]`
/// attribute, indicating that editions before 2021 should not consider this trait
/// during method dispatch if the receiver is an array.