diff options
author | Lukas Wirth <[email protected]> | 2020-12-23 16:15:01 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2020-12-24 14:40:18 +0000 |
commit | 42e3f97c300c24b6ff9ff96ad0c24d386d3a253b (patch) | |
tree | 4142c4c99b034035bbc4e2b35ecd0f7e185b6855 /crates/ide/src/references | |
parent | e1acb0ca5ca2162be068fd6a07f7cc4ae171ed81 (diff) |
Support labels in reference search
Diffstat (limited to 'crates/ide/src/references')
-rw-r--r-- | crates/ide/src/references/rename.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs index cd721b7eb..4f353852f 100644 --- a/crates/ide/src/references/rename.rs +++ b/crates/ide/src/references/rename.rs | |||
@@ -1523,4 +1523,29 @@ fn main() { | |||
1523 | }"#, | 1523 | }"#, |
1524 | ); | 1524 | ); |
1525 | } | 1525 | } |
1526 | |||
1527 | #[test] | ||
1528 | fn test_rename_label() { | ||
1529 | check( | ||
1530 | "'foo", | ||
1531 | r#" | ||
1532 | fn foo<'a>() -> &'a () { | ||
1533 | 'a: { | ||
1534 | 'b: loop { | ||
1535 | break 'a<|>; | ||
1536 | } | ||
1537 | } | ||
1538 | } | ||
1539 | "#, | ||
1540 | r#" | ||
1541 | fn foo<'a>() -> &'a () { | ||
1542 | 'foo: { | ||
1543 | 'b: loop { | ||
1544 | break 'foo; | ||
1545 | } | ||
1546 | } | ||
1547 | } | ||
1548 | "#, | ||
1549 | ) | ||
1550 | } | ||
1526 | } | 1551 | } |