Unconditionally provide Error and Result types
These are not noticeable in compile time so don't need to be behind a
feature.
diff --git a/src/error.rs b/src/error.rs
index 0e482e6..53069da 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -16,6 +16,7 @@
#[cfg(feature = "printing")]
use quote::ToTokens;
+#[cfg(feature = "parsing")]
use buffer::Cursor;
use thread::ThreadBound;
@@ -172,6 +173,7 @@
}
}
+#[cfg(feature = "parsing")]
pub fn new_at<T: Display>(scope: Span, cursor: Cursor, message: T) -> Error {
if cursor.eof() {
Error::new(scope, format!("unexpected end of input, {}", message))
diff --git a/src/lib.rs b/src/lib.rs
index 263ce57..7c786f0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -565,7 +565,6 @@
#[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
mod print;
-#[cfg(feature = "parsing")]
mod thread;
////////////////////////////////////////////////////////////////////////////////
@@ -576,9 +575,7 @@
////////////////////////////////////////////////////////////////////////////////
-#[cfg(feature = "parsing")]
mod error;
-#[cfg(feature = "parsing")]
pub use error::{Error, Result};
/// Parse tokens of source code into the chosen syntax tree node.