Skip to content

Commit 46df26b

Browse files
committed
Add a comment explaining the FromStr example
1 parent c2745cc commit 46df26b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/types/never.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The never type `!` is a type with no values, representing computations that neve
2929
> }
3030
> }
3131
>
32+
> // This does not need to check for the `Err` variant because
33+
> // `FromStr::Err` is the never type.
3234
> let Ok(s) = Anything::from_str("example");
3335
> ```
3436

0 commit comments

Comments
 (0)