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

docs(tut): Add cross ref to chapter 6 #550

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/_tutorial/chapter_7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@
//! - Correctly reporting columns with unicode
//! - Conforming to a specific layout
//!
//! As a reminder [`chapter_6`] demonstrated how to convert a [`PResult`] to a standard
//! Rust [`Result`], and this section assumes that has been done.
//!
Comment on lines +570 to +572
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this doesn't quite serve the intended role.

  • Everything up to this point was already relying on this in this chapter
  • If we had this, I feel like it should call out the mechanism whereby this is done or else it feels like its pointing back to nothing
  • I believe our callbacks like this are usually done when we reference much earlier chapters. What some chapters do for this type of thing is, at the very type, have a transition statement. For example, we could have something like "With Parser::parse converting PResult into Result for use in our application, let's see how we can polish the quality of the reported error message". Note that that example statement is meant only to serve as an example and I created it without much deep thought.

//! For example, to get rustc-like errors with [`annotate-snippets`](https://crates.io/crates/annotate-snippets):
//! ```rust
//! # use winnow::prelude::*;
Expand Down Expand Up @@ -712,6 +715,7 @@
#![allow(unused_imports)]
use super::chapter_1;
use super::chapter_3;
use super::chapter_6;
use crate::combinator::alt;
use crate::combinator::cut_err;
use crate::combinator::fail;
Expand Down
Loading