mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Added more consteval tests and fixed consteval result
This commit is contained in:
parent
ad0a6bf1a3
commit
301b8894ea
4 changed files with 18 additions and 45 deletions
|
@ -3530,31 +3530,6 @@ impl<const LEN: usize> Foo<LEN$0> {}
|
|||
|
||||
#[test]
|
||||
fn hover_const_eval_variant() {
|
||||
check(
|
||||
r#"
|
||||
#[repr(u8)]
|
||||
enum E {
|
||||
A = 4,
|
||||
/// This is a doc
|
||||
B$0 = E::A as u8 + 1,
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
*B*
|
||||
|
||||
```rust
|
||||
test::E
|
||||
```
|
||||
|
||||
```rust
|
||||
B = 5
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
This is a doc
|
||||
"#]],
|
||||
);
|
||||
// show hex for <10
|
||||
check(
|
||||
r#"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue