Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ impl fmt::Display for ParserError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for ParserError {}
impl core::error::Error for ParserError {}

// By default, allow expressions up to this deep before erroring
const DEFAULT_REMAINING_DEPTH: usize = 50;
Expand Down
6 changes: 2 additions & 4 deletions src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,7 @@ impl fmt::Display for TokenizerError {
}
}

#[cfg(feature = "std")]
impl std::error::Error for TokenizerError {}
impl core::error::Error for TokenizerError {}

struct State<'a> {
peekable: Peekable<Chars<'a>>,
Expand Down Expand Up @@ -2554,9 +2553,8 @@ mod tests {
message: "test".into(),
location: Location { line: 1, column: 1 },
};
#[cfg(feature = "std")]
{
use std::error::Error;
use core::error::Error;
assert!(err.source().is_none());
}
assert_eq!(err.to_string(), "test at Line: 1, Column: 1");
Expand Down
Loading