mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add ConstParams to the ide layer
This commit is contained in:
parent
0acdb73076
commit
18bf2e5af5
13 changed files with 66 additions and 5 deletions
|
@ -1144,4 +1144,20 @@ fn foo<'a>() -> &'a () {
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_find_const_param() {
|
||||
check(
|
||||
r#"
|
||||
fn foo<const FOO<|>: usize>() -> usize {
|
||||
FOO
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
FOO ConstParam FileId(0) 7..23 13..16 Other
|
||||
|
||||
FileId(0) 42..45 Other
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue