Skip to content

Commit

Permalink
undid mistaken error changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mysteriouslyseeing committed Dec 2, 2024
1 parent 9a605ae commit a559867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

extern crate core;

use core::fmt::Debug;

#[cfg(feature = "export_derive")]
pub use logos_derive::Logos;

Expand All @@ -52,7 +54,7 @@ pub trait Logos<'source>: Sized {

/// Error type returned by the lexer. This can be set using
/// `#[logos(error = MyError)]`. Defaults to `()` if not set.
type Error: Default + 'source;
type Error: Default + Clone + PartialEq + Debug + 'source;

/// The heart of Logos. Called by the `Lexer`. The implementation for this function
/// is generated by the `logos-derive` crate.
Expand Down
1 change: 0 additions & 1 deletion tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ pub fn assert_lex<'a, Token>(
) where
Token: Logos<'a> + fmt::Debug + PartialEq,
Token::Extras: Default,
<Token as Logos<'a>>::Error: PartialEq + fmt::Debug
{
let mut lex = Token::lexer(source);

Expand Down

0 comments on commit a559867

Please sign in to comment.