We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ac05c0 commit 83f6dd1Copy full SHA for 83f6dd1
crates/ide/src/goto_definition.rs
@@ -1955,6 +1955,34 @@ fn f() {
1955
);
1956
}
1957
1958
+ #[test]
1959
+ fn goto_index_mut_op() {
1960
+ check(
1961
+ r#"
1962
+//- minicore: index
1963
+
1964
+struct Foo;
1965
+struct Bar;
1966
1967
+impl core::ops::Index<usize> for Foo {
1968
+ type Output = Bar;
1969
1970
+ fn index(&self, index: usize) -> &Self::Output {}
1971
+}
1972
1973
+impl core::ops::IndexMut<usize> for Foo {
1974
+ fn index_mut(&mut self, index: usize) -> &mut Self::Output {}
1975
+ //^^^^^^^^^
1976
1977
1978
+fn f() {
1979
+ let mut foo = Foo;
1980
+ foo[0]$0 = Bar;
1981
1982
+"#,
1983
+ );
1984
+ }
1985
1986
#[test]
1987
fn goto_prefix_op() {
1988
check(
0 commit comments