mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Complete assoc const patterns on builtin types
This commit is contained in:
parent
849ac25f05
commit
14203c6378
2 changed files with 28 additions and 3 deletions
|
@ -493,7 +493,6 @@ fn f(e: MyEnum) {
|
|||
|
||||
check_empty(
|
||||
r#"
|
||||
#[repr(C)]
|
||||
union U {
|
||||
i: i32,
|
||||
f: f32,
|
||||
|
@ -515,5 +514,23 @@ fn f(u: U) {
|
|||
ct C pub const C: i32
|
||||
ct D pub const D: i32
|
||||
"#]],
|
||||
)
|
||||
);
|
||||
|
||||
check_empty(
|
||||
r#"
|
||||
#[lang = "u32"]
|
||||
impl u32 {
|
||||
pub const MIN: Self = 0;
|
||||
}
|
||||
|
||||
fn f(v: u32) {
|
||||
match v {
|
||||
u32::$0
|
||||
}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
ct MIN pub const MIN: Self
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue