Skip to content

Commit 8b307a1

Browse files
committed
Clarify example in comment
1 parent d48cdd0 commit 8b307a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

text/0000-knowntypeid.md

Lines changed: 1 addition & 0 deletions
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)