Skip to content

Commit

Permalink
Relax error bound
Browse files Browse the repository at this point in the history
  • Loading branch information
SarguelUnda committed Jan 5, 2025
1 parent 5e5046c commit 545b81a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 545b81a

Please sign in to comment.