File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
test/library-tests/path-resolution Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,9 @@ abstract class ItemNode extends Locatable {
181
181
else result = this .getImmediateParentModule ( ) .getImmediateParentModule ( )
182
182
or
183
183
name = "self" and
184
- if this instanceof Module then result = this else result = this .getImmediateParentModule ( )
184
+ if this instanceof Module or this instanceof Enum or this instanceof Struct
185
+ then result = this
186
+ else result = this .getImmediateParentModule ( )
185
187
or
186
188
name = "Self" and
187
189
this = result .( ImplOrTraitItemNode ) .getAnItemInSelfScope ( )
Original file line number Diff line number Diff line change @@ -505,17 +505,17 @@ mod m21 {
505
505
mod m33 {
506
506
#[ rustfmt:: skip]
507
507
use super :: m22:: MyEnum :: { // $ item=I105
508
- self // $ MISSING: item=I105 $ SPURIOUS: item=I107
508
+ self // $ item=I105
509
509
} ;
510
510
511
511
#[ rustfmt:: skip]
512
512
use super :: m22:: MyStruct :: { // $ item=I106
513
- self // $ MISSING: item=I106 $ SPURIOUS: item=I107
513
+ self // $ item=I106
514
514
} ;
515
515
516
516
fn f ( ) {
517
517
let _ = MyEnum :: A ; // $ MISSING: item=I104
518
- let _ = MyStruct { } ; // $ MISSING: item=I106
518
+ let _ = MyStruct { } ; // $ item=I106
519
519
}
520
520
}
521
521
}
Original file line number Diff line number Diff line change @@ -226,11 +226,13 @@ resolvePath
226
226
| main.rs:507:13:507:17 | super | main.rs:496:1:521:1 | mod m21 |
227
227
| main.rs:507:13:507:22 | ...::m22 | main.rs:497:5:503:5 | mod m22 |
228
228
| main.rs:507:13:507:30 | ...::MyEnum | main.rs:498:9:500:9 | enum MyEnum |
229
- | main.rs:508:13:508:16 | self | main.rs:497:5:503:5 | mod m22 |
229
+ | main.rs:508:13:508:16 | self | main.rs:498:9:500:9 | enum MyEnum |
230
230
| main.rs:512:13:512:17 | super | main.rs:496:1:521:1 | mod m21 |
231
231
| main.rs:512:13:512:22 | ...::m22 | main.rs:497:5:503:5 | mod m22 |
232
232
| main.rs:512:13:512:32 | ...::MyStruct | main.rs:502:9:502:28 | struct MyStruct |
233
- | main.rs:513:13:513:16 | self | main.rs:497:5:503:5 | mod m22 |
233
+ | main.rs:513:13:513:16 | self | main.rs:502:9:502:28 | struct MyStruct |
234
+ | main.rs:517:21:517:26 | MyEnum | main.rs:498:9:500:9 | enum MyEnum |
235
+ | main.rs:518:21:518:28 | MyStruct | main.rs:502:9:502:28 | struct MyStruct |
234
236
| main.rs:524:5:524:6 | my | main.rs:1:1:1:7 | mod my |
235
237
| main.rs:524:5:524:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
236
238
| main.rs:524:5:524:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
You can’t perform that action at this time.
0 commit comments