mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-20 15:23:07 +00:00
fix: Consider all produced artifacts for proc-macro dylib search
This commit is contained in:
parent
afee0710e1
commit
6b09fbf881
4 changed files with 15 additions and 21 deletions
|
@ -31,7 +31,7 @@ pub enum ProcMacroLoadingError {
|
|||
Disabled,
|
||||
FailedToBuild,
|
||||
ExpectedProcMacroArtifact,
|
||||
MissingDylibPath(Box<[String]>),
|
||||
MissingDylibPath,
|
||||
NotYetBuilt,
|
||||
NoProcMacros,
|
||||
ProcMacroSrvError(Box<str>),
|
||||
|
@ -42,7 +42,7 @@ impl ProcMacroLoadingError {
|
|||
ProcMacroLoadingError::Disabled | ProcMacroLoadingError::NotYetBuilt => false,
|
||||
ProcMacroLoadingError::ExpectedProcMacroArtifact
|
||||
| ProcMacroLoadingError::FailedToBuild
|
||||
| ProcMacroLoadingError::MissingDylibPath(_)
|
||||
| ProcMacroLoadingError::MissingDylibPath
|
||||
| ProcMacroLoadingError::NoProcMacros
|
||||
| ProcMacroLoadingError::ProcMacroSrvError(_) => true,
|
||||
}
|
||||
|
@ -58,19 +58,12 @@ impl fmt::Display for ProcMacroLoadingError {
|
|||
}
|
||||
ProcMacroLoadingError::Disabled => write!(f, "proc-macro expansion is disabled"),
|
||||
ProcMacroLoadingError::FailedToBuild => write!(f, "proc-macro failed to build"),
|
||||
ProcMacroLoadingError::MissingDylibPath(candidates) if candidates.is_empty() => {
|
||||
ProcMacroLoadingError::MissingDylibPath => {
|
||||
write!(
|
||||
f,
|
||||
"proc-macro crate built but the dylib path is missing, this indicates a problem with your build system."
|
||||
)
|
||||
}
|
||||
ProcMacroLoadingError::MissingDylibPath(candidates) => {
|
||||
write!(
|
||||
f,
|
||||
"proc-macro crate built but the dylib path is missing, this indicates a problem with your build system. Candidates not considered due to not having a dynamic library extension: {}",
|
||||
candidates.join(", ")
|
||||
)
|
||||
}
|
||||
ProcMacroLoadingError::NotYetBuilt => write!(f, "proc-macro not yet built"),
|
||||
ProcMacroLoadingError::NoProcMacros => {
|
||||
write!(f, "proc macro library has no proc macros")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue