diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_expand/src/proc_macro.rs | 2 | ||||
-rw-r--r-- | crates/mbe/src/lib.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_expand/src/proc_macro.rs b/crates/hir_expand/src/proc_macro.rs index 7505cb061..97edf0fb6 100644 --- a/crates/hir_expand/src/proc_macro.rs +++ b/crates/hir_expand/src/proc_macro.rs | |||
@@ -50,7 +50,7 @@ impl ProcMacroExpander { | |||
50 | 50 | ||
51 | proc_macro.expander.expand(&tt, None).map_err(mbe::ExpandError::from) | 51 | proc_macro.expander.expand(&tt, None).map_err(mbe::ExpandError::from) |
52 | } | 52 | } |
53 | None => Err(err!("Unresolved proc macro")), | 53 | None => Err(mbe::ExpandError::UnresolvedProcMacro), |
54 | } | 54 | } |
55 | } | 55 | } |
56 | } | 56 | } |
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 { | |||
35 | ConversionError, | 35 | ConversionError, |
36 | InvalidRepeat, | 36 | InvalidRepeat, |
37 | ProcMacroError(tt::ExpansionError), | 37 | ProcMacroError(tt::ExpansionError), |
38 | UnresolvedProcMacro, | ||
38 | Other(String), | 39 | Other(String), |
39 | } | 40 | } |
40 | 41 | ||
@@ -53,6 +54,7 @@ impl fmt::Display for ExpandError { | |||
53 | ExpandError::ConversionError => f.write_str("could not convert tokens"), | 54 | ExpandError::ConversionError => f.write_str("could not convert tokens"), |
54 | ExpandError::InvalidRepeat => f.write_str("invalid repeat expression"), | 55 | ExpandError::InvalidRepeat => f.write_str("invalid repeat expression"), |
55 | ExpandError::ProcMacroError(e) => e.fmt(f), | 56 | ExpandError::ProcMacroError(e) => e.fmt(f), |
57 | ExpandError::UnresolvedProcMacro => f.write_str("unresolved proc macro"), | ||
56 | ExpandError::Other(e) => f.write_str(e), | 58 | ExpandError::Other(e) => f.write_str(e), |
57 | } | 59 | } |
58 | } | 60 | } |