Added more consteval tests and fixed consteval result

This commit is contained in:
OleStrohm 2022-08-07 18:42:59 +02:00
parent ad0a6bf1a3
commit 301b8894ea
4 changed files with 18 additions and 45 deletions

View file

@ -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#"