test: add tests for constants inside range pattern
This commit is contained in:
parent
96a7c6ae3c
commit
16995ceda9
@ -532,6 +532,24 @@ fn bar() {
|
||||
$0foo!() => {}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_definition_works_for_consts_inside_range_pattern() {
|
||||
check(
|
||||
r#"
|
||||
//- /lib.rs
|
||||
const A: u32 = 0;
|
||||
//^
|
||||
|
||||
fn bar(v: u32) {
|
||||
match v {
|
||||
0..=$0A => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user