File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,19 @@ class IndexTrait extends Trait {
250250 }
251251}
252252
253+ /**
254+ * The [`IndexMut` trait][1].
255+ *
256+ * [1]: https://doc.rust-lang.org/std/ops/trait.IndexMut.html
257+ */
258+ class IndexMutTrait extends Trait {
259+ pragma [ nomagic]
260+ IndexMutTrait ( ) { this .getCanonicalPath ( ) = "core::ops::index::IndexMut" }
261+
262+ /** Gets the `index_mut` function. */
263+ Function getIndexMutFunction ( ) { result = this .( TraitItemNode ) .getAssocItem ( "index_mut" ) }
264+ }
265+
253266/**
254267 * The [`Box` struct][1].
255268 *
Original file line number Diff line number Diff line change @@ -1839,8 +1839,8 @@ private module MethodResolution {
18391839
18401840 override Trait getTrait ( ) {
18411841 if this .isInMutableContext ( )
1842- then result . getCanonicalPath ( ) = "core::ops::index::IndexMut"
1843- else result . getCanonicalPath ( ) = "core::ops::index::Index"
1842+ then result instanceof IndexMutTrait
1843+ else result instanceof IndexTrait
18441844 }
18451845 }
18461846
You can’t perform that action at this time.
0 commit comments