File tree Expand file tree Collapse file tree 3 files changed +65
-2
lines changed Expand file tree Collapse file tree 3 files changed +65
-2
lines changed Original file line number Diff line number Diff line change 120
120
"sourceMaps" : true ,
121
121
"outFiles" : [ " ${workspaceFolder}/editors/code/out/tests/unit/**/*.js" ],
122
122
"preLaunchTask" : " Pretest"
123
- }
123
+ },
124
+ {
125
+ "name" : " (Windows) Attach" ,
126
+ "type" : " cppvsdbg" ,
127
+ "request" : " attach" ,
128
+ "processId" : " ${command:pickProcess}"
129
+ }
124
130
]
125
131
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ members = [ "crates/*", "xtask/" ]
4
4
[profile .dev ]
5
5
# disabling debug info speeds up builds a bunch,
6
6
# and we don't rely on it for debugging that much.
7
- debug = 0
7
+ debug = 2
8
8
9
9
[profile .release ]
10
10
incremental = true
Original file line number Diff line number Diff line change @@ -2080,4 +2080,61 @@ fn func(foo: i32) { if true { <|>foo; }; }
2080
2080
]
2081
2081
"### ) ;
2082
2082
}
2083
+
2084
+ #[ test]
2085
+ fn test_hover_associated_type_has_goto_type_action ( ) {
2086
+ let ( _, actions) = check_hover_result (
2087
+ "
2088
+ //- /main.rs
2089
+ trait Foo {
2090
+ type Item;
2091
+ fn get(self) -> Self::Item {}
2092
+ }
2093
+
2094
+ struct Bar{}
2095
+ struct S{}
2096
+
2097
+ impl Foo for S{
2098
+ type Item = Bar;
2099
+ }
2100
+
2101
+ fn test() -> impl Foo {
2102
+ S{}
2103
+ }
2104
+
2105
+ fn main() {
2106
+ let s<|>t = test().get();
2107
+ }
2108
+ " ,
2109
+ & [ "Foo::Item<impl Foo>" ] ,
2110
+ ) ;
2111
+ assert_debug_snapshot ! ( actions,
2112
+ @r###"
2113
+ [
2114
+ GoToType(
2115
+ [
2116
+ HoverGotoTypeData {
2117
+ mod_path: "Foo",
2118
+ nav: NavigationTarget {
2119
+ file_id: FileId(
2120
+ 1,
2121
+ ),
2122
+ full_range: 0..62,
2123
+ name: "Foo",
2124
+ kind: TRAIT_DEF,
2125
+ focus_range: Some(
2126
+ 6..9,
2127
+ ),
2128
+ container_name: None,
2129
+ description: Some(
2130
+ "trait Foo",
2131
+ ),
2132
+ docs: None,
2133
+ },
2134
+ },
2135
+ ],
2136
+ ),
2137
+ ]
2138
+ "### ) ;
2139
+ }
2083
2140
}
You can’t perform that action at this time.
0 commit comments