Skip to content

Commit 3ab0ade

Browse files
authored
Merge pull request #21010 from hvitved/rust/type-inference-fix-blowup
Rust: Strengthen `isNotInstantiationOf` uses
2 parents 000f2c3 + d5a95a8 commit 3ab0ade

File tree

6 files changed

+198
-100
lines changed

6 files changed

+198
-100
lines changed

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,11 +1430,19 @@ private module MethodResolution {
14301430
* Holds if the method inside `i` with matching name and arity can be ruled
14311431
* out as a target of this call, because the candidate receiver type represented
14321432
* by `derefChain` and `borrow` is incompatible with the `self` parameter type.
1433+
*
1434+
* The types are incompatible because they disagree on a concrete type somewhere
1435+
* inside `root`.
14331436
*/
14341437
pragma[nomagic]
1435-
private predicate hasIncompatibleTarget(ImplOrTraitItemNode i, string derefChain, boolean borrow) {
1436-
ReceiverIsInstantiationOfSelfParam::argIsNotInstantiationOf(MkMethodCallCand(this, derefChain,
1437-
borrow), i, _)
1438+
private predicate hasIncompatibleTarget(
1439+
ImplOrTraitItemNode i, string derefChain, boolean borrow, Type root
1440+
) {
1441+
exists(TypePath path |
1442+
ReceiverIsInstantiationOfSelfParam::argIsNotInstantiationOf(MkMethodCallCand(this,
1443+
derefChain, borrow), i, _, path) and
1444+
path.isCons(root.getATypeParameter(), _)
1445+
)
14381446
}
14391447

14401448
/**
@@ -1448,7 +1456,7 @@ private module MethodResolution {
14481456
ImplItemNode impl, string derefChain, boolean borrow
14491457
) {
14501458
ReceiverIsNotInstantiationOfBlanketLikeSelfParam::argIsNotInstantiationOf(MkMethodCallCand(this,
1451-
derefChain, borrow), impl, _)
1459+
derefChain, borrow), impl, _, _)
14521460
or
14531461
ReceiverSatisfiesBlanketLikeConstraint::dissatisfiesBlanketConstraint(MkMethodCallCand(this,
14541462
derefChain, borrow), impl)
@@ -1479,7 +1487,7 @@ private module MethodResolution {
14791487
forall(ImplOrTraitItemNode i |
14801488
methodCallNonBlanketCandidate(this, _, i, _, strippedTypePath, strippedType)
14811489
|
1482-
this.hasIncompatibleTarget(i, derefChain, borrow)
1490+
this.hasIncompatibleTarget(i, derefChain, borrow, strippedType)
14831491
)
14841492
}
14851493

@@ -1818,7 +1826,7 @@ private module MethodResolution {
18181826
*/
18191827
pragma[nomagic]
18201828
private predicate hasIncompatibleInherentTarget(Impl impl) {
1821-
ReceiverIsNotInstantiationOfInherentSelfParam::argIsNotInstantiationOf(this, impl, _)
1829+
ReceiverIsNotInstantiationOfInherentSelfParam::argIsNotInstantiationOf(this, impl, _, _)
18221830
}
18231831

18241832
/**

rust/ql/lib/codeql/rust/internal/typeinference/FunctionType.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,10 @@ module ArgIsInstantiationOf<
256256
ArgSubstIsInstantiationOf::isInstantiationOf(arg, i, constraint)
257257
}
258258

259-
predicate argIsNotInstantiationOf(Arg arg, ImplOrTraitItemNode i, AssocFunctionType constraint) {
260-
ArgSubstIsInstantiationOf::isNotInstantiationOf(arg, i, constraint)
259+
predicate argIsNotInstantiationOf(
260+
Arg arg, ImplOrTraitItemNode i, AssocFunctionType constraint, TypePath path
261+
) {
262+
ArgSubstIsInstantiationOf::isNotInstantiationOf(arg, i, constraint, path)
261263
}
262264
}
263265

rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ multipleResolvedTargets
3030
| main.rs:2642:13:2642:31 | ...::from(...) |
3131
| main.rs:2643:13:2643:31 | ...::from(...) |
3232
| main.rs:2644:13:2644:31 | ...::from(...) |
33+
| main.rs:3067:13:3067:17 | x.f() |
3334
| pattern_matching.rs:273:13:273:27 | * ... |
3435
| pattern_matching.rs:273:14:273:27 | * ... |

rust/ql/test/library-tests/type-inference/main.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3036,6 +3036,39 @@ mod context_typed {
30363036
}
30373037
}
30383038

3039+
mod literal_overlap {
3040+
trait MyTrait {
3041+
fn f(self) -> Self;
3042+
}
3043+
3044+
impl MyTrait for i32 {
3045+
// i32f
3046+
fn f(self) -> Self {
3047+
self
3048+
}
3049+
}
3050+
3051+
impl MyTrait for usize {
3052+
// usizef
3053+
fn f(self) -> Self {
3054+
self
3055+
}
3056+
}
3057+
3058+
impl<T> MyTrait for &T {
3059+
// Reff
3060+
fn f(self) -> Self {
3061+
self
3062+
}
3063+
}
3064+
3065+
pub fn f() -> usize {
3066+
let mut x = 0;
3067+
x = x.f(); // $ target=usizef $ SPURIOUS: target=i32f
3068+
x
3069+
}
3070+
}
3071+
30393072
mod blanket_impl;
30403073
mod closure;
30413074
mod dereference;

rust/ql/test/library-tests/type-inference/type-inference.expected

Lines changed: 125 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,48 +3529,62 @@ inferCertainType
35293529
| main.rs:3032:9:3032:9 | x | A | {EXTERNAL LOCATION} | Global |
35303530
| main.rs:3035:9:3035:9 | x | | {EXTERNAL LOCATION} | Vec |
35313531
| main.rs:3035:9:3035:9 | x | A | {EXTERNAL LOCATION} | Global |
3532-
| main.rs:3044:11:3079:1 | { ... } | | {EXTERNAL LOCATION} | () |
3533-
| main.rs:3045:5:3045:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3534-
| main.rs:3046:5:3046:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
3535-
| main.rs:3047:5:3047:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
3536-
| main.rs:3047:20:3047:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
3537-
| main.rs:3047:41:3047:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
3538-
| main.rs:3048:5:3048:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3539-
| main.rs:3049:5:3049:41 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3540-
| main.rs:3050:5:3050:45 | ...::test(...) | | {EXTERNAL LOCATION} | () |
3541-
| main.rs:3051:5:3051:30 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3542-
| main.rs:3052:5:3052:33 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3543-
| main.rs:3053:5:3053:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3544-
| main.rs:3054:5:3054:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3545-
| main.rs:3055:5:3055:32 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3546-
| main.rs:3056:5:3056:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3547-
| main.rs:3057:5:3057:36 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3548-
| main.rs:3058:5:3058:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3549-
| main.rs:3059:5:3059:29 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3550-
| main.rs:3060:5:3060:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3551-
| main.rs:3061:5:3061:24 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3552-
| main.rs:3062:5:3062:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3553-
| main.rs:3063:5:3063:18 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3554-
| main.rs:3064:5:3064:15 | ...::f(...) | | {EXTERNAL LOCATION} | dyn Future |
3555-
| main.rs:3064:5:3064:15 | ...::f(...) | dyn(Output) | {EXTERNAL LOCATION} | () |
3556-
| main.rs:3065:5:3065:19 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3557-
| main.rs:3066:5:3066:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3558-
| main.rs:3067:5:3067:14 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3559-
| main.rs:3068:5:3068:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3560-
| main.rs:3069:5:3069:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3561-
| main.rs:3070:5:3070:43 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3562-
| main.rs:3071:5:3071:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3563-
| main.rs:3072:5:3072:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3564-
| main.rs:3073:5:3073:23 | ...::test(...) | | {EXTERNAL LOCATION} | () |
3565-
| main.rs:3074:5:3074:41 | ...::test_all_patterns(...) | | {EXTERNAL LOCATION} | () |
3566-
| main.rs:3075:5:3075:49 | ...::box_patterns(...) | | {EXTERNAL LOCATION} | () |
3567-
| main.rs:3076:5:3076:20 | ...::test(...) | | {EXTERNAL LOCATION} | () |
3568-
| main.rs:3077:5:3077:20 | ...::f(...) | | {EXTERNAL LOCATION} | Box |
3569-
| main.rs:3077:5:3077:20 | ...::f(...) | A | {EXTERNAL LOCATION} | Global |
3570-
| main.rs:3077:5:3077:20 | ...::f(...) | T | main.rs:2897:5:2899:5 | dyn MyTrait |
3571-
| main.rs:3077:5:3077:20 | ...::f(...) | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
3572-
| main.rs:3077:16:3077:19 | true | | {EXTERNAL LOCATION} | bool |
3573-
| main.rs:3078:5:3078:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3532+
| main.rs:3041:14:3041:17 | SelfParam | | main.rs:3040:5:3042:5 | Self [trait MyTrait] |
3533+
| main.rs:3046:14:3046:17 | SelfParam | | {EXTERNAL LOCATION} | i32 |
3534+
| main.rs:3046:28:3048:9 | { ... } | | {EXTERNAL LOCATION} | i32 |
3535+
| main.rs:3047:13:3047:16 | self | | {EXTERNAL LOCATION} | i32 |
3536+
| main.rs:3053:14:3053:17 | SelfParam | | {EXTERNAL LOCATION} | usize |
3537+
| main.rs:3053:28:3055:9 | { ... } | | {EXTERNAL LOCATION} | usize |
3538+
| main.rs:3054:13:3054:16 | self | | {EXTERNAL LOCATION} | usize |
3539+
| main.rs:3060:14:3060:17 | SelfParam | | {EXTERNAL LOCATION} | & |
3540+
| main.rs:3060:14:3060:17 | SelfParam | TRef | main.rs:3058:10:3058:10 | T |
3541+
| main.rs:3060:28:3062:9 | { ... } | | {EXTERNAL LOCATION} | & |
3542+
| main.rs:3060:28:3062:9 | { ... } | TRef | main.rs:3058:10:3058:10 | T |
3543+
| main.rs:3061:13:3061:16 | self | | {EXTERNAL LOCATION} | & |
3544+
| main.rs:3061:13:3061:16 | self | TRef | main.rs:3058:10:3058:10 | T |
3545+
| main.rs:3065:25:3069:5 | { ... } | | {EXTERNAL LOCATION} | usize |
3546+
| main.rs:3077:11:3112:1 | { ... } | | {EXTERNAL LOCATION} | () |
3547+
| main.rs:3078:5:3078:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3548+
| main.rs:3079:5:3079:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
3549+
| main.rs:3080:5:3080:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
3550+
| main.rs:3080:20:3080:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
3551+
| main.rs:3080:41:3080:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
3552+
| main.rs:3081:5:3081:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3553+
| main.rs:3082:5:3082:41 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3554+
| main.rs:3083:5:3083:45 | ...::test(...) | | {EXTERNAL LOCATION} | () |
3555+
| main.rs:3084:5:3084:30 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3556+
| main.rs:3085:5:3085:33 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3557+
| main.rs:3086:5:3086:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3558+
| main.rs:3087:5:3087:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3559+
| main.rs:3088:5:3088:32 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3560+
| main.rs:3089:5:3089:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3561+
| main.rs:3090:5:3090:36 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3562+
| main.rs:3091:5:3091:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3563+
| main.rs:3092:5:3092:29 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3564+
| main.rs:3093:5:3093:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3565+
| main.rs:3094:5:3094:24 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3566+
| main.rs:3095:5:3095:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3567+
| main.rs:3096:5:3096:18 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3568+
| main.rs:3097:5:3097:15 | ...::f(...) | | {EXTERNAL LOCATION} | dyn Future |
3569+
| main.rs:3097:5:3097:15 | ...::f(...) | dyn(Output) | {EXTERNAL LOCATION} | () |
3570+
| main.rs:3098:5:3098:19 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3571+
| main.rs:3099:5:3099:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3572+
| main.rs:3100:5:3100:14 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3573+
| main.rs:3101:5:3101:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3574+
| main.rs:3102:5:3102:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3575+
| main.rs:3103:5:3103:43 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3576+
| main.rs:3104:5:3104:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3577+
| main.rs:3105:5:3105:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
3578+
| main.rs:3106:5:3106:23 | ...::test(...) | | {EXTERNAL LOCATION} | () |
3579+
| main.rs:3107:5:3107:41 | ...::test_all_patterns(...) | | {EXTERNAL LOCATION} | () |
3580+
| main.rs:3108:5:3108:49 | ...::box_patterns(...) | | {EXTERNAL LOCATION} | () |
3581+
| main.rs:3109:5:3109:20 | ...::test(...) | | {EXTERNAL LOCATION} | () |
3582+
| main.rs:3110:5:3110:20 | ...::f(...) | | {EXTERNAL LOCATION} | Box |
3583+
| main.rs:3110:5:3110:20 | ...::f(...) | A | {EXTERNAL LOCATION} | Global |
3584+
| main.rs:3110:5:3110:20 | ...::f(...) | T | main.rs:2897:5:2899:5 | dyn MyTrait |
3585+
| main.rs:3110:5:3110:20 | ...::f(...) | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
3586+
| main.rs:3110:16:3110:19 | true | | {EXTERNAL LOCATION} | bool |
3587+
| main.rs:3111:5:3111:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
35743588
| pattern_matching.rs:13:26:133:1 | { ... } | | {EXTERNAL LOCATION} | Option |
35753589
| pattern_matching.rs:13:26:133:1 | { ... } | T | {EXTERNAL LOCATION} | () |
35763590
| pattern_matching.rs:15:5:18:5 | if ... {...} | | {EXTERNAL LOCATION} | () |
@@ -10983,48 +10997,75 @@ inferType
1098310997
| main.rs:3035:9:3035:9 | x | T | {EXTERNAL LOCATION} | i32 |
1098410998
| main.rs:3035:9:3035:17 | x.push(...) | | {EXTERNAL LOCATION} | () |
1098510999
| main.rs:3035:16:3035:16 | y | | {EXTERNAL LOCATION} | i32 |
10986-
| main.rs:3044:11:3079:1 | { ... } | | {EXTERNAL LOCATION} | () |
10987-
| main.rs:3045:5:3045:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
10988-
| main.rs:3046:5:3046:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
10989-
| main.rs:3047:5:3047:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
10990-
| main.rs:3047:20:3047:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
10991-
| main.rs:3047:41:3047:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
10992-
| main.rs:3048:5:3048:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
10993-
| main.rs:3049:5:3049:41 | ...::f(...) | | {EXTERNAL LOCATION} | () |
10994-
| main.rs:3050:5:3050:45 | ...::test(...) | | {EXTERNAL LOCATION} | () |
10995-
| main.rs:3051:5:3051:30 | ...::f(...) | | {EXTERNAL LOCATION} | () |
10996-
| main.rs:3052:5:3052:33 | ...::f(...) | | {EXTERNAL LOCATION} | () |
10997-
| main.rs:3053:5:3053:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
10998-
| main.rs:3054:5:3054:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
10999-
| main.rs:3055:5:3055:32 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11000-
| main.rs:3056:5:3056:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11001-
| main.rs:3057:5:3057:36 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11002-
| main.rs:3058:5:3058:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11003-
| main.rs:3059:5:3059:29 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11004-
| main.rs:3060:5:3060:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11005-
| main.rs:3061:5:3061:24 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11006-
| main.rs:3062:5:3062:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11007-
| main.rs:3063:5:3063:18 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11008-
| main.rs:3064:5:3064:15 | ...::f(...) | | {EXTERNAL LOCATION} | dyn Future |
11009-
| main.rs:3064:5:3064:15 | ...::f(...) | dyn(Output) | {EXTERNAL LOCATION} | () |
11010-
| main.rs:3065:5:3065:19 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11011-
| main.rs:3066:5:3066:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11012-
| main.rs:3067:5:3067:14 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11013-
| main.rs:3068:5:3068:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11014-
| main.rs:3069:5:3069:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11015-
| main.rs:3070:5:3070:43 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11016-
| main.rs:3071:5:3071:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11017-
| main.rs:3072:5:3072:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11018-
| main.rs:3073:5:3073:23 | ...::test(...) | | {EXTERNAL LOCATION} | () |
11019-
| main.rs:3074:5:3074:41 | ...::test_all_patterns(...) | | {EXTERNAL LOCATION} | () |
11020-
| main.rs:3075:5:3075:49 | ...::box_patterns(...) | | {EXTERNAL LOCATION} | () |
11021-
| main.rs:3076:5:3076:20 | ...::test(...) | | {EXTERNAL LOCATION} | () |
11022-
| main.rs:3077:5:3077:20 | ...::f(...) | | {EXTERNAL LOCATION} | Box |
11023-
| main.rs:3077:5:3077:20 | ...::f(...) | A | {EXTERNAL LOCATION} | Global |
11024-
| main.rs:3077:5:3077:20 | ...::f(...) | T | main.rs:2897:5:2899:5 | dyn MyTrait |
11025-
| main.rs:3077:5:3077:20 | ...::f(...) | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
11026-
| main.rs:3077:16:3077:19 | true | | {EXTERNAL LOCATION} | bool |
11027-
| main.rs:3078:5:3078:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11000+
| main.rs:3041:14:3041:17 | SelfParam | | main.rs:3040:5:3042:5 | Self [trait MyTrait] |
11001+
| main.rs:3046:14:3046:17 | SelfParam | | {EXTERNAL LOCATION} | i32 |
11002+
| main.rs:3046:28:3048:9 | { ... } | | {EXTERNAL LOCATION} | i32 |
11003+
| main.rs:3047:13:3047:16 | self | | {EXTERNAL LOCATION} | i32 |
11004+
| main.rs:3053:14:3053:17 | SelfParam | | {EXTERNAL LOCATION} | usize |
11005+
| main.rs:3053:28:3055:9 | { ... } | | {EXTERNAL LOCATION} | usize |
11006+
| main.rs:3054:13:3054:16 | self | | {EXTERNAL LOCATION} | usize |
11007+
| main.rs:3060:14:3060:17 | SelfParam | | {EXTERNAL LOCATION} | & |
11008+
| main.rs:3060:14:3060:17 | SelfParam | TRef | main.rs:3058:10:3058:10 | T |
11009+
| main.rs:3060:28:3062:9 | { ... } | | {EXTERNAL LOCATION} | & |
11010+
| main.rs:3060:28:3062:9 | { ... } | TRef | main.rs:3058:10:3058:10 | T |
11011+
| main.rs:3061:13:3061:16 | self | | {EXTERNAL LOCATION} | & |
11012+
| main.rs:3061:13:3061:16 | self | TRef | main.rs:3058:10:3058:10 | T |
11013+
| main.rs:3065:25:3069:5 | { ... } | | {EXTERNAL LOCATION} | usize |
11014+
| main.rs:3066:17:3066:17 | x | | {EXTERNAL LOCATION} | i32 |
11015+
| main.rs:3066:17:3066:17 | x | | {EXTERNAL LOCATION} | usize |
11016+
| main.rs:3066:21:3066:21 | 0 | | {EXTERNAL LOCATION} | i32 |
11017+
| main.rs:3066:21:3066:21 | 0 | | {EXTERNAL LOCATION} | usize |
11018+
| main.rs:3067:9:3067:9 | x | | {EXTERNAL LOCATION} | i32 |
11019+
| main.rs:3067:9:3067:9 | x | | {EXTERNAL LOCATION} | usize |
11020+
| main.rs:3067:9:3067:17 | ... = ... | | {EXTERNAL LOCATION} | () |
11021+
| main.rs:3067:13:3067:13 | x | | {EXTERNAL LOCATION} | i32 |
11022+
| main.rs:3067:13:3067:13 | x | | {EXTERNAL LOCATION} | usize |
11023+
| main.rs:3067:13:3067:17 | x.f() | | {EXTERNAL LOCATION} | i32 |
11024+
| main.rs:3067:13:3067:17 | x.f() | | {EXTERNAL LOCATION} | usize |
11025+
| main.rs:3068:9:3068:9 | x | | {EXTERNAL LOCATION} | i32 |
11026+
| main.rs:3068:9:3068:9 | x | | {EXTERNAL LOCATION} | usize |
11027+
| main.rs:3077:11:3112:1 | { ... } | | {EXTERNAL LOCATION} | () |
11028+
| main.rs:3078:5:3078:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11029+
| main.rs:3079:5:3079:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
11030+
| main.rs:3080:5:3080:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
11031+
| main.rs:3080:20:3080:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
11032+
| main.rs:3080:41:3080:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo |
11033+
| main.rs:3081:5:3081:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11034+
| main.rs:3082:5:3082:41 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11035+
| main.rs:3083:5:3083:45 | ...::test(...) | | {EXTERNAL LOCATION} | () |
11036+
| main.rs:3084:5:3084:30 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11037+
| main.rs:3085:5:3085:33 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11038+
| main.rs:3086:5:3086:21 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11039+
| main.rs:3087:5:3087:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11040+
| main.rs:3088:5:3088:32 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11041+
| main.rs:3089:5:3089:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11042+
| main.rs:3090:5:3090:36 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11043+
| main.rs:3091:5:3091:35 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11044+
| main.rs:3092:5:3092:29 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11045+
| main.rs:3093:5:3093:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11046+
| main.rs:3094:5:3094:24 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11047+
| main.rs:3095:5:3095:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11048+
| main.rs:3096:5:3096:18 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11049+
| main.rs:3097:5:3097:15 | ...::f(...) | | {EXTERNAL LOCATION} | dyn Future |
11050+
| main.rs:3097:5:3097:15 | ...::f(...) | dyn(Output) | {EXTERNAL LOCATION} | () |
11051+
| main.rs:3098:5:3098:19 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11052+
| main.rs:3099:5:3099:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11053+
| main.rs:3100:5:3100:14 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11054+
| main.rs:3101:5:3101:27 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11055+
| main.rs:3102:5:3102:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11056+
| main.rs:3103:5:3103:43 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11057+
| main.rs:3104:5:3104:15 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11058+
| main.rs:3105:5:3105:17 | ...::f(...) | | {EXTERNAL LOCATION} | () |
11059+
| main.rs:3106:5:3106:23 | ...::test(...) | | {EXTERNAL LOCATION} | () |
11060+
| main.rs:3107:5:3107:41 | ...::test_all_patterns(...) | | {EXTERNAL LOCATION} | () |
11061+
| main.rs:3108:5:3108:49 | ...::box_patterns(...) | | {EXTERNAL LOCATION} | () |
11062+
| main.rs:3109:5:3109:20 | ...::test(...) | | {EXTERNAL LOCATION} | () |
11063+
| main.rs:3110:5:3110:20 | ...::f(...) | | {EXTERNAL LOCATION} | Box |
11064+
| main.rs:3110:5:3110:20 | ...::f(...) | A | {EXTERNAL LOCATION} | Global |
11065+
| main.rs:3110:5:3110:20 | ...::f(...) | T | main.rs:2897:5:2899:5 | dyn MyTrait |
11066+
| main.rs:3110:5:3110:20 | ...::f(...) | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
11067+
| main.rs:3110:16:3110:19 | true | | {EXTERNAL LOCATION} | bool |
11068+
| main.rs:3111:5:3111:23 | ...::f(...) | | {EXTERNAL LOCATION} | () |
1102811069
| pattern_matching.rs:13:26:133:1 | { ... } | | {EXTERNAL LOCATION} | Option |
1102911070
| pattern_matching.rs:13:26:133:1 | { ... } | T | {EXTERNAL LOCATION} | () |
1103011071
| pattern_matching.rs:14:9:14:13 | value | | {EXTERNAL LOCATION} | Option |

0 commit comments

Comments
 (0)