From 1b2652097183b0a285891c02eea8a7d2af03e4b3 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 26 Nov 2020 19:07:53 +0100 Subject: Add dedicated error for "proc macro not found" --- crates/mbe/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/mbe/src') diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs index 2d0763c47..3ad609a00 100644 --- a/crates/mbe/src/lib.rs +++ b/crates/mbe/src/lib.rs @@ -35,6 +35,7 @@ pub enum ExpandError { ConversionError, InvalidRepeat, ProcMacroError(tt::ExpansionError), + UnresolvedProcMacro, Other(String), } @@ -53,6 +54,7 @@ impl fmt::Display for ExpandError { ExpandError::ConversionError => f.write_str("could not convert tokens"), ExpandError::InvalidRepeat => f.write_str("invalid repeat expression"), ExpandError::ProcMacroError(e) => e.fmt(f), + ExpandError::UnresolvedProcMacro => f.write_str("unresolved proc macro"), ExpandError::Other(e) => f.write_str(e), } } -- cgit v1.2.3