aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/references
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-08 23:09:03 +0100
committerGitHub <[email protected]>2021-05-08 23:09:03 +0100
commitcf4d4f646b6227242b2d4e216e8e30b5e111e02e (patch)
treeeb8a2ca7b63125f6975067b2ee1439244b3cbf97 /crates/ide/src/references
parent6cd11bbbc235bcc3891f20c6d4097834cf1990e5 (diff)
parent3a346412cf8ce2f04e123195452bf1b1c86211a7 (diff)
Merge #8773
8773: fix: Correctly support SelfType when searching for usages r=Veykril a=Veykril Fixes #7443 Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide/src/references')
-rw-r--r--crates/ide/src/references/rename.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs
index 175e7a31d..2bf953305 100644
--- a/crates/ide/src/references/rename.rs
+++ b/crates/ide/src/references/rename.rs
@@ -1888,4 +1888,21 @@ impl Foo {
1888 "error: Cannot rename `Self`", 1888 "error: Cannot rename `Self`",
1889 ); 1889 );
1890 } 1890 }
1891
1892 #[test]
1893 fn test_rename_ignores_self_ty() {
1894 check(
1895 "Fo0",
1896 r#"
1897struct $0Foo;
1898
1899impl Foo where Self: {}
1900"#,
1901 r#"
1902struct Fo0;
1903
1904impl Fo0 where Self: {}
1905"#,
1906 );
1907 }
1891} 1908}