From b30a785ec2f35870d508bfcf188521ee2254787a Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Sun, 9 Jul 2023 10:46:05 +0300 Subject: [PATCH] more explanation about panic --- src/error/panic.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/error/panic.md b/src/error/panic.md index 5524dbf6f2..8e3f101090 100644 --- a/src/error/panic.md +++ b/src/error/panic.md @@ -15,5 +15,8 @@ fn drink(beverage: &str) { fn main() { drink("water"); drink("lemonade"); + drink("still water"); } ``` + +The first call to `drink` works. The second panics and thus the third is never called.