Note that `detail` was replced with `function_signature` to avoid
calling `from` on FunctionSignature twice.
I didn't add new tests because the current ones seem enough.
3429: Fix panic on eager expansion r=matklad a=edwin0cheng
When lazy expanding inside an eager macro, its *parent* file of that lazy macro call must be already exists such that a panic is occurred because that parent file is the eager macro we are processing.
This PR fix this bug by store the argument syntax node as another eager macro id for that purpose.
Personally I don't know if it is a good answer for this bug.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3428: Move reference classification to ra_ide_db r=matklad a=matklad
Lost some marks along the way :-(
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
3392: Implement concat eager macro r=matklad a=edwin0cheng
This PR implements the following things:
1. Add basic eager macro infrastructure by introducing `EagerCallId` such that the new `MacroCallId` is defined as :
```
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum MacroCallId {
LazyMacro(LazyMacroId),
EagerMacro(EagerMacroId),
}
```
2. Add `concat!` builtin macro.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3425: Fix a bug for single dollar sign macro r=matklad a=edwin0cheng
This PR fixed a bug to allow the following valid `macro_rules!` :
```rust
macro_rules! m {
($) => ($)
}
```
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
3405: More principled approach for gotodef for field shorhand r=matklad a=matklad
Callers can now decide for themselves if they should prefer field or
local definition. By default, it's the local.
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>