diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-17 08:38:09 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-17 08:38:09 +0000 |
commit | daffdd86749bc2d62b50ff9e0c869032d7932373 (patch) | |
tree | 49405ddd5a074867664141717772c3dd8aece308 /.vscode | |
parent | 32fc890de87e25c342b7c141ef98b07cb1471128 (diff) | |
parent | 2d4e79e1e6e39719d566bb58e04a7839588238fe (diff) |
Merge #3179
3179: Introduce AsMacroCall trait r=matklad a=edwin0cheng
This PR introduce `AsMacroCall` trait to help convert `ast::MacroCall` to `MacroCallId`. The main goal here is to centralize various conversions to single place and make implementing eager macro calls without further ado.
```rust
pub trait AsMacroCall {
fn as_call_id(
&self,
db: &(impl db::DefDatabase + AstDatabase),
resolver: impl Fn(path::ModPath) -> Option<MacroDefId>,
) -> Option<MacroCallId>;
}
```
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to '.vscode')
0 files changed, 0 insertions, 0 deletions