aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/goto_definition.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-24 14:46:41 +0000
committerGitHub <[email protected]>2020-12-24 14:46:41 +0000
commit581419fd785a33fee7797d064dc0f5ddf2235300 (patch)
tree98076e334f6ba1b0e42f2d5f086df1f951be145b /crates/ide/src/goto_definition.rs
parenta31ee54afa5edfc3c470e3b1cdb5a553c0176d33 (diff)
parent42e3f97c300c24b6ff9ff96ad0c24d386d3a253b (diff)
Merge #7030
7030: Support labels in reference search r=matklad a=Veykril Implements general navigation for labels, goto def, rename and gives labels their own semantic highlighting class. Fixes #6966 Co-authored-by: Lukas Wirth <[email protected]>
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 47dd85ceb..912144f8b 100644
--- a/crates/ide/src/goto_definition.rs
+++ b/crates/ide/src/goto_definition.rs
@@ -1130,4 +1130,19 @@ fn foo<T>() where T: for<'a> Foo<&'a<|> (u8, u16)>, {}
1130"#, 1130"#,
1131 ); 1131 );
1132 } 1132 }
1133
1134 #[test]
1135 fn goto_label() {
1136 check(
1137 r#"
1138fn foo<'foo>(_: &'foo ()) {
1139 'foo: {
1140 //^^^^
1141 'bar: loop {
1142 break 'foo<|>;
1143 }
1144 }
1145}"#,
1146 )
1147 }
1133} 1148}