diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-08 23:09:03 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-08 23:09:03 +0100 |
commit | cf4d4f646b6227242b2d4e216e8e30b5e111e02e (patch) | |
tree | eb8a2ca7b63125f6975067b2ee1439244b3cbf97 /crates/ide/src/references | |
parent | 6cd11bbbc235bcc3891f20c6d4097834cf1990e5 (diff) | |
parent | 3a346412cf8ce2f04e123195452bf1b1c86211a7 (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.rs | 17 |
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#" | ||
1897 | struct $0Foo; | ||
1898 | |||
1899 | impl Foo where Self: {} | ||
1900 | "#, | ||
1901 | r#" | ||
1902 | struct Fo0; | ||
1903 | |||
1904 | impl Fo0 where Self: {} | ||
1905 | "#, | ||
1906 | ); | ||
1907 | } | ||
1891 | } | 1908 | } |