mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
more complicated const test
This commit is contained in:
parent
d5de7c21b2
commit
aef8882254
1 changed files with 22 additions and 0 deletions
|
@ -514,6 +514,28 @@ fn hover_const_static() {
|
||||||
```
|
```
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
check(
|
||||||
|
r#"
|
||||||
|
const foo$0: u32 = {
|
||||||
|
let x = foo();
|
||||||
|
x + 100
|
||||||
|
};"#,
|
||||||
|
expect![[r#"
|
||||||
|
*foo*
|
||||||
|
|
||||||
|
```rust
|
||||||
|
test
|
||||||
|
```
|
||||||
|
|
||||||
|
```rust
|
||||||
|
const foo: u32 = {
|
||||||
|
let x = foo();
|
||||||
|
x + 100
|
||||||
|
}
|
||||||
|
```
|
||||||
|
"#]],
|
||||||
|
);
|
||||||
|
|
||||||
check(
|
check(
|
||||||
r#"static foo$0: u32 = 456;"#,
|
r#"static foo$0: u32 = 456;"#,
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue