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

Absolute path to bool in custom_punctuation.rs #1518

Merged
merged 1 commit into from
Oct 5, 2023
Merged

Absolute path to bool in custom_punctuation.rs #1518

merged 1 commit into from
Oct 5, 2023

Conversation

Vanille-N
Copy link
Contributor

This should solve the following error

error[E0053]: method `peek` has an incompatible type for trait
  --> src/lib.rs:61:5
   |
61 |     custom_punctuation!(Neq, <>);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     expected `bool`, found a different `bool`
   |     help: change the output type to match the trait: `bool`
   |
   = note: expected signature `fn(syn::buffer::Cursor<'_>) -> bool`
              found signature `fn(syn::buffer::Cursor<'_>) -> bool`

that occurs when trying to define

mod kw {
    custom_token!(bool);
    custom_punctuation!(Neq, <>);
}

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit abd2c21 into dtolnay:master Oct 5, 2023
17 checks passed
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 this pull request may close these issues.

2 participants