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.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs
index 48eb0c43cd..032a431586 100644
--- a/crates/ide/src/goto_definition.rs
+++ b/crates/ide/src/goto_definition.rs
@@ -999,6 +999,21 @@ impl Trait for T {
}"#,
);
}
+
+ #[test]
+ fn goto_def_array_length_prefers_value_namespace() {
+ check(
+ r#"
+struct N;
+
+trait Trait {}
+
+impl<const N: usize> Trait for [N; N$0] {}
+ //^
+"#,
+ );
+ }
+
#[test]
fn goto_def_in_mac_call_in_attr_invoc() {
check(