Rust: Non-symmetric type propagation for lub coercions

This commit is contained in:
Tom Hvitved
2025-10-07 15:07:08 +02:00
parent 00bf049c85
commit 65b706ab80
2 changed files with 79 additions and 235 deletions

View File

@@ -524,6 +524,14 @@ private Struct getRangeType(RangeExpr re) {
result instanceof RangeToInclusiveStruct
}
private predicate bodyReturns(Expr body, Expr e) {
exists(ReturnExpr re, Callable c |
e = re.getExpr() and
c = re.getEnclosingCallable() and
body = c.getBody()
)
}
/**
* Holds if the type tree of `n1` at `prefix1` should be equal to the type tree
* of `n2` at `prefix2` and type information should propagate in both directions
@@ -540,9 +548,11 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat
let.getInitializer() = n2
)
or
n1 = n2.(IfExpr).getABranch()
or
n1 = n2.(MatchExpr).getAnArm().getExpr()
n2 =
any(MatchExpr me |
n1 = me.getAnArm().getExpr() and
me.getNumberOfArms() = 1
)
or
exists(LetExpr let |
n1 = let.getScrutinee() and
@@ -573,6 +583,9 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat
n1 = n2.(MacroExpr).getMacroCall().getMacroCallExpansion()
or
n1 = n2.(MacroPat).getMacroCall().getMacroCallExpansion()
or
bodyReturns(n1, n2) and
strictcount(Expr e | bodyReturns(n1, e)) = 1
)
or
(
@@ -606,8 +619,12 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat
)
)
or
// an array list expression (`[1, 2, 3]`) has the type of the first (any) element
n1.(ArrayListExpr).getExpr(_) = n2 and
// an array list expression (`[1, 2, 3]`) has the type of the element
n1 =
any(ArrayListExpr ale |
ale.getAnExpr() = n2 and
ale.getNumberOfExprs() = 1
) and
prefix1 = TypePath::singleton(TArrayTypeParameter()) and
prefix2.isEmpty()
or
@@ -635,6 +652,61 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat
prefix2.isEmpty()
}
/**
* Holds if `child` is a child of `parent`, and the Rust compiler applies [least
* upper bound (LUB) coercion](1) to infer the type of `parent` from the type of
* `child`.
*
* In this case, we want type information to only flow from `child` to `parent`,
* to avoid (a) either having to model LUB coercions, or (b) risk combinatorial
* explosion in inferred types.
*
* [1]: https://doc.rust-lang.org/reference/type-coercions.html#r-coerce.least-upper-bound
*/
private predicate lubCoercion(AstNode parent, AstNode child, TypePath prefix) {
child = parent.(IfExpr).getABranch() and
prefix.isEmpty()
or
parent =
any(MatchExpr me |
child = me.getAnArm().getExpr() and
me.getNumberOfArms() > 1
) and
prefix.isEmpty()
or
parent =
any(ArrayListExpr ale |
child = ale.getAnExpr() and
ale.getNumberOfExprs() > 1
) and
prefix = TypePath::singleton(TArrayTypeParameter())
or
bodyReturns(parent, child) and
strictcount(Expr e | bodyReturns(parent, e)) > 1 and
prefix.isEmpty()
}
/**
* Holds if the type tree of `n1` at `prefix1` should be equal to the type tree
* of `n2` at `prefix2`, but type information should only propagate from `n1` to
* `n2`.
*/
private predicate typeEqualityNonSymmetric(
AstNode n1, TypePath prefix1, AstNode n2, TypePath prefix2
) {
lubCoercion(n2, n1, prefix2) and
prefix1.isEmpty()
or
exists(AstNode mid, TypePath prefixMid, TypePath suffix |
typeEquality(n1, prefixMid, mid, prefix2) or
typeEquality(mid, prefix2, n1, prefixMid)
|
lubCoercion(mid, n2, suffix) and
not lubCoercion(mid, n1, _) and
prefix1 = prefixMid.append(suffix)
)
}
pragma[nomagic]
private Type inferTypeEquality(AstNode n, TypePath path) {
exists(TypePath prefix1, AstNode n2, TypePath prefix2, TypePath suffix |
@@ -644,6 +716,8 @@ private Type inferTypeEquality(AstNode n, TypePath path) {
typeEquality(n, prefix1, n2, prefix2)
or
typeEquality(n2, prefix2, n, prefix1)
or
typeEqualityNonSymmetric(n2, prefix2, n, prefix1)
)
}

View File

@@ -5064,9 +5064,7 @@ inferType
| main.rs:2479:32:2479:52 | ... .to_vec() | T | {EXTERNAL LOCATION} | u16 |
| main.rs:2479:33:2479:36 | 1u16 | | {EXTERNAL LOCATION} | u16 |
| main.rs:2479:39:2479:39 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2479:39:2479:39 | 2 | | {EXTERNAL LOCATION} | u16 |
| main.rs:2479:42:2479:42 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2479:42:2479:42 | 3 | | {EXTERNAL LOCATION} | u16 |
| main.rs:2480:13:2480:13 | u | | {EXTERNAL LOCATION} | u16 |
| main.rs:2480:13:2480:13 | u | | file://:0:0:0:0 | & |
| main.rs:2480:18:2480:23 | vals4a | | {EXTERNAL LOCATION} | Vec |
@@ -5077,9 +5075,7 @@ inferType
| main.rs:2482:22:2482:33 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 |
| main.rs:2482:23:2482:26 | 1u16 | | {EXTERNAL LOCATION} | u16 |
| main.rs:2482:29:2482:29 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2482:29:2482:29 | 2 | | {EXTERNAL LOCATION} | u16 |
| main.rs:2482:32:2482:32 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2482:32:2482:32 | 3 | | {EXTERNAL LOCATION} | u16 |
| main.rs:2485:13:2485:17 | vals5 | | {EXTERNAL LOCATION} | Vec |
| main.rs:2485:13:2485:17 | vals5 | A | {EXTERNAL LOCATION} | Global |
| main.rs:2485:13:2485:17 | vals5 | T | {EXTERNAL LOCATION} | i32 |
@@ -5093,9 +5089,7 @@ inferType
| main.rs:2485:31:2485:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 |
| main.rs:2485:32:2485:35 | 1u32 | | {EXTERNAL LOCATION} | u32 |
| main.rs:2485:38:2485:38 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2485:38:2485:38 | 2 | | {EXTERNAL LOCATION} | u32 |
| main.rs:2485:41:2485:41 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2485:41:2485:41 | 3 | | {EXTERNAL LOCATION} | u32 |
| main.rs:2486:13:2486:13 | u | | {EXTERNAL LOCATION} | i32 |
| main.rs:2486:13:2486:13 | u | | {EXTERNAL LOCATION} | u32 |
| main.rs:2486:13:2486:13 | u | | file://:0:0:0:0 | & |
@@ -5116,9 +5110,7 @@ inferType
| main.rs:2488:32:2488:60 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 |
| main.rs:2488:33:2488:36 | 1u64 | | {EXTERNAL LOCATION} | u64 |
| main.rs:2488:39:2488:39 | 2 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2488:39:2488:39 | 2 | | {EXTERNAL LOCATION} | u64 |
| main.rs:2488:42:2488:42 | 3 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2488:42:2488:42 | 3 | | {EXTERNAL LOCATION} | u64 |
| main.rs:2489:13:2489:13 | u | | file://:0:0:0:0 | & |
| main.rs:2489:13:2489:13 | u | &T | {EXTERNAL LOCATION} | u64 |
| main.rs:2489:18:2489:22 | vals6 | | {EXTERNAL LOCATION} | Vec |
@@ -5681,63 +5673,12 @@ inferType
| main.rs:2735:13:2735:13 | x | | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2735:13:2735:13 | x | | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:13:2735:13 | x | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:13:2735:13 | x | dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2735:17:2735:20 | S(...) | | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:17:2735:20 | S(...) | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:17:2735:20 | S(...) | dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2735:19:2735:19 | 1 | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | | {EXTERNAL LOCATION} | Box |
| main.rs:2736:9:2741:9 | if b {...} else {...} | A | {EXTERNAL LOCATION} | Global |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T | main.rs:2700:5:2702:5 | dyn MyTrait |
@@ -5745,225 +5686,56 @@ inferType
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:9:2741:9 | if b {...} else {...} | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:12:2736:12 | b | | {EXTERNAL LOCATION} | bool |
| main.rs:2736:14:2739:9 | { ... } | | {EXTERNAL LOCATION} | Box |
| main.rs:2736:14:2739:9 | { ... } | A | {EXTERNAL LOCATION} | Global |
| main.rs:2736:14:2739:9 | { ... } | T | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2736:14:2739:9 | { ... } | T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2736:14:2739:9 | { ... } | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2736:14:2739:9 | { ... } | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2737:17:2737:17 | x | | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:17:2737:17 | x | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:17:2737:17 | x | dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2737:21:2737:21 | x | | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:21 | x | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:21 | x | dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2737:21:2737:26 | x.m2() | | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2737:21:2737:26 | x.m2() | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2737:21:2737:26 | x.m2() | dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
| main.rs:2738:13:2738:23 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
| main.rs:2738:13:2738:23 | ...::new(...) | T | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2738:13:2738:23 | ...::new(...) | T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:13:2738:23 | ...::new(...) | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:13:2738:23 | ...::new(...) | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2738:22:2738:22 | x | | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2738:22:2738:22 | x | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2738:22:2738:22 | x | dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | | {EXTERNAL LOCATION} | Box |
| main.rs:2739:16:2741:9 | { ... } | A | {EXTERNAL LOCATION} | Global |
| main.rs:2739:16:2741:9 | { ... } | T | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2739:16:2741:9 | { ... } | T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2739:16:2741:9 | { ... } | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2739:16:2741:9 | { ... } | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | | {EXTERNAL LOCATION} | Box |
| main.rs:2740:13:2740:23 | ...::new(...) | A | {EXTERNAL LOCATION} | Global |
| main.rs:2740:13:2740:23 | ...::new(...) | T | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2740:13:2740:23 | ...::new(...) | T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:13:2740:23 | ...::new(...) | T.T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:13:2740:23 | ...::new(...) | T.dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | | main.rs:2700:5:2702:5 | dyn MyTrait |
| main.rs:2740:22:2740:22 | x | | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T.T.T.T | {EXTERNAL LOCATION} | i32 |
| main.rs:2740:22:2740:22 | x | T.T.T.T.T.T.T.T.T | main.rs:2704:5:2705:19 | S |
| main.rs:2740:22:2740:22 | x | dyn(T) | {EXTERNAL LOCATION} | i32 |
| main.rs:2752:5:2752:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo |
| main.rs:2753:5:2753:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo |
@@ -6000,7 +5772,6 @@ inferType
| pattern_matching.rs:20:9:20:18 | Some(...) | | {EXTERNAL LOCATION} | Option |
| pattern_matching.rs:20:9:20:18 | Some(...) | T | {EXTERNAL LOCATION} | i32 |
| pattern_matching.rs:20:14:20:17 | mesg | | {EXTERNAL LOCATION} | i32 |
| pattern_matching.rs:20:23:23:9 | { ... } | | file://:0:0:0:0 | () |
| pattern_matching.rs:21:17:21:20 | mesg | | {EXTERNAL LOCATION} | i32 |
| pattern_matching.rs:21:24:21:27 | mesg | | {EXTERNAL LOCATION} | i32 |
| pattern_matching.rs:22:22:22:29 | "{mesg}\\n" | | file://:0:0:0:0 | & |
@@ -6213,7 +5984,6 @@ inferType
| pattern_matching.rs:99:25:99:25 | x | | {EXTERNAL LOCATION} | i32 |
| pattern_matching.rs:100:25:100:25 | y | | file://:0:0:0:0 | & |
| pattern_matching.rs:100:25:100:25 | y | &T | {EXTERNAL LOCATION} | str |
| pattern_matching.rs:102:14:107:9 | { ... } | | file://:0:0:0:0 | () |
| pattern_matching.rs:103:17:103:17 | a | | {EXTERNAL LOCATION} | bool |
| pattern_matching.rs:103:21:103:26 | value1 | | {EXTERNAL LOCATION} | bool |
| pattern_matching.rs:104:17:104:17 | b | | {EXTERNAL LOCATION} | i32 |