diff --git a/Doc-FAQ-Cheatsheet.md b/Doc-FAQ-Cheatsheet.md index f33635a..da74200 100644 --- a/Doc-FAQ-Cheatsheet.md +++ b/Doc-FAQ-Cheatsheet.md @@ -123,11 +123,11 @@ Phantom types are useful for enforcing state at compile time. For example: struct Door(~str); fn close(Door(name): Door) -> Door { - Door(name) + Door::(name) } fn open(Door(name): Door) -> Door { - Door(name) + Door::(name) } let _ = close(Door::(~"front")); // ok