Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/goto_definition.rs')
| -rw-r--r-- | crates/ide/src/goto_definition.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index 41148db614..1bda15255d 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs @@ -537,6 +537,24 @@ fn bar() { } #[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 => {} + _ => {} + } +} +"#, + ); + } + + #[test] fn goto_def_for_use_alias() { check( r#" |