@@ -67,8 +67,6 @@ We don't actually create a move-path for **every** [`Place`] that gets
6767used.  In particular, if it is illegal to move from a [ ` Place ` ] , then
6868there is no need for a [ ` MovePathIndex ` ] . Some examples:
6969
70- -  You cannot move from a static variable, so we do not create a [ ` MovePathIndex ` ] 
71-   for static variables.
7270-  You cannot move an individual element of an array, so if we have e.g. ` foo: [String; 3] ` ,
7371  there would be no move-path for ` foo[1] ` .
7472-  You cannot move from inside of a borrowed reference, so if we have e.g. ` foo: &String ` ,
@@ -82,6 +80,18 @@ initialized (which lowers overhead).
8280
8381[ `move_path_for` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/move_paths/builder/struct.MoveDataBuilder.html#method.move_path_for 
8482
83+ ## Projections  
84+ 
85+ Instead of using [ ` PlaceElem ` ] , projections in move paths are stored as [ ` MoveSubPath ` ] s.
86+ Projections that can't be moved out of and projections that can be skipped are not represented.
87+ 
88+ Subslice projections of arrays (produced by slice patterns) are special; they're turned into
89+ multiple [ ` ConstantIndex ` ]  subpaths, one for each element in the subslice.
90+ 
91+ [ `PlaceElem` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/type.PlaceElem.html 
92+ [ `MoveSubPath` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/move_paths/enum.MoveSubPath.html 
93+ [ `ConstantIndex` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_dataflow/move_paths/enum.MoveSubPath.html#variant.ConstantIndex 
94+ 
8595## Looking up a move-path  
8696
8797If you have a [ ` Place ` ]  and you would like to convert it to a [ ` MovePathIndex ` ] , you
0 commit comments