Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 9.2 - missing Ferris the Crab to show non-compile #1924

Closed
karipov opened this issue Apr 18, 2019 · 2 comments · Fixed by #1925
Closed

Chapter 9.2 - missing Ferris the Crab to show non-compile #1924

karipov opened this issue Apr 18, 2019 · 2 comments · Fixed by #1925

Comments

@karipov
Copy link
Contributor

karipov commented Apr 18, 2019

Chapter 9.2 on Recoverable Errors contains two code blocks that do not compile; however, Ferris the Crab is absent from them, and doesn't highlight the blocks in red.

Simply marking the blocks with additional does_not_compile should suffice.

Also, some parts contain code that is later shown to panic, but only under a condition. Should those also be specified with the panics tag alongside?

CC: @u32i64 (committed extensively regarding Ferris)

@awaitlink
Copy link
Contributor

Also, some parts contain code that is later shown to panic, but only under a condition. Should those also be specified with the panics tag alongside?

I don't think so.

The panics tag is (in my opinion) intended for examples when the code always panics and the fact that it panics is incorrect (e.g. ch03-02#invalid-array-element-access).

The parts you are referring to are, on the other hand, possibly correct (depending on your specific case it might be more idiomatic to use Result and friends, but that is the topic of ch09-03-to-panic-or-not-to-panic), e.g. they panic only when the file in question is not found.

@L0uisc
Copy link
Contributor

L0uisc commented Apr 19, 2019

The parts you are referring to are, on the other hand, possibly correct (depending on your specific case it might be more idiomatic to use Result and friends, but that is the topic of ch09-03-to-panic-or-not-to-panic), e.g. they panic only when the file in question is not found.

See also #1903 in this regard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants