@@ -87,7 +87,10 @@ pub struct StructFlags {
87
87
}
88
88
89
89
#[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
90
- /// JRL What does a TraitDatum represent?
90
+ /// A rust intermediate representation (rust_ir) of a Trait Definition.
91
+ ///
92
+ /// Not to be confused with a rust_ir for a Trait Implementation, which is
93
+ /// represented with ??? JRL
91
94
pub struct TraitDatum < I : Interner > {
92
95
pub id : TraitId < I > ,
93
96
@@ -101,6 +104,8 @@ pub struct TraitDatum<I: Interner> {
101
104
/// The id of each associated type defined in the trait.
102
105
pub associated_ty_ids : Vec < AssocTypeId < I > > ,
103
106
107
+ /// A marker indicating if this trait definition represents one of the
108
+ /// various builtin traits (sized, copy, etc)
104
109
pub well_known : Option < WellKnownTrait > ,
105
110
}
106
111
@@ -138,11 +143,15 @@ pub struct TraitDatumBound<I: Interner> {
138
143
pub struct TraitFlags {
139
144
pub auto : bool ,
140
145
pub marker : bool ,
141
- /// JRL What does upstream trait mean?
146
+ /// Indicate that a trait is defined upstream (in a dependency), used during
147
+ /// coherence checking.
142
148
pub upstream : bool ,
143
- /// JRL What fundamental traits are there? Does this just mean #[fundamental] like `Box`?
149
+ /// The trait equivalent of a struct fundamental, currently (2020-03-25)
150
+ /// there are no known fundamental traits.
144
151
pub fundamental : bool ,
145
- /// JRL Also what are these?
152
+ /// Indicates that chalk cannot list all of the implementations of the given
153
+ /// trait, likely because it is a publicly exported trait in a library JRL
154
+ /// ???.
146
155
pub non_enumerable : bool ,
147
156
pub coinductive : bool ,
148
157
}
0 commit comments