Skip to content

Commit

Permalink
Edit book to reflect syntax changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mysteriouslyseeing committed Dec 3, 2024
1 parent 582cfcc commit 7834597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/src/attributes/logos.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The type `ErrorType` can be any type that implements `Clone`, `PartialEq`,

`ErrorType` must implement the `Default` trait because invalid tokens, i.e.,
literals that do not match any variant, will produce `Err(ErrorType::default())`,
unless you specify a different constructor with `#[logos(error_callback = ...)]`.
unless you provide a callback with the alternate syntax `#[logos(error(ErrorType, callback = ...))]`

For example, here is an example using a custom error type:

Expand Down

0 comments on commit 7834597

Please sign in to comment.