Use the correct crates proc-macro loading error message

This commit is contained in:
Lukas Wirth 2022-06-15 18:04:39 +02:00
parent 1d34cdcac0
commit 0e41d15b82
6 changed files with 42 additions and 42 deletions

View file

@ -3,6 +3,7 @@
//!
//! This probably isn't the best way to do this -- ideally, diagnistics should
//! be expressed in terms of hir types themselves.
use base_db::CrateId;
use cfg::{CfgExpr, CfgOptions};
use either::Either;
use hir_def::path::ModPath;
@ -87,7 +88,8 @@ pub struct UnresolvedProcMacro {
pub precise_location: Option<TextRange>,
pub macro_name: Option<String>,
pub kind: MacroKind,
pub proc_macro_err: Option<String>,
/// The crate id of the proc-macro this macro belongs to, or `None` if the proc-macro can't be found.
pub krate: Option<CrateId>,
}
#[derive(Debug, Clone, Eq, PartialEq)]