Skip to content

Commit 67480f5

Browse files
committed
Rust: Path resolution for extern crates
1 parent c4f4d68 commit 67480f5

File tree

4 files changed

+146
-10
lines changed

4 files changed

+146
-10
lines changed

rust/ql/lib/codeql/rust/internal/PathResolution.qll

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,25 @@ abstract class ItemNode extends Locatable {
127127
or
128128
crateDependencyEdge(this, name, result)
129129
or
130+
externCrateEdge(this, name, result)
131+
or
130132
// items made available through `use` are available to nodes that contain the `use`
131133
exists(UseItemNode use |
132134
use = this.getASuccessorRec(_) and
133135
result = use.(ItemNode).getASuccessorRec(name)
134136
)
135137
or
138+
exists(ExternCrateItemNode ec | result = ec.(ItemNode).getASuccessorRec(name) |
139+
ec = this.getASuccessorRec(_)
140+
or
141+
// if the extern crate appears in the crate root, then the crate name is also added
142+
// to the 'extern prelude', see https://doc.rust-lang.org/reference/items/extern-crates.html
143+
exists(Crate c |
144+
ec = c.getSourceFile().(ItemNode).getASuccessorRec(_) and
145+
this = c.getASourceFile()
146+
)
147+
)
148+
or
136149
// items made available through macro calls are available to nodes that contain the macro call
137150
exists(MacroCallItemNode call |
138151
call = this.getASuccessorRec(_) and
@@ -363,6 +376,20 @@ class CrateItemNode extends ItemNode instanceof Crate {
363376
override string getCanonicalPath(Crate c) { c = this and result = Crate.super.getName() }
364377
}
365378

379+
class ExternCrateItemNode extends ItemNode instanceof ExternCrate {
380+
override string getName() { result = super.getRename().getName().getText() }
381+
382+
override Namespace getNamespace() { none() }
383+
384+
override Visibility getVisibility() { none() }
385+
386+
override TypeParam getTypeParam(int i) { none() }
387+
388+
override predicate hasCanonicalPath(Crate c) { none() }
389+
390+
override string getCanonicalPath(Crate c) { none() }
391+
}
392+
366393
/** An item that can occur in a trait or an `impl` block. */
367394
abstract private class AssocItemNode extends ItemNode, AssocItem {
368395
/** Holds if this associated item has an implementation. */
@@ -1062,12 +1089,12 @@ private predicate crateDefEdge(CrateItemNode c, string name, ItemNode i) {
10621089
}
10631090

10641091
/**
1065-
* Holds if `m` depends on crate `dep` named `name`.
1092+
* Holds if `file` depends on crate `dep` named `name`.
10661093
*/
1067-
private predicate crateDependencyEdge(ModuleLikeNode m, string name, CrateItemNode dep) {
1094+
private predicate crateDependencyEdge(SourceFileItemNode file, string name, CrateItemNode dep) {
10681095
exists(CrateItemNode c |
10691096
dep = c.(Crate).getDependency(name) and
1070-
m = c.getASourceFile()
1097+
file = c.getASourceFile()
10711098
)
10721099
}
10731100

@@ -1403,6 +1430,22 @@ private predicate useImportEdge(Use use, string name, ItemNode item) {
14031430
)
14041431
}
14051432

1433+
/** Holds if `ec` imports `crate` as `name`. */
1434+
pragma[nomagic]
1435+
private predicate externCrateEdge(ExternCrateItemNode ec, string name, CrateItemNode crate) {
1436+
name = ec.getName() and
1437+
exists(SourceFile f, string s |
1438+
ec.getFile() = f.getFile() and
1439+
s = ec.(ExternCrate).getIdentifier().getText()
1440+
|
1441+
crateDependencyEdge(f, s, crate)
1442+
or
1443+
// `extern crate` is used to import the current crate
1444+
s = "self" and
1445+
ec.getFile() = crate.getASourceFile().getFile()
1446+
)
1447+
}
1448+
14061449
/**
14071450
* Holds if `i` is available inside `f` because it is reexported in
14081451
* [the `core` prelude][1] or [the `std` prelude][2].
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,92 @@
11
multiplePathResolutions
22
| main.rs:118:9:118:9 | f | main.rs:104:5:106:5 | fn f |
33
| main.rs:118:9:118:9 | f | main.rs:110:5:112:5 | fn f |
4+
multipleCanonicalPaths
5+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::f32x2 as core::convert::From>::from |
6+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::f32x4 as core::convert::From>::from |
7+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::f64x2 as core::convert::From>::from |
8+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i8x8 as core::convert::From>::from |
9+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i8x16 as core::convert::From>::from |
10+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i16x4 as core::convert::From>::from |
11+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i16x8 as core::convert::From>::from |
12+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i32x2 as core::convert::From>::from |
13+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i32x4 as core::convert::From>::from |
14+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i64x2 as core::convert::From>::from |
15+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x8 as core::convert::From>::from |
16+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x8 as core::convert::From>::from |
17+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x16 as core::convert::From>::from |
18+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x16 as core::convert::From>::from |
19+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x4 as core::convert::From>::from |
20+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x4 as core::convert::From>::from |
21+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x8 as core::convert::From>::from |
22+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x8 as core::convert::From>::from |
23+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u32x2 as core::convert::From>::from |
24+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u32x4 as core::convert::From>::from |
25+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u64x2 as core::convert::From>::from |
26+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u64x2 as core::convert::From>::from |
27+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::f32x2 as core::convert::From>::from |
28+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::f32x4 as core::convert::From>::from |
29+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::f64x2 as core::convert::From>::from |
30+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i8x8 as core::convert::From>::from |
31+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i8x16 as core::convert::From>::from |
32+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i16x4 as core::convert::From>::from |
33+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i16x8 as core::convert::From>::from |
34+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i32x2 as core::convert::From>::from |
35+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i32x4 as core::convert::From>::from |
36+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i64x2 as core::convert::From>::from |
37+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x8 as core::convert::From>::from |
38+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x8 as core::convert::From>::from |
39+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x16 as core::convert::From>::from |
40+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x16 as core::convert::From>::from |
41+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x4 as core::convert::From>::from |
42+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x4 as core::convert::From>::from |
43+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x8 as core::convert::From>::from |
44+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x8 as core::convert::From>::from |
45+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u32x2 as core::convert::From>::from |
46+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u32x4 as core::convert::From>::from |
47+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u64x2 as core::convert::From>::from |
48+
| file://:0:0:0:0 | fn from | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u64x2 as core::convert::From>::from |
49+
| file://:0:0:0:0 | impl ...::From::<...> for f32x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::f32x2 as core::convert::From> |
50+
| file://:0:0:0:0 | impl ...::From::<...> for f32x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::f32x2 as core::convert::From> |
51+
| file://:0:0:0:0 | impl ...::From::<...> for f32x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::f32x4 as core::convert::From> |
52+
| file://:0:0:0:0 | impl ...::From::<...> for f32x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::f32x4 as core::convert::From> |
53+
| file://:0:0:0:0 | impl ...::From::<...> for f64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::f64x2 as core::convert::From> |
54+
| file://:0:0:0:0 | impl ...::From::<...> for f64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::f64x2 as core::convert::From> |
55+
| file://:0:0:0:0 | impl ...::From::<...> for i8x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i8x8 as core::convert::From> |
56+
| file://:0:0:0:0 | impl ...::From::<...> for i8x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i8x8 as core::convert::From> |
57+
| file://:0:0:0:0 | impl ...::From::<...> for i8x16 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i8x16 as core::convert::From> |
58+
| file://:0:0:0:0 | impl ...::From::<...> for i8x16 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i8x16 as core::convert::From> |
59+
| file://:0:0:0:0 | impl ...::From::<...> for i16x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i16x4 as core::convert::From> |
60+
| file://:0:0:0:0 | impl ...::From::<...> for i16x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i16x4 as core::convert::From> |
61+
| file://:0:0:0:0 | impl ...::From::<...> for i16x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i16x8 as core::convert::From> |
62+
| file://:0:0:0:0 | impl ...::From::<...> for i16x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i16x8 as core::convert::From> |
63+
| file://:0:0:0:0 | impl ...::From::<...> for i32x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i32x2 as core::convert::From> |
64+
| file://:0:0:0:0 | impl ...::From::<...> for i32x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i32x2 as core::convert::From> |
65+
| file://:0:0:0:0 | impl ...::From::<...> for i32x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i32x4 as core::convert::From> |
66+
| file://:0:0:0:0 | impl ...::From::<...> for i32x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i32x4 as core::convert::From> |
67+
| file://:0:0:0:0 | impl ...::From::<...> for i64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::i64x2 as core::convert::From> |
68+
| file://:0:0:0:0 | impl ...::From::<...> for i64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::i64x2 as core::convert::From> |
69+
| file://:0:0:0:0 | impl ...::From::<...> for u8x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x8 as core::convert::From> |
70+
| file://:0:0:0:0 | impl ...::From::<...> for u8x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x8 as core::convert::From> |
71+
| file://:0:0:0:0 | impl ...::From::<...> for u8x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x8 as core::convert::From> |
72+
| file://:0:0:0:0 | impl ...::From::<...> for u8x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x8 as core::convert::From> |
73+
| file://:0:0:0:0 | impl ...::From::<...> for u8x16 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x16 as core::convert::From> |
74+
| file://:0:0:0:0 | impl ...::From::<...> for u8x16 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u8x16 as core::convert::From> |
75+
| file://:0:0:0:0 | impl ...::From::<...> for u8x16 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x16 as core::convert::From> |
76+
| file://:0:0:0:0 | impl ...::From::<...> for u8x16 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u8x16 as core::convert::From> |
77+
| file://:0:0:0:0 | impl ...::From::<...> for u16x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x4 as core::convert::From> |
78+
| file://:0:0:0:0 | impl ...::From::<...> for u16x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x4 as core::convert::From> |
79+
| file://:0:0:0:0 | impl ...::From::<...> for u16x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x4 as core::convert::From> |
80+
| file://:0:0:0:0 | impl ...::From::<...> for u16x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x4 as core::convert::From> |
81+
| file://:0:0:0:0 | impl ...::From::<...> for u16x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x8 as core::convert::From> |
82+
| file://:0:0:0:0 | impl ...::From::<...> for u16x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u16x8 as core::convert::From> |
83+
| file://:0:0:0:0 | impl ...::From::<...> for u16x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x8 as core::convert::From> |
84+
| file://:0:0:0:0 | impl ...::From::<...> for u16x8 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u16x8 as core::convert::From> |
85+
| file://:0:0:0:0 | impl ...::From::<...> for u32x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u32x2 as core::convert::From> |
86+
| file://:0:0:0:0 | impl ...::From::<...> for u32x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u32x2 as core::convert::From> |
87+
| file://:0:0:0:0 | impl ...::From::<...> for u32x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u32x4 as core::convert::From> |
88+
| file://:0:0:0:0 | impl ...::From::<...> for u32x4 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u32x4 as core::convert::From> |
89+
| file://:0:0:0:0 | impl ...::From::<...> for u64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u64x2 as core::convert::From> |
90+
| file://:0:0:0:0 | impl ...::From::<...> for u64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_arch::simd::u64x2 as core::convert::From> |
91+
| file://:0:0:0:0 | impl ...::From::<...> for u64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u64x2 as core::convert::From> |
92+
| file://:0:0:0:0 | impl ...::From::<...> for u64x2 { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::core_simd::alias::u64x2 as core::convert::From> |

rust/ql/test/library-tests/path-resolution/my.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type Result<
2121
T, // T
2222
> = ::std::result::Result<
2323
T, // $ item=T
24-
String,> // $ item=Result
24+
String,> // $ item=Result $ item=String
2525
; // my::Result
2626

2727
fn int_div(

rust/ql/test/library-tests/path-resolution/path-resolution.expected

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
testFailures
2-
| main.rs:288:27:288:48 | //... | Missing result: item=I71 |
3-
| main.rs:288:27:288:48 | //... | Missing result: item=I72 |
4-
| main.rs:291:22:291:34 | //... | Missing result: item=I72 |
5-
| main.rs:292:27:292:39 | //... | Missing result: item=I72 |
6-
| main.rs:293:18:293:30 | //... | Missing result: item=I71 |
7-
| main.rs:655:16:655:28 | //... | Missing result: item=I25 |
82
mod
93
| lib.rs:1:1:1:7 | mod my |
104
| main.rs:1:1:1:7 | mod my |
@@ -152,6 +146,13 @@ resolvePath
152146
| main.rs:278:16:278:16 | T | main.rs:272:7:272:7 | T |
153147
| main.rs:279:14:279:17 | Self | main.rs:270:5:280:5 | trait MyParamTrait |
154148
| main.rs:279:14:279:33 | ...::AssociatedType | main.rs:274:9:274:28 | type AssociatedType |
149+
| main.rs:288:13:288:16 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
150+
| main.rs:288:13:288:21 | ...::m13 | main.rs:283:1:296:1 | mod m13 |
151+
| main.rs:288:13:288:24 | ...::f | main.rs:284:5:284:17 | fn f |
152+
| main.rs:288:13:288:24 | ...::f | main.rs:284:19:285:19 | struct f |
153+
| main.rs:291:17:291:17 | f | main.rs:284:19:285:19 | struct f |
154+
| main.rs:292:21:292:21 | f | main.rs:284:19:285:19 | struct f |
155+
| main.rs:293:13:293:13 | f | main.rs:284:5:284:17 | fn f |
155156
| main.rs:307:9:307:14 | Trait1 | main.rs:299:5:303:5 | trait Trait1 |
156157
| main.rs:310:13:310:16 | Self | main.rs:305:5:313:5 | trait Trait2 |
157158
| main.rs:310:13:310:19 | ...::g | main.rs:302:9:302:20 | fn g |
@@ -325,6 +326,8 @@ resolvePath
325326
| main.rs:653:5:653:10 | ...::f | main.rs:547:5:551:5 | fn f |
326327
| main.rs:654:5:654:7 | m24 | main.rs:554:1:622:1 | mod m24 |
327328
| main.rs:654:5:654:10 | ...::f | main.rs:608:5:621:5 | fn f |
329+
| main.rs:655:5:655:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) |
330+
| main.rs:655:5:655:11 | ...::h | main.rs:50:1:69:1 | fn h |
328331
| my2/mod.rs:5:5:5:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
329332
| my2/mod.rs:5:5:5:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
330333
| my2/mod.rs:5:5:5:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
@@ -354,6 +357,7 @@ resolvePath
354357
| my.rs:22:5:22:17 | ...::result | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/core/src/lib.rs:356:1:356:15 | mod result |
355358
| my.rs:22:5:24:12 | ...::Result::<...> | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/core/src/result.rs:520:1:538:1 | enum Result |
356359
| my.rs:23:5:23:5 | T | my.rs:21:5:21:5 | T |
360+
| my.rs:24:5:24:10 | String | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/alloc/src/string.rs:70:1:364:1 | struct String |
357361
| my.rs:28:8:28:10 | i32 | file:///BUILTINS/types.rs:12:1:12:15 | struct i32 |
358362
| my.rs:29:8:29:10 | i32 | file:///BUILTINS/types.rs:12:1:12:15 | struct i32 |
359363
| my.rs:30:6:30:16 | Result::<...> | my.rs:18:34:25:1 | type Result<...> |

0 commit comments

Comments
 (0)