mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Add completes_associated_const test
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
37d0c722ef
commit
a9aae250ed
1 changed files with 22 additions and 0 deletions
|
@ -444,3 +444,25 @@ fn foo() {
|
||||||
expect![[r#""#]],
|
expect![[r#""#]],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn completes_associated_const() {
|
||||||
|
check_empty(
|
||||||
|
r#"
|
||||||
|
#[derive(PartialEq, Eq)]
|
||||||
|
struct Ty(u8);
|
||||||
|
|
||||||
|
impl Ty {
|
||||||
|
const ABC: Self = Self(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn f(t: Ty) {
|
||||||
|
match t {
|
||||||
|
Ty::$0 => {}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
expect![[""]],
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue