From f7c74664fa4a39ab3e85fb8ace2534441ef23e55 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Tue, 9 Sep 2025 13:22:52 +0200 Subject: [PATCH] Rust: Improve a few `toString` implementations --- rust/ql/.generated.list | 2 - rust/ql/.gitattributes | 2 - .../internal/ImplTraitTypeReprImpl.qll | 4 + .../rust/elements/internal/LifetimeImpl.qll | 4 +- .../rust/elements/internal/TypeBoundImpl.qll | 11 ++- .../elements/internal/TypeBoundListImpl.qll | 14 +++- .../AssocTypeArg/AssocTypeArg.expected | 2 +- .../DynTraitTypeRepr.expected | 2 +- .../ImplTraitTypeRepr.expected | 4 +- .../generated/TraitAlias/TraitAlias.expected | 2 +- .../TypeBoundList/TypeBoundList.expected | 6 +- .../generated/WherePred/WherePred.expected | 6 +- .../type-inference/type-inference.expected | 80 +++++++++---------- 13 files changed, 79 insertions(+), 60 deletions(-) diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 23a5b4fabf05..92d0a7a4cd84 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -419,9 +419,7 @@ lib/codeql/rust/elements/internal/TypeAliasConstructor.qll 048caa79eb7d400971e3e lib/codeql/rust/elements/internal/TypeArgConstructor.qll 51d621e170fdf5f91497f8cc8c1764ce8a59fde5a2b9ecfad17ce826a96c56c4 a5bbb329bde456a40ffa84a325a4be1271dbde842c1573d1beb7056c8fb0f681 lib/codeql/rust/elements/internal/TypeArgImpl.qll 77886af8b2c045463c4c34d781c8f618eec5f5143098548047730f73c7e4a34a 6be6c519b71f9196e0559958e85efe8a78fbce7a90ca2401d7c402e46bc865c9 lib/codeql/rust/elements/internal/TypeBoundConstructor.qll ba99616e65cf2811187016ff23e5b0005cfd0f1123622e908ff8b560aaa5847f fde78432b55b31cf68a3acb7093256217df37539f942c4441d1b1e7bf9271d89 -lib/codeql/rust/elements/internal/TypeBoundImpl.qll 7274dc0307595f7431343d7542b9441362087bcb1115b21bc5ffa02f2d3dd678 257cad7cd2658cf707ee9ae2bb99a4c7e3e51e6c237d272f3058571f1e5cb133 lib/codeql/rust/elements/internal/TypeBoundListConstructor.qll 4b634b3a4ca8909ce8c0d172d9258168c5271435474089902456c2e3e47ae1c5 3af74623ced55b3263c096810a685517d36b75229431b81f3bb8101294940025 -lib/codeql/rust/elements/internal/TypeBoundListImpl.qll 5641aca40c0331899f4291188e60945eb2a01679e3b33883053309fb3823d9ab c84bb1daa7c10f3bb634a179957934d7ae1bef1380fcd8a9c734004625575485 lib/codeql/rust/elements/internal/TypeParamConstructor.qll a6e57cccd6b54fa68742d7b8ce70678a79ac133ea8c1bfa89d60b5f74ad07e05 0e5f45d250d736aaf40387be22e55288543bdb55bbb20ecb43f2f056e8be8b09 lib/codeql/rust/elements/internal/TypeReprImpl.qll 504b137313407be57c93fe0acee31716a02f91e23ce417e7c67bae2ae9937564 28fa8b680d5cd782c5c5fb048a9deb9b9debd196e3bc7df1129843e61eb342ea lib/codeql/rust/elements/internal/UnderscoreExprConstructor.qll 8dc27831adb49c1a47b9f8997d6065e82b4e48e41e3c35bd8d35255cea459905 6c5a5272d37f83f1c1b17475f8adb7d867e95025d201320e20a32dab1f69f7bf diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 71cd100d3f2e..19f5c2842403 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -421,9 +421,7 @@ /lib/codeql/rust/elements/internal/TypeArgConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/TypeArgImpl.qll linguist-generated /lib/codeql/rust/elements/internal/TypeBoundConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/TypeBoundImpl.qll linguist-generated /lib/codeql/rust/elements/internal/TypeBoundListConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll linguist-generated /lib/codeql/rust/elements/internal/TypeParamConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/TypeReprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/UnderscoreExprConstructor.qll linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeReprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeReprImpl.qll index a4e3ac7a5c39..24b4852d7289 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeReprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeReprImpl.qll @@ -36,5 +36,9 @@ module Impl { predicate isInReturnPos() { exists(Function f | f.getRetType().getTypeRepr() = this.getFunctionTypeRepr(f)) } + + override string toStringImpl() { + result = "impl " + this.getTypeBoundList().toAbbreviatedString() + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll index 1825cf5804d5..0623effa9c2f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll @@ -22,7 +22,9 @@ module Impl { * ``` */ class Lifetime extends Generated::Lifetime { - override string toStringImpl() { + override string toStringImpl() { result = this.toAbbreviatedString() } + + override string toAbbreviatedString() { result = this.getText() or not this.hasText() and result = "'_" diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll index 5dd87536a03e..cf05bbc4adad 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `TypeBound`. * @@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.TypeBound * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A type bound in a trait or generic parameter. * @@ -23,5 +23,12 @@ module Impl { * // ^^^^^^^^^^^^^^^^^^^^^ * ``` */ - class TypeBound extends Generated::TypeBound { } + class TypeBound extends Generated::TypeBound { + override string toAbbreviatedString() { + result = this.getLifetime().toAbbreviatedString() + or + not this.hasLifetime() and + result = "..." + } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll index 1b6fd0e64fed..0d386b6edb05 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `TypeBoundList`. * @@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.TypeBoundList * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A list of type bounds. * @@ -21,5 +21,15 @@ module Impl { * // ^^^^^^^^^^^^^ * ``` */ - class TypeBoundList extends Generated::TypeBoundList { } + class TypeBoundList extends Generated::TypeBoundList { + override string toStringImpl() { result = this.toAbbreviatedString() } + + private string toAbbreviatedStringPart(int index) { + result = this.getBound(index).toAbbreviatedString() + } + + override string toAbbreviatedString() { + result = strictconcat(int i | | this.toAbbreviatedStringPart(i), " + " order by i) + } + } } diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected index 83bfd832501b..45099ac5990f 100644 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected @@ -9,4 +9,4 @@ getRetType getReturnTypeSyntax getTypeRepr getTypeBoundList -| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | gen_assoc_type_arg.rs:9:27:9:31 | TypeBoundList | +| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | gen_assoc_type_arg.rs:9:27:9:31 | ... | diff --git a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected index 14ff9874ffb3..e996a7524062 100644 --- a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected @@ -1,4 +1,4 @@ instances | gen_dyn_trait_type_repr.rs:7:13:7:21 | DynTraitTypeRepr | getTypeBoundList -| gen_dyn_trait_type_repr.rs:7:13:7:21 | DynTraitTypeRepr | gen_dyn_trait_type_repr.rs:7:17:7:21 | TypeBoundList | +| gen_dyn_trait_type_repr.rs:7:13:7:21 | DynTraitTypeRepr | gen_dyn_trait_type_repr.rs:7:17:7:21 | ... | diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected index aa04363dc445..5c9774002bb6 100644 --- a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected @@ -1,4 +1,4 @@ instances -| gen_impl_trait_type_repr.rs:7:17:7:41 | ImplTraitTypeRepr | +| gen_impl_trait_type_repr.rs:7:17:7:41 | impl ... | getTypeBoundList -| gen_impl_trait_type_repr.rs:7:17:7:41 | ImplTraitTypeRepr | gen_impl_trait_type_repr.rs:7:22:7:41 | TypeBoundList | +| gen_impl_trait_type_repr.rs:7:17:7:41 | impl ... | gen_impl_trait_type_repr.rs:7:22:7:41 | ... | diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected index 5daf06da1c37..fe3c1fd8524b 100644 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected @@ -6,6 +6,6 @@ getGenericParamList getName | gen_trait_alias.rs:7:5:7:26 | TraitAlias | gen_trait_alias.rs:7:11:7:13 | Foo | getTypeBoundList -| gen_trait_alias.rs:7:5:7:26 | TraitAlias | gen_trait_alias.rs:7:17:7:25 | TypeBoundList | +| gen_trait_alias.rs:7:5:7:26 | TraitAlias | gen_trait_alias.rs:7:17:7:25 | ... + ... | getVisibility getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected index e195424d0979..4cdfca9a2d19 100644 --- a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected +++ b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected @@ -1,5 +1,5 @@ instances -| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | +| gen_type_bound_list.rs:7:15:7:27 | ... + ... | getBound -| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | 0 | gen_type_bound_list.rs:7:15:7:19 | TypeBound | -| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | 1 | gen_type_bound_list.rs:7:23:7:27 | TypeBound | +| gen_type_bound_list.rs:7:15:7:27 | ... + ... | 0 | gen_type_bound_list.rs:7:15:7:19 | TypeBound | +| gen_type_bound_list.rs:7:15:7:27 | ... + ... | 1 | gen_type_bound_list.rs:7:23:7:27 | TypeBound | diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected index 41b5739818cd..e7dd9b64fce1 100644 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected @@ -10,6 +10,6 @@ getTypeRepr | gen_where_pred.rs:7:46:7:53 | WherePred | gen_where_pred.rs:7:46:7:46 | U | | gen_where_pred.rs:9:31:9:54 | WherePred | gen_where_pred.rs:9:39:9:39 | T | getTypeBoundList -| gen_where_pred.rs:7:36:7:43 | WherePred | gen_where_pred.rs:7:39:7:43 | TypeBoundList | -| gen_where_pred.rs:7:46:7:53 | WherePred | gen_where_pred.rs:7:49:7:53 | TypeBoundList | -| gen_where_pred.rs:9:31:9:54 | WherePred | gen_where_pred.rs:9:42:9:54 | TypeBoundList | +| gen_where_pred.rs:7:36:7:43 | WherePred | gen_where_pred.rs:7:39:7:43 | ... | +| gen_where_pred.rs:7:46:7:53 | WherePred | gen_where_pred.rs:7:49:7:53 | ... | +| gen_where_pred.rs:9:31:9:54 | WherePred | gen_where_pred.rs:9:42:9:54 | ... | diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected index d53f33402277..e18a354569fb 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -117,9 +117,9 @@ inferType | closure.rs:45:9:45:9 | f | | closure.rs:44:20:44:36 | F | | closure.rs:45:9:45:12 | f(...) | | closure.rs:44:17:44:17 | B | | closure.rs:45:11:45:11 | a | | closure.rs:44:14:44:14 | A | -| closure.rs:48:18:48:18 | f | | closure.rs:48:21:48:43 | ImplTraitTypeRepr | +| closure.rs:48:18:48:18 | f | | closure.rs:48:21:48:43 | impl ... | | closure.rs:48:53:50:5 | { ... } | | {EXTERNAL LOCATION} | i64 | -| closure.rs:49:9:49:9 | f | | closure.rs:48:21:48:43 | ImplTraitTypeRepr | +| closure.rs:49:9:49:9 | f | | closure.rs:48:21:48:43 | impl ... | | closure.rs:49:9:49:12 | f(...) | | {EXTERNAL LOCATION} | i64 | | closure.rs:49:11:49:11 | 2 | | {EXTERNAL LOCATION} | i32 | | closure.rs:49:11:49:11 | 2 | | {EXTERNAL LOCATION} | i64 | @@ -3744,7 +3744,7 @@ inferType | main.rs:1961:18:1961:21 | SelfParam | | main.rs:1958:5:1958:14 | S1 | | main.rs:1964:25:1966:5 | { ... } | | main.rs:1958:5:1958:14 | S1 | | main.rs:1965:9:1965:10 | S1 | | main.rs:1958:5:1958:14 | S1 | -| main.rs:1968:41:1970:5 | { ... } | | main.rs:1968:16:1968:39 | ImplTraitTypeRepr | +| main.rs:1968:41:1970:5 | { ... } | | main.rs:1968:16:1968:39 | impl ... | | main.rs:1969:9:1969:20 | { ... } | | {EXTERNAL LOCATION} | trait Future | | main.rs:1969:9:1969:20 | { ... } | Output | main.rs:1958:5:1958:14 | S1 | | main.rs:1969:17:1969:18 | S1 | | main.rs:1958:5:1958:14 | S1 | @@ -3758,15 +3758,15 @@ inferType | main.rs:1981:13:1981:38 | ...::Ready(...) | | {EXTERNAL LOCATION} | Poll | | main.rs:1981:13:1981:38 | ...::Ready(...) | T | main.rs:1958:5:1958:14 | S1 | | main.rs:1981:36:1981:37 | S1 | | main.rs:1958:5:1958:14 | S1 | -| main.rs:1985:41:1987:5 | { ... } | | main.rs:1985:16:1985:39 | ImplTraitTypeRepr | +| main.rs:1985:41:1987:5 | { ... } | | main.rs:1985:16:1985:39 | impl ... | | main.rs:1986:9:1986:10 | S2 | | main.rs:1972:5:1972:14 | S2 | -| main.rs:1986:9:1986:10 | S2 | | main.rs:1985:16:1985:39 | ImplTraitTypeRepr | +| main.rs:1986:9:1986:10 | S2 | | main.rs:1985:16:1985:39 | impl ... | | main.rs:1990:9:1990:12 | f1(...) | | {EXTERNAL LOCATION} | trait Future | | main.rs:1990:9:1990:12 | f1(...) | Output | main.rs:1958:5:1958:14 | S1 | | main.rs:1990:9:1990:18 | await ... | | main.rs:1958:5:1958:14 | S1 | -| main.rs:1991:9:1991:12 | f2(...) | | main.rs:1968:16:1968:39 | ImplTraitTypeRepr | +| main.rs:1991:9:1991:12 | f2(...) | | main.rs:1968:16:1968:39 | impl ... | | main.rs:1991:9:1991:18 | await ... | | main.rs:1958:5:1958:14 | S1 | -| main.rs:1992:9:1992:12 | f3(...) | | main.rs:1985:16:1985:39 | ImplTraitTypeRepr | +| main.rs:1992:9:1992:12 | f3(...) | | main.rs:1985:16:1985:39 | impl ... | | main.rs:1992:9:1992:18 | await ... | | main.rs:1958:5:1958:14 | S1 | | main.rs:1993:9:1993:10 | S2 | | main.rs:1972:5:1972:14 | S2 | | main.rs:1993:9:1993:16 | await S2 | | main.rs:1958:5:1958:14 | S1 | @@ -3786,9 +3786,9 @@ inferType | main.rs:2014:15:2014:19 | SelfParam | &T | main.rs:2000:5:2001:14 | S1 | | main.rs:2018:15:2018:19 | SelfParam | | file://:0:0:0:0 | & | | main.rs:2018:15:2018:19 | SelfParam | &T | main.rs:2000:5:2001:14 | S1 | -| main.rs:2021:37:2023:5 | { ... } | | main.rs:2021:16:2021:35 | ImplTraitTypeRepr | +| main.rs:2021:37:2023:5 | { ... } | | main.rs:2021:16:2021:35 | impl ... + ... | | main.rs:2022:9:2022:10 | S1 | | main.rs:2000:5:2001:14 | S1 | -| main.rs:2022:9:2022:10 | S1 | | main.rs:2021:16:2021:35 | ImplTraitTypeRepr | +| main.rs:2022:9:2022:10 | S1 | | main.rs:2021:16:2021:35 | impl ... + ... | | main.rs:2026:18:2026:22 | SelfParam | | file://:0:0:0:0 | & | | main.rs:2026:18:2026:22 | SelfParam | &T | main.rs:2025:5:2027:5 | Self [trait MyTrait] | | main.rs:2030:18:2030:22 | SelfParam | | file://:0:0:0:0 | & | @@ -3807,102 +3807,102 @@ inferType | main.rs:2037:25:2037:28 | self | &T | main.rs:2003:5:2003:22 | S3 | | main.rs:2037:25:2037:28 | self | &T.T3 | main.rs:2035:10:2035:17 | T | | main.rs:2038:13:2038:21 | t.clone() | | main.rs:2035:10:2035:17 | T | -| main.rs:2042:45:2044:5 | { ... } | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | +| main.rs:2042:45:2044:5 | { ... } | | main.rs:2042:28:2042:43 | impl ... | | main.rs:2043:9:2043:10 | S1 | | main.rs:2000:5:2001:14 | S1 | -| main.rs:2043:9:2043:10 | S1 | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | +| main.rs:2043:9:2043:10 | S1 | | main.rs:2042:28:2042:43 | impl ... | | main.rs:2046:41:2046:41 | t | | main.rs:2046:26:2046:38 | B | | main.rs:2046:52:2048:5 | { ... } | | main.rs:2046:23:2046:23 | A | | main.rs:2047:9:2047:9 | t | | main.rs:2046:26:2046:38 | B | | main.rs:2047:9:2047:17 | t.get_a() | | main.rs:2046:23:2046:23 | A | | main.rs:2050:34:2050:34 | x | | main.rs:2050:24:2050:31 | T | -| main.rs:2050:59:2052:5 | { ... } | | main.rs:2050:43:2050:57 | ImplTraitTypeRepr | +| main.rs:2050:59:2052:5 | { ... } | | main.rs:2050:43:2050:57 | impl ... | | main.rs:2050:59:2052:5 | { ... } | impl(T) | main.rs:2050:24:2050:31 | T | | main.rs:2051:9:2051:13 | S3(...) | | main.rs:2003:5:2003:22 | S3 | -| main.rs:2051:9:2051:13 | S3(...) | | main.rs:2050:43:2050:57 | ImplTraitTypeRepr | +| main.rs:2051:9:2051:13 | S3(...) | | main.rs:2050:43:2050:57 | impl ... | | main.rs:2051:9:2051:13 | S3(...) | T3 | main.rs:2050:24:2050:31 | T | | main.rs:2051:9:2051:13 | S3(...) | impl(T) | main.rs:2050:24:2050:31 | T | | main.rs:2051:12:2051:12 | x | | main.rs:2050:24:2050:31 | T | | main.rs:2054:34:2054:34 | x | | main.rs:2054:24:2054:31 | T | | main.rs:2054:67:2056:5 | { ... } | | {EXTERNAL LOCATION} | Option | -| main.rs:2054:67:2056:5 | { ... } | T | main.rs:2054:50:2054:64 | ImplTraitTypeRepr | +| main.rs:2054:67:2056:5 | { ... } | T | main.rs:2054:50:2054:64 | impl ... | | main.rs:2054:67:2056:5 | { ... } | T.impl(T) | main.rs:2054:24:2054:31 | T | | main.rs:2055:9:2055:19 | Some(...) | | {EXTERNAL LOCATION} | Option | | main.rs:2055:9:2055:19 | Some(...) | T | main.rs:2003:5:2003:22 | S3 | -| main.rs:2055:9:2055:19 | Some(...) | T | main.rs:2054:50:2054:64 | ImplTraitTypeRepr | +| main.rs:2055:9:2055:19 | Some(...) | T | main.rs:2054:50:2054:64 | impl ... | | main.rs:2055:9:2055:19 | Some(...) | T.T3 | main.rs:2054:24:2054:31 | T | | main.rs:2055:9:2055:19 | Some(...) | T.impl(T) | main.rs:2054:24:2054:31 | T | | main.rs:2055:14:2055:18 | S3(...) | | main.rs:2003:5:2003:22 | S3 | -| main.rs:2055:14:2055:18 | S3(...) | | main.rs:2054:50:2054:64 | ImplTraitTypeRepr | +| main.rs:2055:14:2055:18 | S3(...) | | main.rs:2054:50:2054:64 | impl ... | | main.rs:2055:14:2055:18 | S3(...) | T3 | main.rs:2054:24:2054:31 | T | | main.rs:2055:14:2055:18 | S3(...) | impl(T) | main.rs:2054:24:2054:31 | T | | main.rs:2055:17:2055:17 | x | | main.rs:2054:24:2054:31 | T | | main.rs:2058:34:2058:34 | x | | main.rs:2058:24:2058:31 | T | | main.rs:2058:78:2060:5 | { ... } | | file://:0:0:0:0 | (T_2) | -| main.rs:2058:78:2060:5 | { ... } | 0(2) | main.rs:2058:44:2058:58 | ImplTraitTypeRepr | +| main.rs:2058:78:2060:5 | { ... } | 0(2) | main.rs:2058:44:2058:58 | impl ... | | main.rs:2058:78:2060:5 | { ... } | 0(2).impl(T) | main.rs:2058:24:2058:31 | T | -| main.rs:2058:78:2060:5 | { ... } | 1(2) | main.rs:2058:61:2058:75 | ImplTraitTypeRepr | +| main.rs:2058:78:2060:5 | { ... } | 1(2) | main.rs:2058:61:2058:75 | impl ... | | main.rs:2058:78:2060:5 | { ... } | 1(2).impl(T) | main.rs:2058:24:2058:31 | T | | main.rs:2059:9:2059:30 | TupleExpr | | file://:0:0:0:0 | (T_2) | | main.rs:2059:9:2059:30 | TupleExpr | 0(2) | main.rs:2003:5:2003:22 | S3 | -| main.rs:2059:9:2059:30 | TupleExpr | 0(2) | main.rs:2058:44:2058:58 | ImplTraitTypeRepr | +| main.rs:2059:9:2059:30 | TupleExpr | 0(2) | main.rs:2058:44:2058:58 | impl ... | | main.rs:2059:9:2059:30 | TupleExpr | 0(2).T3 | main.rs:2058:24:2058:31 | T | | main.rs:2059:9:2059:30 | TupleExpr | 0(2).impl(T) | main.rs:2058:24:2058:31 | T | | main.rs:2059:9:2059:30 | TupleExpr | 1(2) | main.rs:2003:5:2003:22 | S3 | -| main.rs:2059:9:2059:30 | TupleExpr | 1(2) | main.rs:2058:61:2058:75 | ImplTraitTypeRepr | +| main.rs:2059:9:2059:30 | TupleExpr | 1(2) | main.rs:2058:61:2058:75 | impl ... | | main.rs:2059:9:2059:30 | TupleExpr | 1(2).T3 | main.rs:2058:24:2058:31 | T | | main.rs:2059:9:2059:30 | TupleExpr | 1(2).impl(T) | main.rs:2058:24:2058:31 | T | | main.rs:2059:10:2059:22 | S3(...) | | main.rs:2003:5:2003:22 | S3 | -| main.rs:2059:10:2059:22 | S3(...) | | main.rs:2058:44:2058:58 | ImplTraitTypeRepr | +| main.rs:2059:10:2059:22 | S3(...) | | main.rs:2058:44:2058:58 | impl ... | | main.rs:2059:10:2059:22 | S3(...) | T3 | main.rs:2058:24:2058:31 | T | | main.rs:2059:10:2059:22 | S3(...) | impl(T) | main.rs:2058:24:2058:31 | T | | main.rs:2059:13:2059:13 | x | | main.rs:2058:24:2058:31 | T | | main.rs:2059:13:2059:21 | x.clone() | | main.rs:2058:24:2058:31 | T | | main.rs:2059:25:2059:29 | S3(...) | | main.rs:2003:5:2003:22 | S3 | -| main.rs:2059:25:2059:29 | S3(...) | | main.rs:2058:61:2058:75 | ImplTraitTypeRepr | +| main.rs:2059:25:2059:29 | S3(...) | | main.rs:2058:61:2058:75 | impl ... | | main.rs:2059:25:2059:29 | S3(...) | T3 | main.rs:2058:24:2058:31 | T | | main.rs:2059:25:2059:29 | S3(...) | impl(T) | main.rs:2058:24:2058:31 | T | | main.rs:2059:28:2059:28 | x | | main.rs:2058:24:2058:31 | T | -| main.rs:2062:26:2062:26 | t | | main.rs:2062:29:2062:43 | ImplTraitTypeRepr | +| main.rs:2062:26:2062:26 | t | | main.rs:2062:29:2062:43 | impl ... | | main.rs:2062:51:2064:5 | { ... } | | main.rs:2062:23:2062:23 | A | -| main.rs:2063:9:2063:9 | t | | main.rs:2062:29:2062:43 | ImplTraitTypeRepr | +| main.rs:2063:9:2063:9 | t | | main.rs:2062:29:2062:43 | impl ... | | main.rs:2063:9:2063:17 | t.get_a() | | main.rs:2062:23:2062:23 | A | -| main.rs:2067:13:2067:13 | x | | main.rs:2021:16:2021:35 | ImplTraitTypeRepr | -| main.rs:2067:17:2067:20 | f1(...) | | main.rs:2021:16:2021:35 | ImplTraitTypeRepr | -| main.rs:2068:9:2068:9 | x | | main.rs:2021:16:2021:35 | ImplTraitTypeRepr | -| main.rs:2069:9:2069:9 | x | | main.rs:2021:16:2021:35 | ImplTraitTypeRepr | -| main.rs:2070:13:2070:13 | a | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | -| main.rs:2070:17:2070:32 | get_a_my_trait(...) | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | +| main.rs:2067:13:2067:13 | x | | main.rs:2021:16:2021:35 | impl ... + ... | +| main.rs:2067:17:2067:20 | f1(...) | | main.rs:2021:16:2021:35 | impl ... + ... | +| main.rs:2068:9:2068:9 | x | | main.rs:2021:16:2021:35 | impl ... + ... | +| main.rs:2069:9:2069:9 | x | | main.rs:2021:16:2021:35 | impl ... + ... | +| main.rs:2070:13:2070:13 | a | | main.rs:2042:28:2042:43 | impl ... | +| main.rs:2070:17:2070:32 | get_a_my_trait(...) | | main.rs:2042:28:2042:43 | impl ... | | main.rs:2071:13:2071:13 | b | | main.rs:2002:5:2002:14 | S2 | | main.rs:2071:17:2071:33 | uses_my_trait1(...) | | main.rs:2002:5:2002:14 | S2 | -| main.rs:2071:32:2071:32 | a | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | -| main.rs:2072:13:2072:13 | a | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | -| main.rs:2072:17:2072:32 | get_a_my_trait(...) | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | +| main.rs:2071:32:2071:32 | a | | main.rs:2042:28:2042:43 | impl ... | +| main.rs:2072:13:2072:13 | a | | main.rs:2042:28:2042:43 | impl ... | +| main.rs:2072:17:2072:32 | get_a_my_trait(...) | | main.rs:2042:28:2042:43 | impl ... | | main.rs:2073:13:2073:13 | c | | main.rs:2002:5:2002:14 | S2 | | main.rs:2073:17:2073:33 | uses_my_trait2(...) | | main.rs:2002:5:2002:14 | S2 | -| main.rs:2073:32:2073:32 | a | | main.rs:2042:28:2042:43 | ImplTraitTypeRepr | +| main.rs:2073:32:2073:32 | a | | main.rs:2042:28:2042:43 | impl ... | | main.rs:2074:13:2074:13 | d | | main.rs:2002:5:2002:14 | S2 | | main.rs:2074:17:2074:34 | uses_my_trait2(...) | | main.rs:2002:5:2002:14 | S2 | | main.rs:2074:32:2074:33 | S1 | | main.rs:2000:5:2001:14 | S1 | | main.rs:2075:13:2075:13 | e | | main.rs:2000:5:2001:14 | S1 | -| main.rs:2075:17:2075:35 | get_a_my_trait2(...) | | main.rs:2050:43:2050:57 | ImplTraitTypeRepr | +| main.rs:2075:17:2075:35 | get_a_my_trait2(...) | | main.rs:2050:43:2050:57 | impl ... | | main.rs:2075:17:2075:35 | get_a_my_trait2(...) | impl(T) | main.rs:2000:5:2001:14 | S1 | | main.rs:2075:17:2075:43 | ... .get_a() | | main.rs:2000:5:2001:14 | S1 | | main.rs:2075:33:2075:34 | S1 | | main.rs:2000:5:2001:14 | S1 | | main.rs:2078:13:2078:13 | f | | main.rs:2000:5:2001:14 | S1 | | main.rs:2078:17:2078:35 | get_a_my_trait3(...) | | {EXTERNAL LOCATION} | Option | -| main.rs:2078:17:2078:35 | get_a_my_trait3(...) | T | main.rs:2054:50:2054:64 | ImplTraitTypeRepr | +| main.rs:2078:17:2078:35 | get_a_my_trait3(...) | T | main.rs:2054:50:2054:64 | impl ... | | main.rs:2078:17:2078:35 | get_a_my_trait3(...) | T.impl(T) | main.rs:2000:5:2001:14 | S1 | -| main.rs:2078:17:2078:44 | ... .unwrap() | | main.rs:2054:50:2054:64 | ImplTraitTypeRepr | +| main.rs:2078:17:2078:44 | ... .unwrap() | | main.rs:2054:50:2054:64 | impl ... | | main.rs:2078:17:2078:44 | ... .unwrap() | impl(T) | main.rs:2000:5:2001:14 | S1 | | main.rs:2078:17:2078:52 | ... .get_a() | | main.rs:2000:5:2001:14 | S1 | | main.rs:2078:33:2078:34 | S1 | | main.rs:2000:5:2001:14 | S1 | | main.rs:2079:13:2079:13 | g | | main.rs:2000:5:2001:14 | S1 | | main.rs:2079:17:2079:35 | get_a_my_trait4(...) | | file://:0:0:0:0 | (T_2) | -| main.rs:2079:17:2079:35 | get_a_my_trait4(...) | 0(2) | main.rs:2058:44:2058:58 | ImplTraitTypeRepr | +| main.rs:2079:17:2079:35 | get_a_my_trait4(...) | 0(2) | main.rs:2058:44:2058:58 | impl ... | | main.rs:2079:17:2079:35 | get_a_my_trait4(...) | 0(2).impl(T) | main.rs:2000:5:2001:14 | S1 | -| main.rs:2079:17:2079:35 | get_a_my_trait4(...) | 1(2) | main.rs:2058:61:2058:75 | ImplTraitTypeRepr | +| main.rs:2079:17:2079:35 | get_a_my_trait4(...) | 1(2) | main.rs:2058:61:2058:75 | impl ... | | main.rs:2079:17:2079:35 | get_a_my_trait4(...) | 1(2).impl(T) | main.rs:2000:5:2001:14 | S1 | -| main.rs:2079:17:2079:37 | ... .0 | | main.rs:2058:44:2058:58 | ImplTraitTypeRepr | +| main.rs:2079:17:2079:37 | ... .0 | | main.rs:2058:44:2058:58 | impl ... | | main.rs:2079:17:2079:37 | ... .0 | impl(T) | main.rs:2000:5:2001:14 | S1 | | main.rs:2079:17:2079:45 | ... .get_a() | | main.rs:2000:5:2001:14 | S1 | | main.rs:2079:33:2079:34 | S1 | | main.rs:2000:5:2001:14 | S1 |