mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Rust: Refine Self resolution inside impl blocks
This commit is contained in:
@@ -264,6 +264,9 @@ abstract class ItemNode extends Locatable {
|
||||
pragma[nomagic]
|
||||
ItemNode getImmediateParent() { this = result.getADescendant() }
|
||||
|
||||
/** Gets a child item of this item, if any. */
|
||||
ItemNode getAChild() { this = result.getImmediateParent() }
|
||||
|
||||
/** Gets the immediately enclosing module (or source file) of this item. */
|
||||
pragma[nomagic]
|
||||
ModuleLikeNode getImmediateParentModule() {
|
||||
@@ -339,10 +342,13 @@ abstract class ItemNode extends Locatable {
|
||||
typeImplEdge(this, _, name, kind, result, useOpt)
|
||||
or
|
||||
// trait items with default implementations made available in an implementation
|
||||
exists(ImplItemNodeImpl impl, ItemNode trait |
|
||||
exists(ImplItemNodeImpl impl, TraitItemNode trait |
|
||||
this = impl and
|
||||
trait = impl.resolveTraitTyCand() and
|
||||
result = trait.getASuccessor(name, kind, useOpt) and
|
||||
// do not inherit default implementations from super traits; those are inherited by
|
||||
// their `impl` blocks
|
||||
result = trait.getAssocItem(name) and
|
||||
result.(AssocItemNode).hasImplementation() and
|
||||
kind.isExternalOrBoth() and
|
||||
not impl.hasAssocItem(name)
|
||||
@@ -402,8 +408,14 @@ abstract class ItemNode extends Locatable {
|
||||
this instanceof SourceFile and
|
||||
builtin(name, result)
|
||||
or
|
||||
name = "Self" and
|
||||
this = result.(ImplOrTraitItemNode).getAnItemInSelfScope()
|
||||
exists(ImplOrTraitItemNode i |
|
||||
name = "Self" and
|
||||
this = i.getAnItemInSelfScope()
|
||||
|
|
||||
result = i.(Trait)
|
||||
or
|
||||
result = i.(ImplItemNodeImpl).resolveSelfTyCand()
|
||||
)
|
||||
or
|
||||
name = "crate" and
|
||||
this = result.(CrateItemNode).getASourceFile()
|
||||
@@ -734,7 +746,7 @@ abstract class ImplOrTraitItemNode extends ItemNode {
|
||||
Path getASelfPath() {
|
||||
Stages::PathResolutionStage::ref() and
|
||||
isUnqualifiedSelfPath(result) and
|
||||
this = unqualifiedPathLookup(result, _, _)
|
||||
result = this.getAnItemInSelfScope().getADescendant()
|
||||
}
|
||||
|
||||
/** Gets an associated item belonging to this trait or `impl` block. */
|
||||
@@ -960,7 +972,7 @@ private class ImplItemNodeImpl extends ImplItemNode {
|
||||
result = this.resolveSelfTyBuiltin()
|
||||
}
|
||||
|
||||
TraitItemNode resolveTraitTyCand() { result = resolvePathCand(this.getTraitPath()) }
|
||||
TraitItemNodeImpl resolveTraitTyCand() { result = resolvePathCand(this.getTraitPath()) }
|
||||
}
|
||||
|
||||
private class StructItemNode extends TypeItemNode, ParameterizableItemNode instanceof Struct {
|
||||
@@ -1813,15 +1825,7 @@ private module DollarCrateResolution {
|
||||
|
||||
pragma[nomagic]
|
||||
private ItemNode resolvePathCand0(PathExt path, Namespace ns) {
|
||||
exists(ItemNode res |
|
||||
res = unqualifiedPathLookup(path, ns, _) and
|
||||
if
|
||||
not any(PathExt parent).getQualifier() = path and
|
||||
isUnqualifiedSelfPath(path) and
|
||||
res instanceof ImplItemNode
|
||||
then result = res.(ImplItemNodeImpl).resolveSelfTyCand()
|
||||
else result = res
|
||||
)
|
||||
result = unqualifiedPathLookup(path, ns, _)
|
||||
or
|
||||
DollarCrateResolution::resolveDollarCrate(path, result) and
|
||||
ns = result.getNamespace()
|
||||
|
||||
@@ -382,6 +382,8 @@ TypeParamTypeParameter getPtrTypeParameter() {
|
||||
/** A type parameter. */
|
||||
abstract class TypeParameter extends Type {
|
||||
override TypeParameter getPositionalTypeParameter(int i) { none() }
|
||||
|
||||
abstract ItemNode getDeclaringItem();
|
||||
}
|
||||
|
||||
private class RawTypeParameter = @type_param or @trait or @type_alias or @impl_trait_type_repr;
|
||||
@@ -400,6 +402,8 @@ class TypeParamTypeParameter extends TypeParameter, TTypeParamTypeParameter {
|
||||
|
||||
TypeParam getTypeParam() { result = typeParam }
|
||||
|
||||
override ItemNode getDeclaringItem() { result.getTypeParam(_) = typeParam }
|
||||
|
||||
override string toString() { result = typeParam.toString() }
|
||||
|
||||
override Location getLocation() { result = typeParam.getLocation() }
|
||||
@@ -433,6 +437,8 @@ class AssociatedTypeTypeParameter extends TypeParameter, TAssociatedTypeTypePara
|
||||
/** Gets the trait that contains this associated type declaration. */
|
||||
TraitItemNode getTrait() { result.getAnAssocItem() = typeAlias }
|
||||
|
||||
override ItemNode getDeclaringItem() { result = this.getTrait() }
|
||||
|
||||
override string toString() { result = typeAlias.getName().getText() }
|
||||
|
||||
override Location getLocation() { result = typeAlias.getLocation() }
|
||||
@@ -465,6 +471,8 @@ class DynTraitTypeParameter extends TypeParameter, TDynTraitTypeParameter {
|
||||
result = [this.getTypeParam().toString(), this.getTypeAlias().getName().toString()]
|
||||
}
|
||||
|
||||
override ItemNode getDeclaringItem() { none() }
|
||||
|
||||
override string toString() { result = "dyn(" + this.toStringInner() + ")" }
|
||||
|
||||
override Location getLocation() { result = n.getLocation() }
|
||||
@@ -480,6 +488,8 @@ class ImplTraitTypeParameter extends TypeParameter, TImplTraitTypeParameter {
|
||||
|
||||
ImplTraitTypeRepr getImplTraitTypeRepr() { result = implTrait }
|
||||
|
||||
override ItemNode getDeclaringItem() { none() }
|
||||
|
||||
override string toString() { result = "impl(" + typeParam.toString() + ")" }
|
||||
|
||||
override Location getLocation() { result = typeParam.getLocation() }
|
||||
@@ -499,6 +509,8 @@ class SelfTypeParameter extends TypeParameter, TSelfTypeParameter {
|
||||
|
||||
Trait getTrait() { result = trait }
|
||||
|
||||
override ItemNode getDeclaringItem() { result = trait }
|
||||
|
||||
override string toString() { result = "Self [" + trait.toString() + "]" }
|
||||
|
||||
override Location getLocation() { result = trait.getLocation() }
|
||||
@@ -526,6 +538,8 @@ class ImplTraitTypeTypeParameter extends ImplTraitType, TypeParameter {
|
||||
|
||||
ImplTraitTypeTypeParameter() { impl = function.getAParam().getTypeRepr() }
|
||||
|
||||
override ItemNode getDeclaringItem() { none() }
|
||||
|
||||
override Function getFunction() { result = function }
|
||||
|
||||
override TypeParameter getPositionalTypeParameter(int i) { none() }
|
||||
|
||||
@@ -11,7 +11,14 @@ import TypeInference::Consistency
|
||||
|
||||
query predicate illFormedTypeMention(TypeMention tm) {
|
||||
Consistency::illFormedTypeMention(tm) and
|
||||
not tm instanceof PathTypeReprMention and // avoid overlap with `PathTypeMention`
|
||||
// avoid overlap with `PathTypeMention`
|
||||
not tm instanceof PathTypeReprMention and
|
||||
// known limitation for type mentions that would mention an escaping type parameter
|
||||
not tm =
|
||||
any(PathTypeMention ptm |
|
||||
exists(ptm.resolvePathTypeAt(TypePath::nil())) and
|
||||
not exists(ptm.resolveType())
|
||||
) and
|
||||
// Only include inconsistencies in the source, as we otherwise get
|
||||
// inconsistencies from library code in every project.
|
||||
tm.fromSource()
|
||||
|
||||
@@ -77,7 +77,19 @@ class SliceTypeReprMention extends TypeMention instanceof SliceTypeRepr {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class PathTypeMention extends TypeMention, Path { }
|
||||
abstract class PathTypeMention extends TypeMention, Path {
|
||||
abstract Type resolvePathTypeAt(TypePath typePath);
|
||||
|
||||
final override Type resolveTypeAt(TypePath typePath) {
|
||||
result = this.resolvePathTypeAt(typePath) and
|
||||
(
|
||||
not result instanceof TypeParameter
|
||||
or
|
||||
// Prevent type parameters from escaping their scope
|
||||
this = result.(TypeParameter).getDeclaringItem().getAChild*().getADescendant()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
class AliasPathTypeMention extends PathTypeMention {
|
||||
TypeAlias resolved;
|
||||
@@ -94,7 +106,7 @@ class AliasPathTypeMention extends PathTypeMention {
|
||||
* Holds if this path resolved to a type alias with a rhs. that has the
|
||||
* resulting type at `typePath`.
|
||||
*/
|
||||
override Type resolveTypeAt(TypePath typePath) {
|
||||
override Type resolvePathTypeAt(TypePath typePath) {
|
||||
result = rhs.resolveTypeAt(typePath) and
|
||||
not result = pathGetTypeParameter(resolved, _)
|
||||
or
|
||||
@@ -275,7 +287,7 @@ class NonAliasPathTypeMention extends PathTypeMention {
|
||||
result = TAssociatedTypeTypeParameter(resolved)
|
||||
}
|
||||
|
||||
override Type resolveTypeAt(TypePath typePath) {
|
||||
override Type resolvePathTypeAt(TypePath typePath) {
|
||||
typePath.isEmpty() and
|
||||
result = this.resolveRootType()
|
||||
or
|
||||
@@ -307,7 +319,9 @@ class ImplSelfMention extends PathTypeMention {
|
||||
|
||||
ImplSelfMention() { this = impl.getASelfPath() }
|
||||
|
||||
override Type resolveTypeAt(TypePath typePath) { result = resolveImplSelfTypeAt(impl, typePath) }
|
||||
override Type resolvePathTypeAt(TypePath typePath) {
|
||||
result = resolveImplSelfTypeAt(impl, typePath)
|
||||
}
|
||||
}
|
||||
|
||||
class PathTypeReprMention extends TypeMention, PathTypeRepr {
|
||||
|
||||
@@ -4,4 +4,3 @@ multipleCallTargets
|
||||
| main.rs:369:9:371:16 | ...::f(...) |
|
||||
| main.rs:450:9:454:16 | ...::f(...) |
|
||||
| main.rs:455:9:459:16 | ...::f(...) |
|
||||
| main.rs:460:9:460:16 | ...::g(...) |
|
||||
|
||||
@@ -437,9 +437,9 @@ mod m16 {
|
||||
> // $ item=I89
|
||||
for S { // $ item=I90
|
||||
fn f(&self) -> S { // $ item=I90
|
||||
Self::g(&self); // $ MISSING: item=I92 $ SPURIOUS: item=I85
|
||||
Self::g(&self); // $ item=I92
|
||||
println!("m16::<S as Trait2<S>>::f"); // $ item=println
|
||||
Self::c // $ MISSING: item=I95
|
||||
Self::c // $ item=I95
|
||||
} // I93
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ mod m16 {
|
||||
S // $ item=I90
|
||||
> // $ item=I89
|
||||
>::f(&x); // $ MISSING: item=I93
|
||||
S::g(&x); // $ item=I92 $ SPURIOUS: item=I85
|
||||
S::g(&x); // $ item=I92
|
||||
x.g(); // $ item=I92
|
||||
S::h(&x); // $ item=I96
|
||||
x.h(); // $ item=I96
|
||||
@@ -485,7 +485,7 @@ mod m16 {
|
||||
|
||||
impl Trait4 for S2 { // $ item=Trait4 item=S2
|
||||
fn g(&self) {
|
||||
Self::f(&self); // $ MISSING: item=S2asTrait3::f
|
||||
Self::f(&self); // $ item=S2asTrait3::f
|
||||
S2::f(&self); // $ item=S2asTrait3::f
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ resolvePath
|
||||
| main.rs:169:22:169:29 | MyStruct | main.rs:162:5:162:22 | struct MyStruct |
|
||||
| main.rs:171:13:171:19 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:172:13:172:13 | f | main.rs:164:5:166:5 | fn f |
|
||||
| main.rs:173:13:173:16 | Self | main.rs:168:5:179:5 | impl MyTrait for MyStruct { ... } |
|
||||
| main.rs:173:13:173:16 | Self | main.rs:162:5:162:22 | struct MyStruct |
|
||||
| main.rs:173:13:173:19 | ...::g | main.rs:176:9:178:9 | fn g |
|
||||
| main.rs:177:13:177:19 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:182:10:182:17 | MyStruct | main.rs:162:5:162:22 | struct MyStruct |
|
||||
@@ -197,7 +197,7 @@ resolvePath
|
||||
| main.rs:341:10:341:15 | Trait1 | main.rs:307:5:311:5 | trait Trait1 |
|
||||
| main.rs:342:11:342:11 | S | main.rs:338:5:338:13 | struct S |
|
||||
| main.rs:344:13:344:19 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:345:13:345:16 | Self | main.rs:340:5:352:5 | impl Trait1 for S { ... } |
|
||||
| main.rs:345:13:345:16 | Self | main.rs:338:5:338:13 | struct S |
|
||||
| main.rs:345:13:345:19 | ...::g | main.rs:349:9:351:9 | fn g |
|
||||
| main.rs:350:13:350:19 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:355:10:355:15 | Trait2 | main.rs:313:5:321:5 | trait Trait2 |
|
||||
@@ -230,11 +230,11 @@ resolvePath
|
||||
| main.rs:418:11:418:11 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:419:24:419:24 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:420:13:420:19 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:421:13:421:16 | Self | main.rs:414:5:432:5 | impl Trait1::<...> for S { ... } |
|
||||
| main.rs:421:13:421:16 | Self | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:421:13:421:19 | ...::g | main.rs:425:9:428:9 | fn g |
|
||||
| main.rs:425:24:425:24 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:426:13:426:19 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:427:13:427:16 | Self | main.rs:414:5:432:5 | impl Trait1::<...> for S { ... } |
|
||||
| main.rs:427:13:427:16 | Self | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:427:13:427:19 | ...::c | main.rs:430:9:431:9 | Const |
|
||||
| main.rs:430:18:430:18 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:430:22:430:22 | S | main.rs:412:5:412:13 | struct S |
|
||||
@@ -242,10 +242,11 @@ resolvePath
|
||||
| main.rs:436:7:436:7 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:438:11:438:11 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:439:24:439:24 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:440:13:440:16 | Self | main.rs:434:5:444:5 | impl Trait2::<...> for S { ... } |
|
||||
| main.rs:440:13:440:19 | ...::g | main.rs:384:9:386:9 | fn g |
|
||||
| main.rs:440:13:440:16 | Self | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:440:13:440:19 | ...::g | main.rs:425:9:428:9 | fn g |
|
||||
| main.rs:441:13:441:19 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:442:13:442:16 | Self | main.rs:434:5:444:5 | impl Trait2::<...> for S { ... } |
|
||||
| main.rs:442:13:442:16 | Self | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:442:13:442:19 | ...::c | main.rs:430:9:431:9 | Const |
|
||||
| main.rs:448:9:448:15 | println | {EXTERNAL LOCATION} | MacroRules |
|
||||
| main.rs:449:17:449:17 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:450:10:450:10 | S | main.rs:412:5:412:13 | struct S |
|
||||
@@ -255,7 +256,6 @@ resolvePath
|
||||
| main.rs:456:14:458:11 | Trait2::<...> | main.rs:397:5:410:5 | trait Trait2 |
|
||||
| main.rs:457:13:457:13 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:460:9:460:9 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:460:9:460:12 | ...::g | main.rs:384:9:386:9 | fn g |
|
||||
| main.rs:460:9:460:12 | ...::g | main.rs:425:9:428:9 | fn g |
|
||||
| main.rs:462:9:462:9 | S | main.rs:412:5:412:13 | struct S |
|
||||
| main.rs:462:9:462:12 | ...::h | main.rs:388:9:391:9 | fn h |
|
||||
@@ -268,7 +268,8 @@ resolvePath
|
||||
| main.rs:482:21:482:22 | S2 | main.rs:480:5:480:14 | struct S2 |
|
||||
| main.rs:486:10:486:15 | Trait4 | main.rs:476:5:478:5 | trait Trait4 |
|
||||
| main.rs:486:21:486:22 | S2 | main.rs:480:5:480:14 | struct S2 |
|
||||
| main.rs:488:13:488:16 | Self | main.rs:486:5:491:5 | impl Trait4 for S2 { ... } |
|
||||
| main.rs:488:13:488:16 | Self | main.rs:480:5:480:14 | struct S2 |
|
||||
| main.rs:488:13:488:19 | ...::f | main.rs:482:26:483:23 | fn f |
|
||||
| main.rs:489:13:489:14 | S2 | main.rs:480:5:480:14 | struct S2 |
|
||||
| main.rs:489:13:489:17 | ...::f | main.rs:482:26:483:23 | fn f |
|
||||
| main.rs:506:14:506:16 | Foo | main.rs:496:9:498:9 | trait Foo |
|
||||
@@ -385,17 +386,17 @@ resolvePath
|
||||
| main.rs:763:13:763:17 | Error | main.rs:759:13:759:17 | Error |
|
||||
| main.rs:766:22:769:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:767:13:767:17 | Input | main.rs:758:13:758:17 | Input |
|
||||
| main.rs:768:13:768:16 | Self | main.rs:756:5:788:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:768:13:768:16 | Self | main.rs:751:5:754:5 | struct MyImpl |
|
||||
| main.rs:768:13:768:23 | ...::Error | main.rs:770:11:774:9 | type Error |
|
||||
| main.rs:771:22:773:9 | Option::<...> | {EXTERNAL LOCATION} | enum Option |
|
||||
| main.rs:772:11:772:15 | Error | main.rs:759:13:759:17 | Error |
|
||||
| main.rs:776:13:776:17 | Input | main.rs:758:13:758:17 | Input |
|
||||
| main.rs:781:19:781:22 | Self | main.rs:756:5:788:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:781:19:781:22 | Self | main.rs:751:5:754:5 | struct MyImpl |
|
||||
| main.rs:781:19:781:29 | ...::Input | main.rs:766:9:770:9 | type Input |
|
||||
| main.rs:782:14:785:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result |
|
||||
| main.rs:783:13:783:16 | Self | main.rs:756:5:788:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:783:13:783:16 | Self | main.rs:751:5:754:5 | struct MyImpl |
|
||||
| main.rs:783:13:783:24 | ...::Output | main.rs:774:11:777:9 | type Output |
|
||||
| main.rs:784:13:784:16 | Self | main.rs:756:5:788:5 | impl Reduce for MyImpl::<...> { ... } |
|
||||
| main.rs:784:13:784:16 | Self | main.rs:751:5:754:5 | struct MyImpl |
|
||||
| main.rs:784:13:784:23 | ...::Error | main.rs:770:11:774:9 | type Error |
|
||||
| main.rs:791:5:791:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
| main.rs:791:11:791:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) |
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
multipleCallTargets
|
||||
| test.rs:288:7:288:36 | ... .as_str() |
|
||||
@@ -5,10 +5,13 @@ multipleCallTargets
|
||||
| dereference.rs:184:17:184:30 | ... .foo() |
|
||||
| dereference.rs:186:17:186:25 | S.bar(...) |
|
||||
| dereference.rs:187:17:187:29 | S.bar(...) |
|
||||
| main.rs:590:9:590:18 | ...::m(...) |
|
||||
| main.rs:2634:13:2634:31 | ...::from(...) |
|
||||
| main.rs:2635:13:2635:31 | ...::from(...) |
|
||||
| main.rs:2636:13:2636:31 | ...::from(...) |
|
||||
| main.rs:2642:13:2642:31 | ...::from(...) |
|
||||
| main.rs:2643:13:2643:31 | ...::from(...) |
|
||||
| main.rs:2644:13:2644:31 | ...::from(...) |
|
||||
multiplePathResolutions
|
||||
| main.rs:2463:41:2463:52 | ...::Output |
|
||||
| main.rs:2472:38:2472:49 | ...::Output |
|
||||
| main.rs:2484:42:2484:53 | ...::Output |
|
||||
|
||||
@@ -587,7 +587,7 @@ mod impl_overlap {
|
||||
println!("{:?}", S3::m(&w, x)); // $ target=S3<T>::m
|
||||
|
||||
S4.m(); // $ target=<S4_as_MyTrait1>::m
|
||||
S4::m(&S4); // $ target=<S4_as_MyTrait1>::m $ SPURIOUS: target=MyTrait1::m
|
||||
S4::m(&S4); // $ target=<S4_as_MyTrait1>::m
|
||||
S5(0i32).m(); // $ target=<S5<i32>_as_MyTrait1>::m
|
||||
S5::m(&S5(0i32)); // $ target=<S5<i32>_as_MyTrait1>::m
|
||||
S5(true).m(); // $ target=MyTrait1::m
|
||||
|
||||
@@ -2615,8 +2615,6 @@ inferType
|
||||
| main.rs:1025:18:1025:49 | { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1025:26:1025:27 | x3 | | main.rs:943:5:944:13 | S |
|
||||
| main.rs:1025:26:1025:40 | x3.putTwo(...) | | main.rs:892:5:895:5 | Wrapper |
|
||||
| main.rs:1025:26:1025:40 | x3.putTwo(...) | A | main.rs:963:36:963:50 | AssociatedParam |
|
||||
| main.rs:1025:26:1025:49 | ... .unwrap() | | main.rs:963:36:963:50 | AssociatedParam |
|
||||
| main.rs:1025:36:1025:36 | 2 | | {EXTERNAL LOCATION} | i32 |
|
||||
| main.rs:1025:39:1025:39 | 3 | | {EXTERNAL LOCATION} | i32 |
|
||||
| main.rs:1027:20:1027:20 | S | | main.rs:943:5:944:13 | S |
|
||||
@@ -2658,17 +2656,13 @@ inferType
|
||||
| main.rs:1050:24:1050:28 | SelfParam | TRef | main.rs:1048:5:1051:5 | Self [trait Subtrait] |
|
||||
| main.rs:1059:23:1059:27 | SelfParam | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1059:23:1059:27 | SelfParam | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] |
|
||||
| main.rs:1059:30:1059:31 | c1 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1059:49:1059:50 | c2 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1059:68:1062:9 | { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1060:13:1060:16 | self | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1060:13:1060:16 | self | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] |
|
||||
| main.rs:1060:13:1060:27 | self.insert(...) | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1060:25:1060:26 | c1 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1061:13:1061:16 | self | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1061:13:1061:16 | self | TRef | main.rs:1053:5:1063:5 | Self [trait Subtrait2] |
|
||||
| main.rs:1061:13:1061:27 | self.insert(...) | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1061:25:1061:26 | c2 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1069:19:1069:23 | SelfParam | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1069:19:1069:23 | SelfParam | TRef | main.rs:1065:5:1065:24 | MyType |
|
||||
| main.rs:1069:19:1069:23 | SelfParam | TRef.T | main.rs:1067:10:1067:10 | T |
|
||||
@@ -2693,25 +2687,17 @@ inferType
|
||||
| main.rs:1077:15:1077:18 | self | TRef.T | main.rs:1074:10:1074:17 | T |
|
||||
| main.rs:1081:33:1081:36 | item | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1081:33:1081:36 | item | TRef | main.rs:1081:20:1081:30 | T |
|
||||
| main.rs:1081:57:1083:5 | { ... } | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1082:9:1082:12 | item | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1082:9:1082:12 | item | TRef | main.rs:1081:20:1081:30 | T |
|
||||
| main.rs:1082:9:1082:26 | item.get_content() | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1085:35:1085:38 | item | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1085:35:1085:38 | item | TRef | main.rs:1085:21:1085:32 | T |
|
||||
| main.rs:1085:45:1085:46 | c1 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1085:61:1085:62 | c2 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1085:77:1085:78 | c3 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1085:93:1088:5 | { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1086:9:1086:12 | item | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1086:9:1086:12 | item | TRef | main.rs:1085:21:1085:32 | T |
|
||||
| main.rs:1086:9:1086:23 | item.insert(...) | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1086:21:1086:22 | c1 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1087:9:1087:12 | item | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1087:9:1087:12 | item | TRef | main.rs:1085:21:1085:32 | T |
|
||||
| main.rs:1087:9:1087:31 | item.insert_two(...) | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1087:25:1087:26 | c2 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1087:29:1087:30 | c3 | | main.rs:1043:9:1043:21 | Content |
|
||||
| main.rs:1090:15:1096:5 | { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:1091:13:1091:17 | item1 | | main.rs:1065:5:1065:24 | MyType |
|
||||
| main.rs:1091:13:1091:17 | item1 | T | {EXTERNAL LOCATION} | i64 |
|
||||
@@ -3980,7 +3966,6 @@ inferType
|
||||
| main.rs:1762:17:1762:20 | self | TRef.TSlice | main.rs:1760:14:1760:23 | T |
|
||||
| main.rs:1762:17:1762:27 | self.get(...) | | {EXTERNAL LOCATION} | Option |
|
||||
| main.rs:1762:17:1762:27 | self.get(...) | T | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1762:17:1762:27 | self.get(...) | T.TRef | main.rs:1760:14:1760:23 | T |
|
||||
| main.rs:1762:17:1762:36 | ... .unwrap() | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:1762:17:1762:36 | ... .unwrap() | TRef | main.rs:1760:14:1760:23 | T |
|
||||
| main.rs:1762:26:1762:26 | 0 | | {EXTERNAL LOCATION} | i32 |
|
||||
@@ -4626,9 +4611,7 @@ inferType
|
||||
| main.rs:2076:44:2076:50 | other.y | | {EXTERNAL LOCATION} | i64 |
|
||||
| main.rs:2080:26:2080:26 | a | | main.rs:2080:18:2080:23 | T |
|
||||
| main.rs:2080:32:2080:32 | b | | main.rs:2080:18:2080:23 | T |
|
||||
| main.rs:2080:51:2082:5 | { ... } | | {EXTERNAL LOCATION} | Output |
|
||||
| main.rs:2081:9:2081:9 | a | | main.rs:2080:18:2080:23 | T |
|
||||
| main.rs:2081:9:2081:13 | ... + ... | | {EXTERNAL LOCATION} | Output |
|
||||
| main.rs:2081:13:2081:13 | b | | main.rs:2080:18:2080:23 | T |
|
||||
| main.rs:2084:16:2215:5 | { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:2088:13:2088:18 | i64_eq | | {EXTERNAL LOCATION} | bool |
|
||||
@@ -5138,9 +5121,7 @@ inferType
|
||||
| main.rs:2388:23:2388:23 | 0 | | {EXTERNAL LOCATION} | i32 |
|
||||
| main.rs:2391:37:2391:37 | a | | main.rs:2391:20:2391:34 | T |
|
||||
| main.rs:2391:43:2391:43 | b | | {EXTERNAL LOCATION} | usize |
|
||||
| main.rs:2394:5:2396:5 | { ... } | | {EXTERNAL LOCATION} | Output |
|
||||
| main.rs:2395:9:2395:9 | a | | main.rs:2391:20:2391:34 | T |
|
||||
| main.rs:2395:9:2395:12 | a[b] | | {EXTERNAL LOCATION} | Output |
|
||||
| main.rs:2395:11:2395:11 | b | | {EXTERNAL LOCATION} | usize |
|
||||
| main.rs:2398:16:2409:5 | { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:2399:17:2399:19 | vec | | main.rs:2363:5:2366:5 | MyVec |
|
||||
@@ -5219,9 +5200,7 @@ inferType
|
||||
| main.rs:2463:25:2463:29 | other | | main.rs:2457:5:2457:19 | S |
|
||||
| main.rs:2463:25:2463:29 | other | T | main.rs:2459:10:2459:17 | T |
|
||||
| main.rs:2463:54:2465:9 | { ... } | | main.rs:2457:5:2457:19 | S |
|
||||
| main.rs:2463:54:2465:9 | { ... } | T | main.rs:2420:9:2420:20 | Output |
|
||||
| main.rs:2464:13:2464:39 | S(...) | | main.rs:2457:5:2457:19 | S |
|
||||
| main.rs:2464:13:2464:39 | S(...) | T | main.rs:2420:9:2420:20 | Output |
|
||||
| main.rs:2464:15:2464:22 | (...) | | main.rs:2459:10:2459:17 | T |
|
||||
| main.rs:2464:16:2464:19 | self | | main.rs:2457:5:2457:19 | S |
|
||||
| main.rs:2464:16:2464:19 | self | T | main.rs:2459:10:2459:17 | T |
|
||||
@@ -5233,9 +5212,7 @@ inferType
|
||||
| main.rs:2472:19:2472:22 | SelfParam | T | main.rs:2468:10:2468:17 | T |
|
||||
| main.rs:2472:25:2472:29 | other | | main.rs:2468:10:2468:17 | T |
|
||||
| main.rs:2472:51:2474:9 | { ... } | | main.rs:2457:5:2457:19 | S |
|
||||
| main.rs:2472:51:2474:9 | { ... } | T | main.rs:2420:9:2420:20 | Output |
|
||||
| main.rs:2473:13:2473:37 | S(...) | | main.rs:2457:5:2457:19 | S |
|
||||
| main.rs:2473:13:2473:37 | S(...) | T | main.rs:2420:9:2420:20 | Output |
|
||||
| main.rs:2473:15:2473:22 | (...) | | main.rs:2468:10:2468:17 | T |
|
||||
| main.rs:2473:16:2473:19 | self | | main.rs:2457:5:2457:19 | S |
|
||||
| main.rs:2473:16:2473:19 | self | T | main.rs:2468:10:2468:17 | T |
|
||||
@@ -5481,7 +5458,6 @@ inferType
|
||||
| main.rs:2627:43:2627:47 | "baz" | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2627:43:2627:47 | "baz" | TRef | {EXTERNAL LOCATION} | str |
|
||||
| main.rs:2628:9:2628:29 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:2628:13:2628:13 | s | | {EXTERNAL LOCATION} | Item |
|
||||
| main.rs:2628:13:2628:13 | s | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2628:13:2628:13 | s | TRef | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2628:13:2628:13 | s | TRef.TRef | {EXTERNAL LOCATION} | str |
|
||||
@@ -5494,7 +5470,6 @@ inferType
|
||||
| main.rs:2628:19:2628:26 | strings1 | TArray.TRef | {EXTERNAL LOCATION} | str |
|
||||
| main.rs:2628:28:2628:29 | { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:2629:9:2629:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:2629:13:2629:13 | s | | {EXTERNAL LOCATION} | Item |
|
||||
| main.rs:2629:13:2629:13 | s | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2629:13:2629:13 | s | TRef | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2629:13:2629:13 | s | TRef.TRef | {EXTERNAL LOCATION} | str |
|
||||
@@ -5549,7 +5524,6 @@ inferType
|
||||
| main.rs:2644:26:2644:30 | "baz" | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2644:26:2644:30 | "baz" | TRef | {EXTERNAL LOCATION} | str |
|
||||
| main.rs:2646:9:2646:28 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:2646:13:2646:13 | s | | {EXTERNAL LOCATION} | Item |
|
||||
| main.rs:2646:13:2646:13 | s | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2646:13:2646:13 | s | TRef | {EXTERNAL LOCATION} | String |
|
||||
| main.rs:2646:18:2646:25 | strings3 | | {EXTERNAL LOCATION} | & |
|
||||
@@ -5607,7 +5581,6 @@ inferType
|
||||
| main.rs:2661:13:2661:22 | range_full | | {EXTERNAL LOCATION} | RangeFull |
|
||||
| main.rs:2661:26:2661:27 | .. | | {EXTERNAL LOCATION} | RangeFull |
|
||||
| main.rs:2662:9:2662:51 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () |
|
||||
| main.rs:2662:13:2662:13 | i | | {EXTERNAL LOCATION} | Item |
|
||||
| main.rs:2662:18:2662:48 | &... | | {EXTERNAL LOCATION} | & |
|
||||
| main.rs:2662:19:2662:36 | [...] | | {EXTERNAL LOCATION} | [;] |
|
||||
| main.rs:2662:19:2662:36 | [...] | TArray | {EXTERNAL LOCATION} | i64 |
|
||||
|
||||
Reference in New Issue
Block a user