mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-18 19:21:38 +00:00
Show expansion errors in expand_macro feature
This commit is contained in:
parent
acd469681f
commit
28fbecff42
7 changed files with 76 additions and 37 deletions
|
|
@ -189,7 +189,7 @@ impl MatchFinder<'_> {
|
|||
// If we've got a macro call, we already tried matching it pre-expansion, which is the only
|
||||
// way to match the whole macro, now try expanding it and matching the expansion.
|
||||
if let Some(macro_call) = ast::MacroCall::cast(code.clone()) {
|
||||
if let Some(expanded) = self.sema.expand(¯o_call) {
|
||||
if let Some(expanded) = self.sema.expand_macro_call(¯o_call) {
|
||||
if let Some(tt) = macro_call.token_tree() {
|
||||
// When matching within a macro expansion, we only want to allow matches of
|
||||
// nodes that originated entirely from within the token tree of the macro call.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue