Skip to content

Commit 0b728a0

Browse files
committed
Replace some questions with explanations
1 parent de3ae31 commit 0b728a0

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

chalk-rust-ir/src/lib.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ pub struct StructFlags {
8787
}
8888

8989
#[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
9194
pub struct TraitDatum<I: Interner> {
9295
pub id: TraitId<I>,
9396

@@ -101,6 +104,8 @@ pub struct TraitDatum<I: Interner> {
101104
/// The id of each associated type defined in the trait.
102105
pub associated_ty_ids: Vec<AssocTypeId<I>>,
103106

107+
/// A marker indicating if this trait definition represents one of the
108+
/// various builtin traits (sized, copy, etc)
104109
pub well_known: Option<WellKnownTrait>,
105110
}
106111

@@ -138,11 +143,15 @@ pub struct TraitDatumBound<I: Interner> {
138143
pub struct TraitFlags {
139144
pub auto: bool,
140145
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.
142148
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.
144151
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+
/// ???.
146155
pub non_enumerable: bool,
147156
pub coinductive: bool,
148157
}

0 commit comments

Comments
 (0)