mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
hir_expand: propagate expansion errors
This commit is contained in:
parent
d2f398cd76
commit
d5e9bf80f9
4 changed files with 92 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::{fmt, iter::FromIterator, sync::Arc};
|
||||
|
||||
use hir::MacroFile;
|
||||
use hir::{MacroFile, MacroResult};
|
||||
use ide_db::base_db::{
|
||||
salsa::debug::{DebugQueryTable, TableEntry},
|
||||
CrateId, FileId, FileTextQuery, SourceDatabase, SourceRootId,
|
||||
|
@ -115,10 +115,12 @@ impl FromIterator<TableEntry<FileId, Parse<ast::SourceFile>>> for SyntaxTreeStat
|
|||
}
|
||||
}
|
||||
|
||||
impl<M> FromIterator<TableEntry<MacroFile, Option<(Parse<SyntaxNode>, M)>>> for SyntaxTreeStats {
|
||||
impl<M> FromIterator<TableEntry<MacroFile, MacroResult<(Parse<SyntaxNode>, M)>>>
|
||||
for SyntaxTreeStats
|
||||
{
|
||||
fn from_iter<T>(iter: T) -> SyntaxTreeStats
|
||||
where
|
||||
T: IntoIterator<Item = TableEntry<MacroFile, Option<(Parse<SyntaxNode>, M)>>>,
|
||||
T: IntoIterator<Item = TableEntry<MacroFile, MacroResult<(Parse<SyntaxNode>, M)>>>,
|
||||
{
|
||||
let mut res = SyntaxTreeStats::default();
|
||||
for entry in iter {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue