diff --git a/src/lib.rs b/src/lib.rs index 6d58a490..8abbb20d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,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 + Clone + PartialEq + Debug + 'source; + type Error: Default + 'source; /// The heart of Logos. Called by the `Lexer`. The implementation for this function /// is generated by the `logos-derive` crate. diff --git a/tests/src/lib.rs b/tests/src/lib.rs index 76d35308..f44f830d 100644 --- a/tests/src/lib.rs +++ b/tests/src/lib.rs @@ -94,6 +94,7 @@ pub fn assert_lex<'a, Token>( ) where Token: Logos<'a> + fmt::Debug + PartialEq, Token::Extras: Default, + Token::Error: fmt::Debug + PartialEq, { let mut lex = Token::lexer(source);