mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Add const generics
This commit is contained in:
parent
5e85158706
commit
b301b040f5
32 changed files with 1272 additions and 527 deletions
|
@ -3361,6 +3361,27 @@ fn foo<T$0: Sized + ?Sized + Sized + Trait>() {}
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_const_generic_type_alias() {
|
||||
check(
|
||||
r#"
|
||||
struct Foo<const LEN: usize>;
|
||||
type Fo$0o2 = Foo<2>;
|
||||
"#,
|
||||
expect![[r#"
|
||||
*Foo2*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
type Foo2 = Foo<2>
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_const_param() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue