Skip to content

Commit af4e830

Browse files
authored
Clarify example in comment
1 parent 17eef71 commit af4e830

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

text/0000-knowntypeid.md

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ impl CanDoThing for DoesThing {
6464

6565
impl dyn CanDoThing + 'static {
6666
pub fn is<T: CanDoThing + 'static>(&self) -> bool {
67+
// `TypeId::of::<Self>()` would be `dyn CanDoThing`, not the "actual" type of Self
6768
TypeId::of::<T>() == self.type_id()
6869
}
6970

0 commit comments

Comments
 (0)