mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
fix: Simplify macro statement expansion handling
This commit is contained in:
parent
f8c416e1b9
commit
531e152390
10 changed files with 155 additions and 110 deletions
|
@ -4920,3 +4920,34 @@ impl T for () {
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_ranged_macro_call() {
|
||||
check_hover_range(
|
||||
r#"
|
||||
macro_rules! __rust_force_expr {
|
||||
($e:expr) => {
|
||||
$e
|
||||
};
|
||||
}
|
||||
macro_rules! vec {
|
||||
($elem:expr) => {
|
||||
__rust_force_expr!($elem)
|
||||
};
|
||||
}
|
||||
|
||||
struct Struct;
|
||||
impl Struct {
|
||||
fn foo(self) {}
|
||||
}
|
||||
|
||||
fn f() {
|
||||
$0vec![Struct]$0;
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
```rust
|
||||
Struct
|
||||
```"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue