From 63e381c5c431eaaae5dae4bc200efe44111b693e Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Fri, 5 Dec 2025 12:50:13 +0100 Subject: [PATCH] Rust: Distinguish `&mut T` from `&T` in type inference --- .../rust/elements/internal/OperationImpl.qll | 1 + .../rust/frameworks/stdlib/Builtins.qll | 15 +- .../codeql/rust/internal/PathResolution.qll | 8 +- rust/ql/lib/codeql/rust/internal/Type.qll | 32 +- .../codeql/rust/internal/TypeInference.qll | 293 ++++++++--- .../lib/codeql/rust/internal/TypeMention.qll | 39 +- .../PathResolutionConsistency.expected | 2 - .../PathResolutionConsistency.expected | 4 - .../PathResolutionConsistency.expected | 8 - .../PathResolutionConsistency.expected | 3 - .../dataflow/global/viableCallable.expected | 2 - .../PathResolutionConsistency.expected | 2 - .../PathResolutionConsistency.expected | 2 - .../PathResolutionConsistency.expected | 26 - .../dataflow/pointers/inline-flow.expected | 9 +- .../PathResolutionConsistency.expected | 3 - .../PathResolutionConsistency.expected | 2 - .../PathResolutionConsistency.expected | 5 - .../PathResolutionConsistency.expected | 2 - .../PathResolutionConsistency.expected | 45 -- .../PathResolutionConsistency.expected | 33 -- .../type-inference/dereference.rs | 12 +- .../test/library-tests/type-inference/main.rs | 2 +- .../type-inference/pattern_matching.rs | 2 +- .../type-inference/type-inference.expected | 488 +++++++++--------- .../PathResolutionConsistency.expected | 17 - .../PathResolutionConsistency.expected | 2 - .../diagnostics/SummaryStatsReduced.expected | 2 +- .../PathResolutionConsistency.expected | 27 - .../PathResolutionConsistency.expected | 2 - .../PathResolutionConsistency.expected | 37 -- .../PathResolutionConsistency.expected | 16 - .../PathResolutionConsistency.expected | 31 -- .../PathResolutionConsistency.expected | 9 - 34 files changed, 526 insertions(+), 657 deletions(-) delete mode 100644 rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/dataflow/collections/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected delete mode 100644 rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected diff --git a/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll index 31e30c8dcb89..3cc84e71de9f 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/OperationImpl.qll @@ -30,6 +30,7 @@ module Impl { op = "!" and path = "core::ops::bit::Not" and method = "not" and borrows = 0 or // Dereference + // todo: handle `core::ops::deref::DerefMut` op = "*" and path = "core::ops::deref::Deref" and method = "deref" and borrows = 1 ) or diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll index 9021e5d3643f..6b09ababd741 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll @@ -162,15 +162,20 @@ class ArrayType extends BuiltinType { override string getDisplayName() { result = "[;]" } } -/** The builtin reference type `&T`. */ -class RefType extends BuiltinType { - RefType() { this.getName() = "Ref" } +/** A builtin reference type `&T` or `&mut T`. */ +abstract private class RefTypeImpl extends BuiltinType { } + +final class RefType = RefTypeImpl; + +/** The builtin shared reference type `&T`. */ +class RefSharedType extends RefTypeImpl { + RefSharedType() { this.getName() = "Ref" } override string getDisplayName() { result = "&" } } -/** The builtin reference type `&mut T`. */ -class RefMutType extends BuiltinType { +/** The builtin mutable reference type `&mut T`. */ +class RefMutType extends RefTypeImpl { RefMutType() { this.getName() = "RefMut" } override string getDisplayName() { result = "&mut" } diff --git a/rust/ql/lib/codeql/rust/internal/PathResolution.qll b/rust/ql/lib/codeql/rust/internal/PathResolution.qll index 28a72d370ae9..662d95050a25 100644 --- a/rust/ql/lib/codeql/rust/internal/PathResolution.qll +++ b/rust/ql/lib/codeql/rust/internal/PathResolution.qll @@ -771,8 +771,12 @@ private TypeItemNode resolveBuiltin(TypeRepr tr) { tr instanceof ArrayTypeRepr and result instanceof Builtins::ArrayType or - tr instanceof RefTypeRepr and - result instanceof Builtins::RefType + tr = + any(RefTypeRepr rtr | + if rtr.isMut() + then result instanceof Builtins::RefMutType + else result instanceof Builtins::RefSharedType + ) or tr.(PtrTypeRepr).isConst() and result instanceof Builtins::PtrConstType diff --git a/rust/ql/lib/codeql/rust/internal/Type.qll b/rust/ql/lib/codeql/rust/internal/Type.qll index b187a64dec15..83dcfff8c3a6 100644 --- a/rust/ql/lib/codeql/rust/internal/Type.qll +++ b/rust/ql/lib/codeql/rust/internal/Type.qll @@ -224,21 +224,33 @@ TypeParamTypeParameter getArrayTypeParameter() { result = any(ArrayType t).getPositionalTypeParameter(0) } -/** - * A reference type. - * - * Reference types like `& i64` are modeled as normal generic types - * with a single type argument. - */ -class RefType extends StructType { - RefType() { this.getStruct() instanceof Builtins::RefType } +abstract class RefType extends StructType { } + +pragma[nomagic] +TypeParamTypeParameter getRefTypeParameter() { + result = any(RefType t).getPositionalTypeParameter(0) +} + +class RefMutType extends RefType { + RefMutType() { this.getStruct() instanceof Builtins::RefMutType } + + override string toString() { result = "&mut" } +} + +pragma[nomagic] +TypeParamTypeParameter getRefMutTypeParameter() { + result = any(RefMutType t).getPositionalTypeParameter(0) +} + +class RefSharedType extends RefType { + RefSharedType() { this.getStruct() instanceof Builtins::RefSharedType } override string toString() { result = "&" } } pragma[nomagic] -TypeParamTypeParameter getRefTypeParameter() { - result = any(RefType t).getPositionalTypeParameter(0) +TypeParamTypeParameter getRefSharedTypeParameter() { + result = any(RefSharedType t).getPositionalTypeParameter(0) } /** diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll index 3275d5d9895d..a004b2cbf4ff 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll @@ -500,7 +500,10 @@ module CertainTypeInference { n2 = ip.getName() and prefix1.isEmpty() and if ip.isRef() - then prefix2 = TypePath::singleton(getRefTypeParameter()) + then + if ip.isMut() + then prefix2 = TypePath::singleton(getRefMutTypeParameter()) + else prefix2 = TypePath::singleton(getRefSharedTypeParameter()) else prefix2.isEmpty() ) } @@ -719,9 +722,14 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat prefix2 = TypePath::singleton(inferRefExprType(re).getPositionalTypeParameter(0)) ) or - n1 = n2.(RefPat).getPat() and - prefix1.isEmpty() and - prefix2 = TypePath::singleton(getRefTypeParameter()) + n2 = + any(RefPat rp | + n1 = rp.getPat() and + prefix1.isEmpty() and + if rp.isMut() + then prefix2 = TypePath::singleton(getRefMutTypeParameter()) + else prefix2 = TypePath::singleton(getRefSharedTypeParameter()) + ) or exists(int i, int arity | prefix1.isEmpty() and @@ -1262,6 +1270,34 @@ private predicate isComplexRootStripped(TypePath path, Type type) { type != TNeverType() } +private newtype TBorrowKind = + TNoBorrowKind() or + TSharedBorrowKind() or + TMutBorrowKind() + +private class BorrowKind extends TBorrowKind { + predicate isNoBorrow() { this = TNoBorrowKind() } + + RefType getRefType() { + this = TSharedBorrowKind() and + result instanceof RefSharedType + or + this = TMutBorrowKind() and + result instanceof RefMutType + } + + string toString() { + this = TNoBorrowKind() and + result = "" + or + this = TSharedBorrowKind() and + result = "&" + or + this = TMutBorrowKind() and + result = "&mut" + } +} + /** * Provides logic for resolving calls to methods. * @@ -1304,7 +1340,7 @@ private module MethodResolution { * * `strippedTypePath` points to the type `strippedType` inside `selfType`, * which is the (possibly complex-stripped) root type of `selfType`. For example, - * if `m` has a `&self` parameter, then `strippedTypePath` is `getRefTypeParameter()` + * if `m` has a `&self` parameter, then `strippedTypePath` is `getRefSharedTypeParameter()` * and `strippedType` is the type inside the reference. */ pragma[nomagic] @@ -1520,7 +1556,7 @@ private module MethodResolution { or this.supportsAutoDerefAndBorrow() and exists(TypePath path0, Type t0, string derefChain0 | - this.hasNoCompatibleTargetBorrow(derefChain0) and + this.hasNoCompatibleTargetMutBorrow(derefChain0) and t0 = this.getACandidateReceiverTypeAtNoBorrow(derefChain0, path0) | path0.isCons(getRefTypeParameter(), path) and @@ -1545,7 +1581,7 @@ private module MethodResolution { */ pragma[nomagic] private predicate hasIncompatibleTarget( - ImplOrTraitItemNode i, string derefChain, boolean borrow, Type root + ImplOrTraitItemNode i, string derefChain, BorrowKind borrow, Type root ) { exists(TypePath path | ReceiverIsInstantiationOfSelfParam::argIsNotInstantiationOf(MkMethodCallCand(this, @@ -1562,7 +1598,7 @@ private module MethodResolution { */ pragma[nomagic] private predicate hasIncompatibleBlanketLikeTarget( - ImplItemNode impl, string derefChain, boolean borrow + ImplItemNode impl, string derefChain, BorrowKind borrow ) { ReceiverIsNotInstantiationOfBlanketLikeSelfParam::argIsNotInstantiationOf(MkMethodCallCand(this, derefChain, borrow), impl, _, _) @@ -1575,21 +1611,23 @@ private module MethodResolution { * Same as `getACandidateReceiverTypeAt`, but excludes pseudo types `!` and `unknown`. */ pragma[nomagic] - Type getANonPseudoCandidateReceiverTypeAt(string derefChain, boolean borrow, TypePath path) { + Type getANonPseudoCandidateReceiverTypeAt(string derefChain, BorrowKind borrow, TypePath path) { result = this.getACandidateReceiverTypeAt(derefChain, borrow, path) and result != TNeverType() and result != TUnknownType() } pragma[nomagic] - private Type getComplexStrippedType(string derefChain, boolean borrow, TypePath strippedTypePath) { + private Type getComplexStrippedType( + string derefChain, BorrowKind borrow, TypePath strippedTypePath + ) { result = this.getANonPseudoCandidateReceiverTypeAt(derefChain, borrow, strippedTypePath) and isComplexRootStripped(strippedTypePath, result) } bindingset[derefChain, borrow, strippedTypePath, strippedType] private predicate hasNoCompatibleNonBlanketLikeTargetCheck( - string derefChain, boolean borrow, TypePath strippedTypePath, Type strippedType + string derefChain, BorrowKind borrow, TypePath strippedTypePath, Type strippedType ) { forall(ImplOrTraitItemNode i | methodCallNonBlanketCandidate(this, _, i, _, strippedTypePath, strippedType) @@ -1600,7 +1638,7 @@ private module MethodResolution { bindingset[derefChain, borrow, strippedTypePath, strippedType] private predicate hasNoCompatibleTargetCheck( - string derefChain, boolean borrow, TypePath strippedTypePath, Type strippedType + string derefChain, BorrowKind borrow, TypePath strippedTypePath, Type strippedType ) { this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, borrow, strippedTypePath, strippedType) and @@ -1611,7 +1649,7 @@ private module MethodResolution { bindingset[derefChain, borrow, strippedTypePath, strippedType] private predicate hasNoCompatibleNonBlanketTargetCheck( - string derefChain, boolean borrow, TypePath strippedTypePath, Type strippedType + string derefChain, BorrowKind borrow, TypePath strippedTypePath, Type strippedType ) { this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, borrow, strippedTypePath, strippedType) and @@ -1634,12 +1672,12 @@ private module MethodResolution { // `ReceiverSatisfiesBlanketLikeConstraintInput::hasBlanketCandidate` derefChain = "" ) and - strippedType = this.getComplexStrippedType(derefChain, false, strippedTypePath) and + strippedType = this.getComplexStrippedType(derefChain, TNoBorrowKind(), strippedTypePath) and n = -1 or this.hasNoCompatibleTargetNoBorrowToIndex(derefChain, strippedTypePath, strippedType, n - 1) and exists(Type t | t = getNthLookupType(strippedType, n) | - this.hasNoCompatibleTargetCheck(derefChain, false, strippedTypePath, t) + this.hasNoCompatibleTargetCheck(derefChain, TNoBorrowKind(), strippedTypePath, t) ) } @@ -1667,13 +1705,13 @@ private module MethodResolution { // `ReceiverSatisfiesBlanketLikeConstraintInput::hasBlanketCandidate` derefChain = "" ) and - strippedType = this.getComplexStrippedType(derefChain, false, strippedTypePath) and + strippedType = this.getComplexStrippedType(derefChain, TNoBorrowKind(), strippedTypePath) and n = -1 or this.hasNoCompatibleNonBlanketTargetNoBorrowToIndex(derefChain, strippedTypePath, strippedType, n - 1) and exists(Type t | t = getNthLookupType(strippedType, n) | - this.hasNoCompatibleNonBlanketTargetCheck(derefChain, false, strippedTypePath, t) + this.hasNoCompatibleNonBlanketTargetCheck(derefChain, TNoBorrowKind(), strippedTypePath, t) ) } @@ -1691,55 +1729,114 @@ private module MethodResolution { // forex using recursion pragma[nomagic] - private predicate hasNoCompatibleTargetBorrowToIndex( + private predicate hasNoCompatibleTargetSharedBorrowToIndex( string derefChain, TypePath strippedTypePath, Type strippedType, int n ) { this.hasNoCompatibleTargetNoBorrow(derefChain) and - strippedType = this.getComplexStrippedType(derefChain, true, strippedTypePath) and + strippedType = this.getComplexStrippedType(derefChain, TSharedBorrowKind(), strippedTypePath) and n = -1 or - this.hasNoCompatibleTargetBorrowToIndex(derefChain, strippedTypePath, strippedType, n - 1) and + this.hasNoCompatibleTargetSharedBorrowToIndex(derefChain, strippedTypePath, strippedType, + n - 1) and exists(Type t | t = getNthLookupType(strippedType, n) | - this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, true, strippedTypePath, t) + this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, TSharedBorrowKind(), + strippedTypePath, t) ) } /** * Holds if the candidate receiver type represented by `derefChain`, followed - * by a borrow, does not have a matching method target. + * by a shared borrow, does not have a matching method target. */ pragma[nomagic] - predicate hasNoCompatibleTargetBorrow(string derefChain) { + predicate hasNoCompatibleTargetSharedBorrow(string derefChain) { exists(Type strippedType | - this.hasNoCompatibleTargetBorrowToIndex(derefChain, _, strippedType, + this.hasNoCompatibleTargetSharedBorrowToIndex(derefChain, _, strippedType, getLastLookupTypeIndex(strippedType)) ) } // forex using recursion pragma[nomagic] - private predicate hasNoCompatibleNonBlanketTargetBorrowToIndex( + private predicate hasNoCompatibleTargetMutBorrowToIndex( + string derefChain, TypePath strippedTypePath, Type strippedType, int n + ) { + this.hasNoCompatibleTargetSharedBorrow(derefChain) and + strippedType = this.getComplexStrippedType(derefChain, TMutBorrowKind(), strippedTypePath) and + n = -1 + or + this.hasNoCompatibleTargetMutBorrowToIndex(derefChain, strippedTypePath, strippedType, n - 1) and + exists(Type t | t = getNthLookupType(strippedType, n) | + this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, TMutBorrowKind(), + strippedTypePath, t) + ) + } + + /** + * Holds if the candidate receiver type represented by `derefChain`, followed + * by a `mut` borrow, does not have a matching method target. + */ + pragma[nomagic] + predicate hasNoCompatibleTargetMutBorrow(string derefChain) { + exists(Type strippedType | + this.hasNoCompatibleTargetMutBorrowToIndex(derefChain, _, strippedType, + getLastLookupTypeIndex(strippedType)) + ) + } + + // forex using recursion + pragma[nomagic] + private predicate hasNoCompatibleNonBlanketTargetSharedBorrowToIndex( string derefChain, TypePath strippedTypePath, Type strippedType, int n ) { this.hasNoCompatibleTargetNoBorrow(derefChain) and - strippedType = this.getComplexStrippedType(derefChain, true, strippedTypePath) and + strippedType = this.getComplexStrippedType(derefChain, TSharedBorrowKind(), strippedTypePath) and n = -1 or - this.hasNoCompatibleNonBlanketTargetBorrowToIndex(derefChain, strippedTypePath, strippedType, - n - 1) and + this.hasNoCompatibleNonBlanketTargetSharedBorrowToIndex(derefChain, strippedTypePath, + strippedType, n - 1) and + exists(Type t | t = getNthLookupType(strippedType, n) | + this.hasNoCompatibleNonBlanketTargetCheck(derefChain, TSharedBorrowKind(), strippedTypePath, + t) + ) + } + + /** + * Holds if the candidate receiver type represented by `derefChain`, followed + * by a shared borrow, does not have a matching non-blanket method target. + */ + pragma[nomagic] + predicate hasNoCompatibleNonBlanketTargetSharedBorrow(string derefChain) { + exists(Type strippedType | + this.hasNoCompatibleNonBlanketTargetSharedBorrowToIndex(derefChain, _, strippedType, + getLastLookupTypeIndex(strippedType)) + ) + } + + // forex using recursion + pragma[nomagic] + private predicate hasNoCompatibleNonBlanketTargetMutBorrowToIndex( + string derefChain, TypePath strippedTypePath, Type strippedType, int n + ) { + this.hasNoCompatibleNonBlanketTargetSharedBorrow(derefChain) and + strippedType = this.getComplexStrippedType(derefChain, TMutBorrowKind(), strippedTypePath) and + n = -1 + or + this.hasNoCompatibleNonBlanketTargetMutBorrowToIndex(derefChain, strippedTypePath, + strippedType, n - 1) and exists(Type t | t = getNthLookupType(strippedType, n) | - this.hasNoCompatibleNonBlanketTargetCheck(derefChain, true, strippedTypePath, t) + this.hasNoCompatibleNonBlanketTargetCheck(derefChain, TMutBorrowKind(), strippedTypePath, t) ) } /** * Holds if the candidate receiver type represented by `derefChain`, followed - * by a borrow, does not have a matching non-blanket method target. + * by a `mut` borrow, does not have a matching non-blanket method target. */ pragma[nomagic] - predicate hasNoCompatibleNonBlanketTargetBorrow(string derefChain) { + predicate hasNoCompatibleNonBlanketTargetMutBorrow(string derefChain) { exists(Type strippedType | - this.hasNoCompatibleNonBlanketTargetBorrowToIndex(derefChain, _, strippedType, + this.hasNoCompatibleNonBlanketTargetMutBorrowToIndex(derefChain, _, strippedType, getLastLookupTypeIndex(strippedType)) ) } @@ -1757,20 +1854,29 @@ private module MethodResolution { * [1]: https://doc.rust-lang.org/reference/expressions/method-call-expr.html#r-expr.method.candidate-receivers */ pragma[nomagic] - Type getACandidateReceiverTypeAt(string derefChain, boolean borrow, TypePath path) { + Type getACandidateReceiverTypeAt(string derefChain, BorrowKind borrow, TypePath path) { result = this.getACandidateReceiverTypeAtNoBorrow(derefChain, path) and - borrow = false + borrow = TNoBorrowKind() or - this.supportsAutoDerefAndBorrow() and - this.hasNoCompatibleTargetNoBorrow(derefChain) and - borrow = true and - ( - path.isEmpty() and - result instanceof RefType + exists(RefType rt | + // first try shared borrow + this.supportsAutoDerefAndBorrow() and + this.hasNoCompatibleTargetNoBorrow(derefChain) and + borrow = TSharedBorrowKind() or - exists(TypePath suffix | - result = this.getACandidateReceiverTypeAtNoBorrow(derefChain, suffix) and - path = TypePath::cons(getRefTypeParameter(), suffix) + // then try mutable borrow + this.hasNoCompatibleTargetSharedBorrow(derefChain) and + borrow = TMutBorrowKind() + | + rt = borrow.getRefType() and + ( + path.isEmpty() and + result = rt + or + exists(TypePath suffix | + result = this.getACandidateReceiverTypeAtNoBorrow(derefChain, suffix) and + path = TypePath::cons(rt.getPositionalTypeParameter(0), suffix) + ) ) ) } @@ -1778,10 +1884,10 @@ private module MethodResolution { /** * Gets a method that this call resolves to after having applied a sequence of * dereferences and possibly a borrow on the receiver type, encoded in the string - * `derefChain` and the Boolean `borrow`. + * `derefChain` and the enum `borrow`. */ pragma[nomagic] - Method resolveCallTarget(ImplOrTraitItemNode i, string derefChain, boolean borrow) { + Method resolveCallTarget(ImplOrTraitItemNode i, string derefChain, BorrowKind borrow) { exists(MethodCallCand mcc | mcc = MkMethodCallCand(this, derefChain, borrow) and result = mcc.resolveCallTarget(i) @@ -1789,12 +1895,13 @@ private module MethodResolution { } predicate receiverHasImplicitDeref(AstNode receiver) { - exists(this.resolveCallTarget(_, ".ref", false)) and + exists(this.resolveCallTarget(_, ".ref", TNoBorrowKind())) and receiver = this.getArg(any(ArgumentPosition pos | pos.isSelf())) } - predicate argumentHasImplicitBorrow(AstNode arg) { - exists(this.resolveCallTarget(_, "", true)) and + predicate argumentHasImplicitBorrow(AstNode arg, BorrowKind borrow) { + exists(this.resolveCallTarget(_, "", borrow)) and + borrow != TNoBorrowKind() and arg = this.getArg(any(ArgumentPosition pos | pos.isSelf())) } } @@ -1903,30 +2010,41 @@ private module MethodResolution { result = super.getOperand(pos.asPosition() + 1) } - private predicate implicitBorrowAt(ArgumentPosition pos) { + private predicate implicitBorrowAt(ArgumentPosition pos, BorrowKind borrow) { exists(int borrows | super.isOverloaded(_, _, borrows) | - pos.isSelf() and borrows >= 1 + pos.isSelf() and + borrows >= 1 and + if this instanceof AssignmentOperation + then borrow = TMutBorrowKind() + else borrow = TSharedBorrowKind() or - pos.asPosition() = 0 and borrows = 2 + pos.asPosition() = 0 and + borrows = 2 and + borrow = TSharedBorrowKind() ) } override Type getArgumentTypeAt(ArgumentPosition pos, TypePath path) { - if this.implicitBorrowAt(pos) - then - result instanceof RefType and + exists(BorrowKind borrow, RefType rt | + this.implicitBorrowAt(pos, borrow) and + rt = borrow.getRefType() + | + result = rt and path.isEmpty() or exists(TypePath path0 | result = inferType(this.getArg(pos), path0) and - path = TypePath::cons(getRefTypeParameter(), path0) + path = TypePath::cons(rt.getPositionalTypeParameter(0), path0) ) - else result = inferType(this.getArg(pos), path) + ) + or + not this.implicitBorrowAt(pos, _) and + result = inferType(this.getArg(pos), path) } - override predicate argumentHasImplicitBorrow(AstNode arg) { + override predicate argumentHasImplicitBorrow(AstNode arg, BorrowKind borrow) { exists(ArgumentPosition pos | - this.implicitBorrowAt(pos) and + this.implicitBorrowAt(pos, borrow) and arg = this.getArg(pos) ) } @@ -1943,7 +2061,7 @@ private module MethodResolution { } private newtype TMethodCallCand = - MkMethodCallCand(MethodCall mc, string derefChain, boolean borrow) { + MkMethodCallCand(MethodCall mc, string derefChain, BorrowKind borrow) { exists(mc.getACandidateReceiverTypeAt(derefChain, borrow, _)) } @@ -1951,7 +2069,7 @@ private module MethodResolution { private class MethodCallCand extends MkMethodCallCand { MethodCall mc_; string derefChain; - boolean borrow; + BorrowKind borrow; MethodCallCand() { this = MkMethodCallCand(mc_, derefChain, borrow) } @@ -1964,11 +2082,14 @@ private module MethodResolution { pragma[nomagic] predicate hasNoCompatibleNonBlanketTarget() { - mc_.hasNoCompatibleNonBlanketTargetBorrow(derefChain) and - borrow = true + mc_.hasNoCompatibleNonBlanketTargetSharedBorrow(derefChain) and + borrow = TSharedBorrowKind() + or + mc_.hasNoCompatibleNonBlanketTargetMutBorrow(derefChain) and + borrow = TMutBorrowKind() or mc_.hasNoCompatibleNonBlanketTargetNoBorrow(derefChain) and - borrow = false + borrow = TNoBorrowKind() } pragma[nomagic] @@ -2039,8 +2160,6 @@ private module MethodResolution { MethodArgsAreInstantiationsOf::argsAreInstantiationsOf(this, i, result) } - predicate hasNoBorrow() { borrow = false } - string toString() { result = mc_.toString() + " [" + derefChain + "; " + borrow + "]" } Location getLocation() { result = mc_.getLocation() } @@ -2053,17 +2172,17 @@ private module MethodResolution { predicate hasBlanketCandidate( MethodCallCand mcc, ImplItemNode impl, TypePath blanketPath, TypeParam blanketTypeParam ) { - exists(MethodCall mc | - mc = mcc.getMethodCall() and + exists(MethodCall mc, BorrowKind borrow | + mcc = MkMethodCallCand(mc, _, borrow) and methodCallBlanketLikeCandidate(mc, _, impl, _, blanketPath, blanketTypeParam) and // Only apply blanket implementations when no other implementations are possible; // this is to account for codebases that use the (unstable) specialization feature // (https://rust-lang.github.io/rfcs/1210-impl-specialization.html) (mcc.hasNoCompatibleNonBlanketTarget() or not impl.isBlanketImplementation()) | - mcc.hasNoBorrow() + borrow.isNoBorrow() or - blanketPath.getHead() = getRefTypeParameter() + blanketPath.getHead() = borrow.getRefType().getPositionalTypeParameter(0) ) } } @@ -2272,10 +2391,8 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi class AccessEnvironment = string; bindingset[derefChain, borrow] - private AccessEnvironment encodeDerefChainBorrow(string derefChain, boolean borrow) { - exists(string suffix | if borrow = true then suffix = "borrow" else suffix = "" | - result = derefChain + ";" + suffix - ) + private AccessEnvironment encodeDerefChainBorrow(string derefChain, BorrowKind borrow) { + result = derefChain + ";" + borrow } final private class MethodCallFinal = MethodResolution::MethodCall; @@ -2300,7 +2417,7 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi pragma[nomagic] private Type getInferredSelfType(AccessPosition apos, string derefChainBorrow, TypePath path) { - exists(string derefChain, boolean borrow | + exists(string derefChain, BorrowKind borrow | result = this.getACandidateReceiverTypeAt(derefChain, borrow, path) and derefChainBorrow = encodeDerefChainBorrow(derefChain, borrow) and apos.isSelf() @@ -2336,7 +2453,7 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi } Method getTarget(ImplOrTraitItemNode i, string derefChainBorrow) { - exists(string derefChain, boolean borrow | + exists(string derefChain, BorrowKind borrow | derefChainBorrow = encodeDerefChainBorrow(derefChain, borrow) and result = this.resolveCallTarget(i, derefChain, borrow) // mutual recursion; resolving method calls requires resolving types and vice versa ) @@ -2411,7 +2528,7 @@ private Type inferMethodCallType1(AstNode n, boolean isReturn, TypePath path) { or // adjust for implicit borrow apos.isSelf() and - derefChainBorrow = ";borrow" and + derefChainBorrow = [";&", ";&mut"] and path0.isCons(getRefTypeParameter(), path) ) } @@ -3218,14 +3335,26 @@ private Type inferRefExprType(RefExpr ref) { ref.isMut() and result instanceof PtrMutType or ref.isConst() and result instanceof PtrConstType - else result instanceof RefType + else + if ref.isMut() + then result instanceof RefMutType + else result instanceof RefSharedType } /** Gets the root type of the reference node `ref`. */ pragma[nomagic] private Type inferRefPatType(AstNode ref) { - (ref = any(IdentPat ip | ip.isRef()).getName() or ref instanceof RefPat) and - result instanceof RefType + exists(boolean isMut | + ref = + any(IdentPat ip | + ip.isRef() and + if ip.isMut() then isMut = true else isMut = false + ).getName() + or + ref = any(RefPat rp | if rp.isMut() then isMut = true else isMut = false) + | + if isMut = true then result instanceof RefMutType else result instanceof RefSharedType + ) } pragma[nomagic] @@ -3279,9 +3408,9 @@ private Type inferLiteralType(LiteralExpr le, TypePath path, boolean certain) { or le instanceof StringLiteralExpr and ( - path.isEmpty() and result instanceof RefType + path.isEmpty() and result instanceof RefSharedType or - path = TypePath::singleton(getRefTypeParameter()) and + path = TypePath::singleton(getRefSharedTypeParameter()) and result = getStrStruct() ) and certain = true @@ -3715,7 +3844,7 @@ private module Cached { /** Holds if `n` is implicitly borrowed. */ cached predicate implicitBorrow(AstNode n) { - any(MethodResolution::MethodCall mc).argumentHasImplicitBorrow(n) + any(MethodResolution::MethodCall mc).argumentHasImplicitBorrow(n, _) } /** diff --git a/rust/ql/lib/codeql/rust/internal/TypeMention.qll b/rust/ql/lib/codeql/rust/internal/TypeMention.qll index 3e2ca8111079..4da6a3aca346 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeMention.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeMention.qll @@ -54,13 +54,16 @@ class ArrayTypeReprMention extends TypeMention instanceof ArrayTypeRepr { } class RefTypeReprMention extends TypeMention instanceof RefTypeRepr { + private RefType resolveRootType() { + if super.isMut() then result instanceof RefMutType else result instanceof RefSharedType + } + override Type resolveTypeAt(TypePath path) { - path.isEmpty() and - result instanceof RefType + path.isEmpty() and result = this.resolveRootType() or exists(TypePath suffix | result = super.getTypeRepr().(TypeMention).resolveTypeAt(suffix) and - path = TypePath::cons(getRefTypeParameter(), suffix) + path = TypePath::cons(this.resolveRootType().getPositionalTypeParameter(0), suffix) ) } } @@ -438,20 +441,24 @@ class ShorthandSelfParameterMention extends TypeMention instanceof SelfParam { private Type resolveSelfType(TypePath path) { result = resolveImplOrTraitType(encl, path) } + private RefType resolveSelfRefRootType() { + super.isRef() and + if super.isMut() then result instanceof RefMutType else result instanceof RefSharedType + } + override Type resolveTypeAt(TypePath typePath) { - if super.isRef() - then - // `fn f(&self, ...)` - typePath.isEmpty() and - result instanceof RefType - or - exists(TypePath suffix | - result = this.resolveSelfType(suffix) and - typePath = TypePath::cons(getRefTypeParameter(), suffix) - ) - else - // `fn f(self, ...)` - result = this.resolveSelfType(typePath) + // `fn f(&self, ...)` + typePath.isEmpty() and + result = this.resolveSelfRefRootType() + or + exists(TypePath suffix | + result = this.resolveSelfType(suffix) and + typePath = TypePath::cons(this.resolveSelfRefRootType().getPositionalTypeParameter(0), suffix) + ) + or + // `fn f(self, ...)` + not super.isRef() and + result = this.resolveSelfType(typePath) } } diff --git a/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index f5a5b9b7b194..000000000000 --- a/rust/ql/test/extractor-tests/macro-expansion/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleResolvedTargets -| proc_macro.rs:44:27:44:30 | ...::to_tokens(...) | diff --git a/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 97a93c16a2d7..000000000000 --- a/rust/ql/test/library-tests/controlflow/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,4 +0,0 @@ -multipleResolvedTargets -| test.rs:419:34:419:35 | * ... | -| test.rs:420:26:420:27 | * ... | -| test.rs:597:9:597:10 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/collections/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/collections/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 9ff99af9fac7..000000000000 --- a/rust/ql/test/library-tests/dataflow/collections/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,8 +0,0 @@ -multipleResolvedTargets -| main.rs:18:14:18:26 | * ... | -| main.rs:22:14:22:26 | * ... | -| main.rs:42:9:42:25 | * ... | -| main.rs:85:15:85:25 | * ... | -| main.rs:94:9:94:23 | * ... | -| main.rs:104:9:104:23 | * ... | -| main.rs:110:10:110:24 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 603574572d8a..000000000000 --- a/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -multipleResolvedTargets -| main.rs:252:11:252:15 | * ... | -| main.rs:288:13:288:29 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/global/viableCallable.expected b/rust/ql/test/library-tests/dataflow/global/viableCallable.expected index fa2d58f5a3a5..d90eebdf5e51 100644 --- a/rust/ql/test/library-tests/dataflow/global/viableCallable.expected +++ b/rust/ql/test/library-tests/dataflow/global/viableCallable.expected @@ -61,7 +61,6 @@ | main.rs:228:24:228:33 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:230:5:230:11 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:252:11:252:15 | * ... | {EXTERNAL LOCATION} | fn deref | -| main.rs:252:11:252:15 | * ... | {EXTERNAL LOCATION} | fn deref | | main.rs:258:28:258:36 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:260:13:260:17 | ... + ... | main.rs:236:5:239:5 | fn add | | main.rs:261:5:261:17 | sink(...) | main.rs:5:1:7:1 | fn sink | @@ -79,7 +78,6 @@ | main.rs:283:5:283:17 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:286:28:286:37 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:288:13:288:29 | * ... | {EXTERNAL LOCATION} | fn deref | -| main.rs:288:13:288:29 | * ... | {EXTERNAL LOCATION} | fn deref | | main.rs:288:14:288:29 | ...::deref(...) | main.rs:251:5:253:5 | fn deref | | main.rs:289:5:289:11 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:291:28:291:37 | source(...) | main.rs:1:1:3:1 | fn source | diff --git a/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index f99062c73d14..000000000000 --- a/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleResolvedTargets -| main.rs:562:10:562:15 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 9ec1dde87a0a..000000000000 --- a/rust/ql/test/library-tests/dataflow/modeled/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleResolvedTargets -| main.rs:115:14:115:35 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 3610f0614060..000000000000 --- a/rust/ql/test/library-tests/dataflow/pointers/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,26 +0,0 @@ -multipleResolvedTargets -| main.rs:19:17:19:18 | * ... | -| main.rs:53:14:53:15 | * ... | -| main.rs:59:33:59:34 | * ... | -| main.rs:72:14:72:15 | * ... | -| main.rs:73:9:73:10 | * ... | -| main.rs:74:14:74:15 | * ... | -| main.rs:75:9:75:10 | * ... | -| main.rs:76:14:76:15 | * ... | -| main.rs:83:9:83:10 | * ... | -| main.rs:90:9:90:17 | * ... | -| main.rs:97:9:97:10 | * ... | -| main.rs:105:9:105:10 | * ... | -| main.rs:106:14:106:15 | * ... | -| main.rs:113:14:113:15 | * ... | -| main.rs:114:9:114:10 | * ... | -| main.rs:115:14:115:15 | * ... | -| main.rs:122:9:122:10 | * ... | -| main.rs:125:9:125:10 | * ... | -| main.rs:135:17:135:18 | * ... | -| main.rs:136:17:136:18 | * ... | -| main.rs:201:9:201:10 | * ... | -| main.rs:209:14:209:15 | * ... | -| main.rs:211:14:211:15 | * ... | -| main.rs:224:13:224:17 | * ... | -| main.rs:229:9:229:10 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected index 2c7fbc9381f8..55b07f9efcc9 100644 --- a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected @@ -1,5 +1,6 @@ models | 1 | Summary: <& as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value | +| 2 | Summary: <&mut as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value | edges | main.rs:17:13:17:13 | a | main.rs:18:18:18:18 | a | provenance | | | main.rs:17:17:17:26 | source(...) | main.rs:17:13:17:13 | a | provenance | | @@ -40,17 +41,17 @@ edges | main.rs:59:34:59:34 | p [&ref] | main.rs:59:33:59:34 | * ... | provenance | MaD:1 | | main.rs:73:10:73:10 | [post] b [&ref] | main.rs:74:15:74:15 | b [&ref] | provenance | | | main.rs:73:14:73:23 | source(...) | main.rs:73:10:73:10 | [post] b [&ref] | provenance | | -| main.rs:74:15:74:15 | b [&ref] | main.rs:74:14:74:15 | * ... | provenance | MaD:1 | +| main.rs:74:15:74:15 | b [&ref] | main.rs:74:14:74:15 | * ... | provenance | MaD:2 | | main.rs:90:11:90:16 | [post] &mut a [&ref] | main.rs:90:16:90:16 | [post] a | provenance | | | main.rs:90:16:90:16 | [post] a | main.rs:91:14:91:14 | a | provenance | | | main.rs:90:21:90:30 | source(...) | main.rs:90:11:90:16 | [post] &mut a [&ref] | provenance | | | main.rs:105:10:105:10 | [post] c [&ref] | main.rs:106:15:106:15 | c [&ref] | provenance | | | main.rs:105:14:105:23 | source(...) | main.rs:105:10:105:10 | [post] c [&ref] | provenance | | -| main.rs:106:15:106:15 | c [&ref] | main.rs:106:14:106:15 | * ... | provenance | MaD:1 | +| main.rs:106:15:106:15 | c [&ref] | main.rs:106:14:106:15 | * ... | provenance | MaD:2 | | main.rs:112:13:112:21 | ref mut a | main.rs:112:21:112:21 | a [&ref] | provenance | | | main.rs:112:21:112:21 | a [&ref] | main.rs:113:15:113:15 | a [&ref] | provenance | | | main.rs:112:25:112:34 | source(...) | main.rs:112:13:112:21 | ref mut a | provenance | | -| main.rs:113:15:113:15 | a [&ref] | main.rs:113:14:113:15 | * ... | provenance | MaD:1 | +| main.rs:113:15:113:15 | a [&ref] | main.rs:113:14:113:15 | * ... | provenance | MaD:2 | | main.rs:149:14:149:24 | ...: MyNumber [MyNumber] | main.rs:150:11:150:11 | m [MyNumber] | provenance | | | main.rs:150:11:150:11 | m [MyNumber] | main.rs:151:9:151:34 | ...::MyNumber(...) [MyNumber] | provenance | | | main.rs:151:9:151:34 | ...::MyNumber(...) [MyNumber] | main.rs:151:28:151:33 | number | provenance | | @@ -92,7 +93,7 @@ edges | main.rs:210:17:210:17 | [post] p [&ref] | main.rs:211:15:211:15 | p [&ref] | provenance | | | main.rs:210:20:210:29 | source(...) | main.rs:200:29:200:38 | ...: i64 | provenance | | | main.rs:210:20:210:29 | source(...) | main.rs:210:17:210:17 | [post] p [&ref] | provenance | | -| main.rs:211:15:211:15 | p [&ref] | main.rs:211:14:211:15 | * ... | provenance | MaD:1 | +| main.rs:211:15:211:15 | p [&ref] | main.rs:211:14:211:15 | * ... | provenance | MaD:2 | | main.rs:218:17:218:22 | [post] &mut n [&ref] | main.rs:218:22:218:22 | [post] n | provenance | | | main.rs:218:22:218:22 | [post] n | main.rs:219:14:219:14 | n | provenance | | | main.rs:218:25:218:34 | source(...) | main.rs:200:29:200:38 | ...: i64 | provenance | | diff --git a/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected index 5dfb62baf4b3..8ca58acd1d06 100644 --- a/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/sources/net/CONSISTENCY/PathResolutionConsistency.expected @@ -1,9 +1,6 @@ multipleResolvedTargets -| test.rs:59:62:59:77 | ...::from(...) | -| test.rs:66:58:66:73 | ...::from(...) | | test.rs:389:30:389:67 | pinned.poll_read(...) | | test.rs:416:26:416:54 | pinned.poll_fill_buf(...) | | test.rs:423:27:423:71 | ... .poll_fill_buf(...) | | test.rs:447:30:447:67 | pinned.poll_read(...) | | test.rs:470:26:470:54 | pinned.poll_fill_buf(...) | -| test.rs:519:50:519:66 | ...::from(...) | diff --git a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index a8f80f6f39cf..000000000000 --- a/rust/ql/test/library-tests/dataflow/strings/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleResolvedTargets -| main.rs:52:14:52:29 | ...::from(...) | diff --git a/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 8ebb39522b36..000000000000 --- a/rust/ql/test/library-tests/definitions/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,5 +0,0 @@ -multipleResolvedTargets -| main.rs:35:5:35:14 | * ... | -| main.rs:35:5:35:14 | * ... | -| main.rs:35:5:35:14 | * ... | -| main.rs:35:5:35:14 | * ... | diff --git a/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index cb94b0abf165..000000000000 --- a/rust/ql/test/library-tests/elements/operations/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleResolvedTargets -| test.rs:52:2:52:5 | * ... | diff --git a/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 93e644c9abbc..000000000000 --- a/rust/ql/test/library-tests/formatstrings/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,45 +0,0 @@ -multipleResolvedTargets -| main.rs:28:5:28:14 | * ... | -| main.rs:28:5:28:14 | * ... | -| main.rs:28:5:28:14 | * ... | -| main.rs:28:5:28:14 | * ... | -| main.rs:29:5:29:14 | * ... | -| main.rs:29:5:29:14 | * ... | -| main.rs:29:5:29:14 | * ... | -| main.rs:29:5:29:14 | * ... | -| main.rs:30:5:30:14 | * ... | -| main.rs:30:5:30:14 | * ... | -| main.rs:30:5:30:14 | * ... | -| main.rs:30:5:30:14 | * ... | -| main.rs:31:5:31:14 | * ... | -| main.rs:31:5:31:14 | * ... | -| main.rs:31:5:31:14 | * ... | -| main.rs:31:5:31:14 | * ... | -| main.rs:33:5:33:14 | * ... | -| main.rs:33:5:33:14 | * ... | -| main.rs:33:5:33:14 | * ... | -| main.rs:33:5:33:14 | * ... | -| main.rs:34:5:34:14 | * ... | -| main.rs:34:5:34:14 | * ... | -| main.rs:34:5:34:14 | * ... | -| main.rs:34:5:34:14 | * ... | -| main.rs:35:5:35:14 | * ... | -| main.rs:35:5:35:14 | * ... | -| main.rs:35:5:35:14 | * ... | -| main.rs:35:5:35:14 | * ... | -| main.rs:36:5:36:14 | * ... | -| main.rs:36:5:36:14 | * ... | -| main.rs:36:5:36:14 | * ... | -| main.rs:36:5:36:14 | * ... | -| main.rs:37:5:37:14 | * ... | -| main.rs:37:5:37:14 | * ... | -| main.rs:37:5:37:14 | * ... | -| main.rs:37:5:37:14 | * ... | -| main.rs:75:5:75:14 | * ... | -| main.rs:75:5:75:14 | * ... | -| main.rs:75:5:75:14 | * ... | -| main.rs:75:5:75:14 | * ... | -| main.rs:76:5:76:14 | * ... | -| main.rs:76:5:76:14 | * ... | -| main.rs:76:5:76:14 | * ... | -| main.rs:76:5:76:14 | * ... | diff --git a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected index e00293919a6f..28242d86a7b2 100644 --- a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected @@ -1,35 +1,2 @@ multipleResolvedTargets -| blanket_impl.rs:33:13:33:17 | * ... | -| dereference.rs:69:15:69:24 | e1.deref() | -| dereference.rs:73:15:73:17 | * ... | -| dereference.rs:77:16:77:18 | * ... | -| dereference.rs:182:17:182:26 | ... .foo() | -| dereference.rs:183:17:183:23 | S.foo() | -| dereference.rs:184:17:184:30 | ... .foo() | -| dereference.rs:186:17:186:25 | S.bar(...) | -| dereference.rs:187:17:187:29 | S.bar(...) | -| dyn_type.rs:65:20:65:23 | * ... | -| dyn_type.rs:69:21:69:24 | * ... | -| dyn_type.rs:90:10:90:13 | * ... | -| invalid/main.rs:69:13:69:17 | * ... | -| invalid/main.rs:76:13:76:17 | * ... | -| main.rs:1092:14:1092:18 | * ... | -| main.rs:1174:26:1174:30 | * ... | -| main.rs:1518:14:1518:21 | * ... | -| main.rs:1518:16:1518:20 | * ... | -| main.rs:1523:14:1523:18 | * ... | -| main.rs:1554:27:1554:29 | * ... | -| main.rs:1668:17:1668:24 | * ... | -| main.rs:1668:18:1668:24 | * ... | -| main.rs:1806:17:1806:21 | * ... | -| main.rs:1821:28:1821:32 | * ... | -| main.rs:2454:13:2454:18 | * ... | -| main.rs:2648:13:2648:31 | ...::from(...) | -| main.rs:2649:13:2649:31 | ...::from(...) | -| main.rs:2650:13:2650:31 | ...::from(...) | -| main.rs:2656:13:2656:31 | ...::from(...) | -| main.rs:2657:13:2657:31 | ...::from(...) | -| main.rs:2658:13:2658:31 | ...::from(...) | | main.rs:3087:13:3087:17 | x.f() | -| pattern_matching.rs:273:13:273:27 | * ... | -| pattern_matching.rs:273:14:273:27 | * ... | diff --git a/rust/ql/test/library-tests/type-inference/dereference.rs b/rust/ql/test/library-tests/type-inference/dereference.rs index f84d03a3a4e6..6b8d659eb3e1 100644 --- a/rust/ql/test/library-tests/type-inference/dereference.rs +++ b/rust/ql/test/library-tests/type-inference/dereference.rs @@ -179,12 +179,12 @@ mod ref_vs_mut_ref { } pub fn test() { - let x = (&S).foo(); // $ target=MyTrait1::foo1 type=x:S $ SPURIOUS: target=MyTrait1::foo2 - let y = S.foo(); // $ target=MyTrait1::foo1 type=y:S $ SPURIOUS: target=MyTrait1::foo2 - let z = (&mut S).foo(); // $ target=MyTrait1::foo2 type=z:i64 $ SPURIOUS: target=MyTrait1::foo1 + let x = (&S).foo(); // $ target=MyTrait1::foo1 type=x:S + let y = S.foo(); // $ target=MyTrait1::foo1 type=y:S + let z = (&mut S).foo(); // $ target=MyTrait1::foo2 type=z:i64 - let x = S.bar(&S); // $ target=MyTrait2::bar1 type=x:S $ SPURIOUS: target=MyTrait2::bar2 - let y = S.bar(&mut S); // $ target=MyTrait2::bar2 type=y:i64 $ SPURIOUS: target=MyTrait2::bar1 + let x = S.bar(&S); // $ target=MyTrait2::bar1 type=x:S + let y = S.bar(&mut S); // $ target=MyTrait2::bar2 type=y:i64 } } @@ -212,7 +212,7 @@ mod rust_reference_example { pub fn main() { let mut f = Foo {}; - f.bar(); // $ SPURIOUS: target=bar1 $ MISSING: target=bar2 + f.bar(); // $ target=bar2 } } diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs index a45b97d306d6..d367525c7b8a 100644 --- a/rust/ql/test/library-tests/type-inference/main.rs +++ b/rust/ql/test/library-tests/type-inference/main.rs @@ -2640,7 +2640,7 @@ mod loops { let mut strings1 = ["foo", "bar", "baz"]; // $ type=strings1:TArray.TRef.str for s in &strings1 {} // $ type=s:TRef.TRef.str - for s in &mut strings1 {} // $ type=s:TRef.TRef.str + for s in &mut strings1 {} // $ type=s:TRefMut.TRef.str for s in strings1 {} // $ type=s:TRef.str let strings2 = // $ type=strings2:TArray.String diff --git a/rust/ql/test/library-tests/type-inference/pattern_matching.rs b/rust/ql/test/library-tests/type-inference/pattern_matching.rs index b7f96cd555b0..33e6b9f09f30 100755 --- a/rust/ql/test/library-tests/type-inference/pattern_matching.rs +++ b/rust/ql/test/library-tests/type-inference/pattern_matching.rs @@ -269,7 +269,7 @@ pub fn identifier_patterns() { let mut ref_mut_val = 5i32; match &mut ref_mut_val { ref mut x => { - let ref_mut_bound = x; // $ type=ref_mut_bound:TRef.TRef.i32 + let ref_mut_bound = x; // $ type=ref_mut_bound:TRefMut.TRefMut.i32 **ref_mut_bound += 1; // $ target=deref target=add_assign println!("Ref mut pattern"); } 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 1c69fe5a44b0..d5b9e30f05e4 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -418,8 +418,8 @@ inferCertainType | dereference.rs:151:16:151:19 | SelfParam | | {EXTERNAL LOCATION} | & | | dereference.rs:151:16:151:19 | SelfParam | TRef | dereference.rs:147:5:147:13 | S | | dereference.rs:151:27:153:9 | { ... } | | dereference.rs:147:5:147:13 | S | -| dereference.rs:158:16:158:19 | SelfParam | | {EXTERNAL LOCATION} | & | -| dereference.rs:158:16:158:19 | SelfParam | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:158:16:158:19 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:158:16:158:19 | SelfParam | TRefMut | dereference.rs:147:5:147:13 | S | | dereference.rs:158:29:160:9 | { ... } | | {EXTERNAL LOCATION} | i64 | | dereference.rs:164:16:164:19 | SelfParam | | dereference.rs:163:5:165:5 | Self [trait MyTrait2] | | dereference.rs:164:22:164:24 | arg | | dereference.rs:163:20:163:21 | T1 | @@ -428,20 +428,20 @@ inferCertainType | dereference.rs:169:22:169:24 | arg | TRef | dereference.rs:147:5:147:13 | S | | dereference.rs:169:36:171:9 | { ... } | | dereference.rs:147:5:147:13 | S | | dereference.rs:176:16:176:19 | SelfParam | | dereference.rs:147:5:147:13 | S | -| dereference.rs:176:22:176:24 | arg | | {EXTERNAL LOCATION} | & | -| dereference.rs:176:22:176:24 | arg | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:176:22:176:24 | arg | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:176:22:176:24 | arg | TRefMut | dereference.rs:147:5:147:13 | S | | dereference.rs:176:42:178:9 | { ... } | | {EXTERNAL LOCATION} | i64 | | dereference.rs:181:19:188:5 | { ... } | | {EXTERNAL LOCATION} | () | | dereference.rs:182:17:182:20 | (...) | | {EXTERNAL LOCATION} | & | | dereference.rs:182:18:182:19 | &S | | {EXTERNAL LOCATION} | & | -| dereference.rs:184:17:184:24 | (...) | | {EXTERNAL LOCATION} | & | -| dereference.rs:184:18:184:23 | &mut S | | {EXTERNAL LOCATION} | & | +| dereference.rs:184:17:184:24 | (...) | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:184:18:184:23 | &mut S | | {EXTERNAL LOCATION} | &mut | | dereference.rs:186:23:186:24 | &S | | {EXTERNAL LOCATION} | & | -| dereference.rs:187:23:187:28 | &mut S | | {EXTERNAL LOCATION} | & | +| dereference.rs:187:23:187:28 | &mut S | | {EXTERNAL LOCATION} | &mut | | dereference.rs:196:16:196:20 | SelfParam | | {EXTERNAL LOCATION} | & | | dereference.rs:196:16:196:20 | SelfParam | TRef | dereference.rs:195:5:197:5 | Self [trait Bar] | -| dereference.rs:201:16:201:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| dereference.rs:201:16:201:24 | SelfParam | TRef | dereference.rs:193:5:193:17 | Foo | +| dereference.rs:201:16:201:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:201:16:201:24 | SelfParam | TRefMut | dereference.rs:193:5:193:17 | Foo | | dereference.rs:201:27:203:9 | { ... } | | {EXTERNAL LOCATION} | () | | dereference.rs:202:22:202:38 | "In struct impl!\\n" | | {EXTERNAL LOCATION} | & | | dereference.rs:202:22:202:38 | "In struct impl!\\n" | TRef | {EXTERNAL LOCATION} | str | @@ -1803,19 +1803,19 @@ inferCertainType | main.rs:1389:13:1389:13 | x | T.T42 | main.rs:1347:5:1347:22 | S5 | | main.rs:1389:13:1389:13 | x | T.T42.T5 | main.rs:1322:5:1323:14 | S2 | | main.rs:1391:22:1391:25 | true | | {EXTERNAL LOCATION} | bool | -| main.rs:1404:16:1404:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1404:16:1404:24 | SelfParam | TRef | main.rs:1402:5:1409:5 | Self [trait MyTrait] | +| main.rs:1404:16:1404:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1404:16:1404:24 | SelfParam | TRefMut | main.rs:1402:5:1409:5 | Self [trait MyTrait] | | main.rs:1404:27:1404:31 | value | | main.rs:1402:19:1402:19 | S | -| main.rs:1406:21:1406:29 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1406:21:1406:29 | SelfParam | TRef | main.rs:1402:5:1409:5 | Self [trait MyTrait] | +| main.rs:1406:21:1406:29 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1406:21:1406:29 | SelfParam | TRefMut | main.rs:1402:5:1409:5 | Self [trait MyTrait] | | main.rs:1406:32:1406:36 | value | | main.rs:1402:19:1402:19 | S | | main.rs:1406:42:1408:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1407:13:1407:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1407:13:1407:16 | self | TRef | main.rs:1402:5:1409:5 | Self [trait MyTrait] | +| main.rs:1407:13:1407:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1407:13:1407:16 | self | TRefMut | main.rs:1402:5:1409:5 | Self [trait MyTrait] | | main.rs:1407:22:1407:26 | value | | main.rs:1402:19:1402:19 | S | -| main.rs:1413:16:1413:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1413:16:1413:24 | SelfParam | TRef | main.rs:1396:5:1400:5 | MyOption | -| main.rs:1413:16:1413:24 | SelfParam | TRef.T | main.rs:1411:10:1411:10 | T | +| main.rs:1413:16:1413:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1413:16:1413:24 | SelfParam | TRefMut | main.rs:1396:5:1400:5 | MyOption | +| main.rs:1413:16:1413:24 | SelfParam | TRefMut.T | main.rs:1411:10:1411:10 | T | | main.rs:1413:27:1413:31 | value | | main.rs:1411:10:1411:10 | T | | main.rs:1413:37:1413:38 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1417:26:1419:9 | { ... } | | main.rs:1396:5:1400:5 | MyOption | @@ -1858,7 +1858,7 @@ inferCertainType | main.rs:1446:17:1446:18 | x4 | | main.rs:1396:5:1400:5 | MyOption | | main.rs:1446:22:1446:36 | ...::new(...) | | main.rs:1396:5:1400:5 | MyOption | | main.rs:1447:9:1447:33 | ...::set(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1447:23:1447:29 | &mut x4 | | {EXTERNAL LOCATION} | & | +| main.rs:1447:23:1447:29 | &mut x4 | | {EXTERNAL LOCATION} | &mut | | main.rs:1447:28:1447:29 | x4 | | main.rs:1396:5:1400:5 | MyOption | | main.rs:1448:18:1448:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | | main.rs:1448:18:1448:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | @@ -2052,13 +2052,13 @@ inferCertainType | main.rs:1621:16:1627:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1626:15:1626:17 | &... | | {EXTERNAL LOCATION} | & | | main.rs:1626:16:1626:17 | &x | | {EXTERNAL LOCATION} | & | -| main.rs:1637:17:1637:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1637:17:1637:25 | SelfParam | TRef | main.rs:1631:5:1634:5 | MyFlag | +| main.rs:1637:17:1637:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1637:17:1637:25 | SelfParam | TRefMut | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1637:28:1639:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1638:13:1638:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1638:13:1638:16 | self | TRef | main.rs:1631:5:1634:5 | MyFlag | -| main.rs:1638:26:1638:29 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1638:26:1638:29 | self | TRef | main.rs:1631:5:1634:5 | MyFlag | +| main.rs:1638:13:1638:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1638:13:1638:16 | self | TRefMut | main.rs:1631:5:1634:5 | MyFlag | +| main.rs:1638:26:1638:29 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1638:26:1638:29 | self | TRefMut | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1645:15:1645:19 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:1645:15:1645:19 | SelfParam | TRef | main.rs:1642:5:1642:13 | S | | main.rs:1645:31:1647:9 | { ... } | | {EXTERNAL LOCATION} | & | @@ -2105,7 +2105,7 @@ inferCertainType | main.rs:1668:20:1668:24 | &true | | {EXTERNAL LOCATION} | & | | main.rs:1668:21:1668:24 | true | | {EXTERNAL LOCATION} | bool | | main.rs:1673:9:1673:31 | ...::flip(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1673:22:1673:30 | &mut flag | | {EXTERNAL LOCATION} | & | +| main.rs:1673:22:1673:30 | &mut flag | | {EXTERNAL LOCATION} | &mut | | main.rs:1674:18:1674:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | | main.rs:1674:18:1674:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | | main.rs:1674:18:1674:29 | ...::_print(...) | | {EXTERNAL LOCATION} | () | @@ -2277,7 +2277,7 @@ inferCertainType | main.rs:1824:31:1826:13 | { ... } | | main.rs:1819:14:1819:23 | T | | main.rs:1830:13:1830:13 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1830:13:1830:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | -| main.rs:1830:27:1830:32 | &mut v | | {EXTERNAL LOCATION} | & | +| main.rs:1830:27:1830:32 | &mut v | | {EXTERNAL LOCATION} | &mut | | main.rs:1831:26:1831:26 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1831:26:1831:26 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1832:26:1832:48 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | @@ -2307,15 +2307,15 @@ inferCertainType | main.rs:1874:29:1874:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1875:20:1875:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1875:29:1875:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1882:23:1882:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1882:23:1882:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1882:23:1882:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1882:23:1882:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1882:34:1882:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1882:45:1885:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1883:13:1883:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1883:13:1883:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1883:13:1883:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1883:13:1883:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1883:23:1883:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1884:13:1884:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1884:13:1884:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1884:13:1884:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1884:13:1884:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1884:23:1884:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1890:16:1890:19 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1890:22:1890:24 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -2325,15 +2325,15 @@ inferCertainType | main.rs:1892:29:1892:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1893:20:1893:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1893:29:1893:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1900:23:1900:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1900:23:1900:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1900:23:1900:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1900:23:1900:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1900:34:1900:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1900:45:1903:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1901:13:1901:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1901:13:1901:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1901:13:1901:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1901:13:1901:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1901:23:1901:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1902:13:1902:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1902:13:1902:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1902:13:1902:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1902:13:1902:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1902:23:1902:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1908:16:1908:19 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1908:22:1908:24 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -2343,15 +2343,15 @@ inferCertainType | main.rs:1910:29:1910:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1911:20:1911:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1911:29:1911:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1917:23:1917:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1917:23:1917:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1917:23:1917:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1917:23:1917:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1917:34:1917:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1917:45:1920:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1918:13:1918:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1918:13:1918:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1918:13:1918:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1918:13:1918:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1918:23:1918:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1919:13:1919:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1919:13:1919:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1919:13:1919:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1919:13:1919:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1919:23:1919:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1925:16:1925:19 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1925:22:1925:24 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -2361,15 +2361,15 @@ inferCertainType | main.rs:1927:29:1927:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1928:20:1928:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1928:29:1928:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1934:23:1934:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1934:23:1934:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1934:23:1934:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1934:23:1934:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1934:34:1934:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1934:45:1937:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1935:13:1935:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1935:13:1935:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1935:13:1935:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1935:13:1935:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1935:23:1935:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1936:13:1936:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1936:13:1936:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1936:13:1936:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1936:13:1936:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1936:23:1936:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1942:16:1942:19 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1942:22:1942:24 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -2379,15 +2379,15 @@ inferCertainType | main.rs:1944:29:1944:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1945:20:1945:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1945:29:1945:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1951:23:1951:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1951:23:1951:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1951:23:1951:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1951:23:1951:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1951:34:1951:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1951:45:1954:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1952:13:1952:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1952:13:1952:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1952:13:1952:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1952:13:1952:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1952:23:1952:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1953:13:1953:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1953:13:1953:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1953:13:1953:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1953:13:1953:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1953:23:1953:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1959:19:1959:22 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1959:25:1959:27 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -2397,15 +2397,15 @@ inferCertainType | main.rs:1961:29:1961:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1962:20:1962:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1962:29:1962:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1968:26:1968:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1968:26:1968:34 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1968:26:1968:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1968:26:1968:34 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1968:37:1968:39 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1968:48:1971:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1969:13:1969:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1969:13:1969:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1969:13:1969:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1969:13:1969:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1969:23:1969:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1970:13:1970:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1970:13:1970:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1970:13:1970:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1970:13:1970:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1970:23:1970:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1976:18:1976:21 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1976:24:1976:26 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -2415,15 +2415,15 @@ inferCertainType | main.rs:1978:29:1978:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1979:20:1979:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1979:29:1979:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1985:25:1985:33 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1985:25:1985:33 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1985:25:1985:33 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1985:25:1985:33 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1985:36:1985:38 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1985:47:1988:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1986:13:1986:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1986:13:1986:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1986:13:1986:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1986:13:1986:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1986:23:1986:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:1987:13:1987:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1987:13:1987:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1987:13:1987:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1987:13:1987:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1987:23:1987:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1993:19:1993:22 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1993:25:1993:27 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -2433,15 +2433,15 @@ inferCertainType | main.rs:1995:29:1995:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1996:20:1996:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1996:29:1996:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:2002:26:2002:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2002:26:2002:34 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2002:26:2002:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2002:26:2002:34 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2002:37:2002:39 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2002:48:2005:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2003:13:2003:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2003:13:2003:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2003:13:2003:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2003:13:2003:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2003:23:2003:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | -| main.rs:2004:13:2004:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2004:13:2004:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2004:13:2004:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2004:13:2004:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2004:23:2004:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2010:16:2010:19 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2010:22:2010:24 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -2451,15 +2451,15 @@ inferCertainType | main.rs:2012:30:2012:32 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2013:20:2013:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2013:30:2013:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2019:23:2019:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2019:23:2019:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2019:23:2019:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2019:23:2019:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2019:34:2019:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2019:44:2022:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2020:13:2020:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2020:13:2020:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2020:13:2020:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2020:13:2020:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2020:24:2020:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2021:13:2021:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2021:13:2021:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2021:13:2021:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2021:13:2021:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2021:24:2021:26 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2027:16:2027:19 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2027:22:2027:24 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -2469,15 +2469,15 @@ inferCertainType | main.rs:2029:30:2029:32 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2030:20:2030:23 | self | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2030:30:2030:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2036:23:2036:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2036:23:2036:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2036:23:2036:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2036:23:2036:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2036:34:2036:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2036:44:2039:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2037:13:2037:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2037:13:2037:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2037:13:2037:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2037:13:2037:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2037:24:2037:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2038:13:2038:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2038:13:2038:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2038:13:2038:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2038:13:2038:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2038:24:2038:26 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2044:16:2044:19 | SelfParam | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2044:30:2049:9 | { ... } | | main.rs:1857:5:1862:5 | Vec2 | @@ -2768,10 +2768,10 @@ inferCertainType | main.rs:2250:9:2250:16 | { ... } | | {EXTERNAL LOCATION} | dyn Future | | main.rs:2250:9:2250:16 | { ... } | dyn(Output) | {EXTERNAL LOCATION} | () | | main.rs:2259:13:2259:42 | SelfParam | | {EXTERNAL LOCATION} | Pin | -| main.rs:2259:13:2259:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | & | -| main.rs:2259:13:2259:42 | SelfParam | Ptr.TRef | main.rs:2253:5:2253:14 | S2 | -| main.rs:2260:13:2260:15 | _cx | | {EXTERNAL LOCATION} | & | -| main.rs:2260:13:2260:15 | _cx | TRef | {EXTERNAL LOCATION} | Context | +| main.rs:2259:13:2259:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | &mut | +| main.rs:2259:13:2259:42 | SelfParam | Ptr.TRefMut | main.rs:2253:5:2253:14 | S2 | +| main.rs:2260:13:2260:15 | _cx | | {EXTERNAL LOCATION} | &mut | +| main.rs:2260:13:2260:15 | _cx | TRefMut | {EXTERNAL LOCATION} | Context | | main.rs:2261:44:2263:9 | { ... } | | {EXTERNAL LOCATION} | Poll | | main.rs:2261:44:2263:9 | { ... } | T | main.rs:2235:5:2235:14 | S1 | | main.rs:2270:22:2278:5 | { ... } | | {EXTERNAL LOCATION} | () | @@ -2856,14 +2856,14 @@ inferCertainType | main.rs:2384:13:2384:38 | MyVec {...} | | main.rs:2377:5:2380:5 | MyVec | | main.rs:2384:27:2384:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | | main.rs:2384:27:2384:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | -| main.rs:2387:17:2387:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2387:17:2387:25 | SelfParam | TRef | main.rs:2377:5:2380:5 | MyVec | -| main.rs:2387:17:2387:25 | SelfParam | TRef.T | main.rs:2382:10:2382:10 | T | +| main.rs:2387:17:2387:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2387:17:2387:25 | SelfParam | TRefMut | main.rs:2377:5:2380:5 | MyVec | +| main.rs:2387:17:2387:25 | SelfParam | TRefMut.T | main.rs:2382:10:2382:10 | T | | main.rs:2387:28:2387:32 | value | | main.rs:2382:10:2382:10 | T | | main.rs:2387:38:2389:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2388:13:2388:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2388:13:2388:16 | self | TRef | main.rs:2377:5:2380:5 | MyVec | -| main.rs:2388:13:2388:16 | self | TRef.T | main.rs:2382:10:2382:10 | T | +| main.rs:2388:13:2388:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2388:13:2388:16 | self | TRefMut | main.rs:2377:5:2380:5 | MyVec | +| main.rs:2388:13:2388:16 | self | TRefMut.T | main.rs:2382:10:2382:10 | T | | main.rs:2388:28:2388:32 | value | | main.rs:2382:10:2382:10 | T | | main.rs:2396:18:2396:22 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:2396:18:2396:22 | SelfParam | TRef | main.rs:2377:5:2380:5 | MyVec | @@ -3080,7 +3080,7 @@ inferCertainType | main.rs:2642:19:2642:26 | strings1 | | {EXTERNAL LOCATION} | [;] | | main.rs:2642:28:2642:29 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2643:9:2643:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2643:18:2643:30 | &mut strings1 | | {EXTERNAL LOCATION} | & | +| main.rs:2643:18:2643:30 | &mut strings1 | | {EXTERNAL LOCATION} | &mut | | main.rs:2643:23:2643:30 | strings1 | | {EXTERNAL LOCATION} | [;] | | main.rs:2643:32:2643:33 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2644:9:2644:28 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | @@ -3829,13 +3829,13 @@ inferCertainType | pattern_matching.rs:264:22:264:33 | { ... } | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:269:13:269:23 | ref_mut_val | | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:269:27:269:30 | 5i32 | | {EXTERNAL LOCATION} | i32 | -| pattern_matching.rs:270:11:270:26 | &mut ref_mut_val | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:270:11:270:26 | &mut ref_mut_val | | {EXTERNAL LOCATION} | &mut | | pattern_matching.rs:270:16:270:26 | ref_mut_val | | {EXTERNAL LOCATION} | i32 | -| pattern_matching.rs:271:17:271:17 | x | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:271:17:271:17 | x | | {EXTERNAL LOCATION} | &mut | | pattern_matching.rs:271:22:275:9 | { ... } | | {EXTERNAL LOCATION} | () | -| pattern_matching.rs:272:17:272:29 | ref_mut_bound | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:272:33:272:33 | x | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:273:15:273:27 | ref_mut_bound | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:272:17:272:29 | ref_mut_bound | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:272:33:272:33 | x | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:273:15:273:27 | ref_mut_bound | | {EXTERNAL LOCATION} | &mut | | pattern_matching.rs:274:22:274:38 | "Ref mut pattern\\n" | | {EXTERNAL LOCATION} | & | | pattern_matching.rs:274:22:274:38 | "Ref mut pattern\\n" | TRef | {EXTERNAL LOCATION} | str | | pattern_matching.rs:274:22:274:38 | ...::_print(...) | | {EXTERNAL LOCATION} | () | @@ -3931,9 +3931,9 @@ inferCertainType | pattern_matching.rs:338:22:338:47 | "Dereferenced binding: {}\\n" | TRef | {EXTERNAL LOCATION} | str | | pattern_matching.rs:338:22:338:60 | ...::_print(...) | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:338:22:338:60 | { ... } | | {EXTERNAL LOCATION} | () | -| pattern_matching.rs:342:11:342:28 | &mut mutable_value | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:342:11:342:28 | &mut mutable_value | | {EXTERNAL LOCATION} | &mut | | pattern_matching.rs:342:16:342:28 | mutable_value | | {EXTERNAL LOCATION} | i32 | -| pattern_matching.rs:343:9:343:18 | &mut ... | | {EXTERNAL LOCATION} | & | +| pattern_matching.rs:343:9:343:18 | &mut ... | | {EXTERNAL LOCATION} | &mut | | pattern_matching.rs:343:18:343:18 | x | | {EXTERNAL LOCATION} | & | | pattern_matching.rs:343:23:346:9 | { ... } | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:344:17:344:29 | mut_ref_bound | | {EXTERNAL LOCATION} | & | @@ -4507,7 +4507,7 @@ inferCertainType | raw_pointer.rs:54:5:54:32 | raw_pointer_const_deref(...) | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:54:29:54:31 | &10 | | {EXTERNAL LOCATION} | & | | raw_pointer.rs:55:5:55:36 | raw_pointer_mut_deref(...) | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:55:27:55:35 | &mut true | | {EXTERNAL LOCATION} | & | +| raw_pointer.rs:55:27:55:35 | &mut true | | {EXTERNAL LOCATION} | &mut | | raw_pointer.rs:55:32:55:35 | true | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:56:5:56:22 | raw_const_borrow(...) | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:57:5:57:20 | raw_mut_borrow(...) | | {EXTERNAL LOCATION} | () | @@ -5321,8 +5321,8 @@ inferType | dereference.rs:151:16:151:19 | SelfParam | TRef | dereference.rs:147:5:147:13 | S | | dereference.rs:151:27:153:9 | { ... } | | dereference.rs:147:5:147:13 | S | | dereference.rs:152:13:152:13 | S | | dereference.rs:147:5:147:13 | S | -| dereference.rs:158:16:158:19 | SelfParam | | {EXTERNAL LOCATION} | & | -| dereference.rs:158:16:158:19 | SelfParam | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:158:16:158:19 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:158:16:158:19 | SelfParam | TRefMut | dereference.rs:147:5:147:13 | S | | dereference.rs:158:29:160:9 | { ... } | | {EXTERNAL LOCATION} | i64 | | dereference.rs:159:13:159:14 | 42 | | {EXTERNAL LOCATION} | i32 | | dereference.rs:159:13:159:14 | 42 | | {EXTERNAL LOCATION} | i64 | @@ -5334,55 +5334,45 @@ inferType | dereference.rs:169:36:171:9 | { ... } | | dereference.rs:147:5:147:13 | S | | dereference.rs:170:13:170:13 | S | | dereference.rs:147:5:147:13 | S | | dereference.rs:176:16:176:19 | SelfParam | | dereference.rs:147:5:147:13 | S | -| dereference.rs:176:22:176:24 | arg | | {EXTERNAL LOCATION} | & | -| dereference.rs:176:22:176:24 | arg | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:176:22:176:24 | arg | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:176:22:176:24 | arg | TRefMut | dereference.rs:147:5:147:13 | S | | dereference.rs:176:42:178:9 | { ... } | | {EXTERNAL LOCATION} | i64 | | dereference.rs:177:13:177:14 | 42 | | {EXTERNAL LOCATION} | i32 | | dereference.rs:177:13:177:14 | 42 | | {EXTERNAL LOCATION} | i64 | | dereference.rs:181:19:188:5 | { ... } | | {EXTERNAL LOCATION} | () | | dereference.rs:182:13:182:13 | x | | dereference.rs:147:5:147:13 | S | -| dereference.rs:182:13:182:13 | x | | {EXTERNAL LOCATION} | i64 | | dereference.rs:182:17:182:20 | (...) | | {EXTERNAL LOCATION} | & | | dereference.rs:182:17:182:20 | (...) | TRef | dereference.rs:147:5:147:13 | S | | dereference.rs:182:17:182:26 | ... .foo() | | dereference.rs:147:5:147:13 | S | -| dereference.rs:182:17:182:26 | ... .foo() | | {EXTERNAL LOCATION} | i64 | | dereference.rs:182:18:182:19 | &S | | {EXTERNAL LOCATION} | & | | dereference.rs:182:18:182:19 | &S | TRef | dereference.rs:147:5:147:13 | S | | dereference.rs:182:19:182:19 | S | | dereference.rs:147:5:147:13 | S | | dereference.rs:183:13:183:13 | y | | dereference.rs:147:5:147:13 | S | -| dereference.rs:183:13:183:13 | y | | {EXTERNAL LOCATION} | i64 | | dereference.rs:183:17:183:17 | S | | dereference.rs:147:5:147:13 | S | | dereference.rs:183:17:183:23 | S.foo() | | dereference.rs:147:5:147:13 | S | -| dereference.rs:183:17:183:23 | S.foo() | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:184:13:184:13 | z | | dereference.rs:147:5:147:13 | S | | dereference.rs:184:13:184:13 | z | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:184:17:184:24 | (...) | | {EXTERNAL LOCATION} | & | -| dereference.rs:184:17:184:24 | (...) | TRef | dereference.rs:147:5:147:13 | S | -| dereference.rs:184:17:184:30 | ... .foo() | | dereference.rs:147:5:147:13 | S | +| dereference.rs:184:17:184:24 | (...) | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:184:17:184:24 | (...) | TRefMut | dereference.rs:147:5:147:13 | S | | dereference.rs:184:17:184:30 | ... .foo() | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:184:18:184:23 | &mut S | | {EXTERNAL LOCATION} | & | -| dereference.rs:184:18:184:23 | &mut S | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:184:18:184:23 | &mut S | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:184:18:184:23 | &mut S | TRefMut | dereference.rs:147:5:147:13 | S | | dereference.rs:184:23:184:23 | S | | dereference.rs:147:5:147:13 | S | | dereference.rs:186:13:186:13 | x | | dereference.rs:147:5:147:13 | S | -| dereference.rs:186:13:186:13 | x | | {EXTERNAL LOCATION} | i64 | | dereference.rs:186:17:186:17 | S | | dereference.rs:147:5:147:13 | S | | dereference.rs:186:17:186:25 | S.bar(...) | | dereference.rs:147:5:147:13 | S | -| dereference.rs:186:17:186:25 | S.bar(...) | | {EXTERNAL LOCATION} | i64 | | dereference.rs:186:23:186:24 | &S | | {EXTERNAL LOCATION} | & | | dereference.rs:186:23:186:24 | &S | TRef | dereference.rs:147:5:147:13 | S | | dereference.rs:186:24:186:24 | S | | dereference.rs:147:5:147:13 | S | -| dereference.rs:187:13:187:13 | y | | dereference.rs:147:5:147:13 | S | | dereference.rs:187:13:187:13 | y | | {EXTERNAL LOCATION} | i64 | | dereference.rs:187:17:187:17 | S | | dereference.rs:147:5:147:13 | S | -| dereference.rs:187:17:187:29 | S.bar(...) | | dereference.rs:147:5:147:13 | S | | dereference.rs:187:17:187:29 | S.bar(...) | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:187:23:187:28 | &mut S | | {EXTERNAL LOCATION} | & | -| dereference.rs:187:23:187:28 | &mut S | TRef | dereference.rs:147:5:147:13 | S | +| dereference.rs:187:23:187:28 | &mut S | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:187:23:187:28 | &mut S | TRefMut | dereference.rs:147:5:147:13 | S | | dereference.rs:187:28:187:28 | S | | dereference.rs:147:5:147:13 | S | | dereference.rs:196:16:196:20 | SelfParam | | {EXTERNAL LOCATION} | & | | dereference.rs:196:16:196:20 | SelfParam | TRef | dereference.rs:195:5:197:5 | Self [trait Bar] | -| dereference.rs:201:16:201:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| dereference.rs:201:16:201:24 | SelfParam | TRef | dereference.rs:193:5:193:17 | Foo | +| dereference.rs:201:16:201:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| dereference.rs:201:16:201:24 | SelfParam | TRefMut | dereference.rs:193:5:193:17 | Foo | | dereference.rs:201:27:203:9 | { ... } | | {EXTERNAL LOCATION} | () | | dereference.rs:202:13:202:39 | MacroExpr | | {EXTERNAL LOCATION} | () | | dereference.rs:202:22:202:38 | "In struct impl!\\n" | | {EXTERNAL LOCATION} | & | @@ -7653,20 +7643,20 @@ inferType | main.rs:1391:17:1391:38 | ... .get_input() | E | {EXTERNAL LOCATION} | bool | | main.rs:1391:17:1391:38 | ... .get_input() | T | {EXTERNAL LOCATION} | bool | | main.rs:1391:22:1391:25 | true | | {EXTERNAL LOCATION} | bool | -| main.rs:1404:16:1404:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1404:16:1404:24 | SelfParam | TRef | main.rs:1402:5:1409:5 | Self [trait MyTrait] | +| main.rs:1404:16:1404:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1404:16:1404:24 | SelfParam | TRefMut | main.rs:1402:5:1409:5 | Self [trait MyTrait] | | main.rs:1404:27:1404:31 | value | | main.rs:1402:19:1402:19 | S | -| main.rs:1406:21:1406:29 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1406:21:1406:29 | SelfParam | TRef | main.rs:1402:5:1409:5 | Self [trait MyTrait] | +| main.rs:1406:21:1406:29 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1406:21:1406:29 | SelfParam | TRefMut | main.rs:1402:5:1409:5 | Self [trait MyTrait] | | main.rs:1406:32:1406:36 | value | | main.rs:1402:19:1402:19 | S | | main.rs:1406:42:1408:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1407:13:1407:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1407:13:1407:16 | self | TRef | main.rs:1402:5:1409:5 | Self [trait MyTrait] | +| main.rs:1407:13:1407:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1407:13:1407:16 | self | TRefMut | main.rs:1402:5:1409:5 | Self [trait MyTrait] | | main.rs:1407:13:1407:27 | self.set(...) | | {EXTERNAL LOCATION} | () | | main.rs:1407:22:1407:26 | value | | main.rs:1402:19:1402:19 | S | -| main.rs:1413:16:1413:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1413:16:1413:24 | SelfParam | TRef | main.rs:1396:5:1400:5 | MyOption | -| main.rs:1413:16:1413:24 | SelfParam | TRef.T | main.rs:1411:10:1411:10 | T | +| main.rs:1413:16:1413:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1413:16:1413:24 | SelfParam | TRefMut | main.rs:1396:5:1400:5 | MyOption | +| main.rs:1413:16:1413:24 | SelfParam | TRefMut.T | main.rs:1411:10:1411:10 | T | | main.rs:1413:27:1413:31 | value | | main.rs:1411:10:1411:10 | T | | main.rs:1413:37:1413:38 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1417:26:1419:9 | { ... } | | main.rs:1396:5:1400:5 | MyOption | @@ -7739,9 +7729,9 @@ inferType | main.rs:1446:22:1446:36 | ...::new(...) | | main.rs:1396:5:1400:5 | MyOption | | main.rs:1446:22:1446:36 | ...::new(...) | T | main.rs:1431:5:1432:13 | S | | main.rs:1447:9:1447:33 | ...::set(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1447:23:1447:29 | &mut x4 | | {EXTERNAL LOCATION} | & | -| main.rs:1447:23:1447:29 | &mut x4 | TRef | main.rs:1396:5:1400:5 | MyOption | -| main.rs:1447:23:1447:29 | &mut x4 | TRef.T | main.rs:1431:5:1432:13 | S | +| main.rs:1447:23:1447:29 | &mut x4 | | {EXTERNAL LOCATION} | &mut | +| main.rs:1447:23:1447:29 | &mut x4 | TRefMut | main.rs:1396:5:1400:5 | MyOption | +| main.rs:1447:23:1447:29 | &mut x4 | TRefMut.T | main.rs:1431:5:1432:13 | S | | main.rs:1447:28:1447:29 | x4 | | main.rs:1396:5:1400:5 | MyOption | | main.rs:1447:28:1447:29 | x4 | T | main.rs:1431:5:1432:13 | S | | main.rs:1447:32:1447:32 | S | | main.rs:1431:5:1432:13 | S | @@ -8170,16 +8160,16 @@ inferType | main.rs:1626:16:1626:17 | &x | TRef.T | main.rs:1607:5:1607:13 | S | | main.rs:1626:17:1626:17 | x | | main.rs:1609:5:1609:26 | MyStruct | | main.rs:1626:17:1626:17 | x | T | main.rs:1607:5:1607:13 | S | -| main.rs:1637:17:1637:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1637:17:1637:25 | SelfParam | TRef | main.rs:1631:5:1634:5 | MyFlag | +| main.rs:1637:17:1637:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1637:17:1637:25 | SelfParam | TRefMut | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1637:28:1639:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1638:13:1638:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1638:13:1638:16 | self | TRef | main.rs:1631:5:1634:5 | MyFlag | +| main.rs:1638:13:1638:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1638:13:1638:16 | self | TRefMut | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1638:13:1638:21 | self.bool | | {EXTERNAL LOCATION} | bool | | main.rs:1638:13:1638:34 | ... = ... | | {EXTERNAL LOCATION} | () | | main.rs:1638:25:1638:34 | ! ... | | {EXTERNAL LOCATION} | bool | -| main.rs:1638:26:1638:29 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1638:26:1638:29 | self | TRef | main.rs:1631:5:1634:5 | MyFlag | +| main.rs:1638:26:1638:29 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1638:26:1638:29 | self | TRefMut | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1638:26:1638:34 | self.bool | | {EXTERNAL LOCATION} | bool | | main.rs:1645:15:1645:19 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:1645:15:1645:19 | SelfParam | TRef | main.rs:1642:5:1642:13 | S | @@ -8271,8 +8261,8 @@ inferType | main.rs:1672:17:1672:20 | flag | | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1672:24:1672:41 | ...::default(...) | | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1673:9:1673:31 | ...::flip(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1673:22:1673:30 | &mut flag | | {EXTERNAL LOCATION} | & | -| main.rs:1673:22:1673:30 | &mut flag | TRef | main.rs:1631:5:1634:5 | MyFlag | +| main.rs:1673:22:1673:30 | &mut flag | | {EXTERNAL LOCATION} | &mut | +| main.rs:1673:22:1673:30 | &mut flag | TRefMut | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1673:27:1673:30 | flag | | main.rs:1631:5:1634:5 | MyFlag | | main.rs:1674:18:1674:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | | main.rs:1674:18:1674:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | @@ -8631,8 +8621,8 @@ inferType | main.rs:1829:21:1829:22 | 42 | | {EXTERNAL LOCATION} | i32 | | main.rs:1830:13:1830:13 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1830:13:1830:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | -| main.rs:1830:27:1830:32 | &mut v | | {EXTERNAL LOCATION} | & | -| main.rs:1830:27:1830:32 | &mut v | TRef | {EXTERNAL LOCATION} | i32 | +| main.rs:1830:27:1830:32 | &mut v | | {EXTERNAL LOCATION} | &mut | +| main.rs:1830:27:1830:32 | &mut v | TRefMut | {EXTERNAL LOCATION} | i32 | | main.rs:1830:32:1830:32 | v | | {EXTERNAL LOCATION} | i32 | | main.rs:1831:13:1831:13 | x | | {EXTERNAL LOCATION} | & | | main.rs:1831:13:1831:13 | x | TRef | {EXTERNAL LOCATION} | i32 | @@ -8700,18 +8690,18 @@ inferType | main.rs:1875:20:1875:33 | ... + ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1875:29:1875:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1875:29:1875:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1882:23:1882:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1882:23:1882:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1882:23:1882:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1882:23:1882:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1882:34:1882:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1882:45:1885:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1883:13:1883:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1883:13:1883:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1883:13:1883:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1883:13:1883:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1883:13:1883:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1883:13:1883:27 | ... += ... | | {EXTERNAL LOCATION} | () | | main.rs:1883:23:1883:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1883:23:1883:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1884:13:1884:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1884:13:1884:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1884:13:1884:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1884:13:1884:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1884:13:1884:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1884:13:1884:27 | ... += ... | | {EXTERNAL LOCATION} | () | | main.rs:1884:23:1884:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8730,18 +8720,18 @@ inferType | main.rs:1893:20:1893:33 | ... - ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1893:29:1893:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1893:29:1893:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1900:23:1900:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1900:23:1900:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1900:23:1900:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1900:23:1900:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1900:34:1900:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1900:45:1903:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1901:13:1901:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1901:13:1901:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1901:13:1901:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1901:13:1901:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1901:13:1901:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1901:13:1901:27 | ... -= ... | | {EXTERNAL LOCATION} | () | | main.rs:1901:23:1901:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1901:23:1901:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1902:13:1902:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1902:13:1902:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1902:13:1902:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1902:13:1902:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1902:13:1902:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1902:13:1902:27 | ... -= ... | | {EXTERNAL LOCATION} | () | | main.rs:1902:23:1902:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8760,18 +8750,18 @@ inferType | main.rs:1911:20:1911:33 | ... * ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1911:29:1911:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1911:29:1911:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1917:23:1917:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1917:23:1917:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1917:23:1917:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1917:23:1917:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1917:34:1917:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1917:45:1920:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1918:13:1918:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1918:13:1918:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1918:13:1918:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1918:13:1918:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1918:13:1918:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1918:13:1918:27 | ... *= ... | | {EXTERNAL LOCATION} | () | | main.rs:1918:23:1918:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1918:23:1918:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1919:13:1919:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1919:13:1919:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1919:13:1919:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1919:13:1919:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1919:13:1919:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1919:13:1919:27 | ... *= ... | | {EXTERNAL LOCATION} | () | | main.rs:1919:23:1919:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8790,18 +8780,18 @@ inferType | main.rs:1928:20:1928:33 | ... / ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1928:29:1928:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1928:29:1928:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1934:23:1934:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1934:23:1934:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1934:23:1934:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1934:23:1934:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1934:34:1934:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1934:45:1937:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1935:13:1935:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1935:13:1935:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1935:13:1935:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1935:13:1935:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1935:13:1935:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1935:13:1935:27 | ... /= ... | | {EXTERNAL LOCATION} | () | | main.rs:1935:23:1935:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1935:23:1935:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1936:13:1936:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1936:13:1936:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1936:13:1936:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1936:13:1936:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1936:13:1936:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1936:13:1936:27 | ... /= ... | | {EXTERNAL LOCATION} | () | | main.rs:1936:23:1936:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8820,18 +8810,18 @@ inferType | main.rs:1945:20:1945:33 | ... % ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1945:29:1945:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1945:29:1945:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1951:23:1951:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1951:23:1951:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1951:23:1951:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1951:23:1951:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1951:34:1951:36 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1951:45:1954:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1952:13:1952:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1952:13:1952:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1952:13:1952:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1952:13:1952:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1952:13:1952:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1952:13:1952:27 | ... %= ... | | {EXTERNAL LOCATION} | () | | main.rs:1952:23:1952:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1952:23:1952:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1953:13:1953:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1953:13:1953:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1953:13:1953:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1953:13:1953:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1953:13:1953:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1953:13:1953:27 | ... %= ... | | {EXTERNAL LOCATION} | () | | main.rs:1953:23:1953:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8850,18 +8840,18 @@ inferType | main.rs:1962:20:1962:33 | ... & ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1962:29:1962:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1962:29:1962:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1968:26:1968:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1968:26:1968:34 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1968:26:1968:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1968:26:1968:34 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1968:37:1968:39 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1968:48:1971:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1969:13:1969:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1969:13:1969:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1969:13:1969:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1969:13:1969:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1969:13:1969:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1969:13:1969:27 | ... &= ... | | {EXTERNAL LOCATION} | () | | main.rs:1969:23:1969:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1969:23:1969:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1970:13:1970:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1970:13:1970:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1970:13:1970:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1970:13:1970:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1970:13:1970:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1970:13:1970:27 | ... &= ... | | {EXTERNAL LOCATION} | () | | main.rs:1970:23:1970:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8880,18 +8870,18 @@ inferType | main.rs:1979:20:1979:33 | ... \| ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1979:29:1979:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1979:29:1979:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1985:25:1985:33 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1985:25:1985:33 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1985:25:1985:33 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1985:25:1985:33 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1985:36:1985:38 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1985:47:1988:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1986:13:1986:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1986:13:1986:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1986:13:1986:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1986:13:1986:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1986:13:1986:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1986:13:1986:27 | ... \|= ... | | {EXTERNAL LOCATION} | () | | main.rs:1986:23:1986:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1986:23:1986:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1987:13:1987:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1987:13:1987:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:1987:13:1987:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1987:13:1987:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1987:13:1987:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1987:13:1987:27 | ... \|= ... | | {EXTERNAL LOCATION} | () | | main.rs:1987:23:1987:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8910,18 +8900,18 @@ inferType | main.rs:1996:20:1996:33 | ... ^ ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1996:29:1996:31 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:1996:29:1996:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:2002:26:2002:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2002:26:2002:34 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2002:26:2002:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2002:26:2002:34 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2002:37:2002:39 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2002:48:2005:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2003:13:2003:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2003:13:2003:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2003:13:2003:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2003:13:2003:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2003:13:2003:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:2003:13:2003:27 | ... ^= ... | | {EXTERNAL LOCATION} | () | | main.rs:2003:23:2003:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2003:23:2003:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:2004:13:2004:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2004:13:2004:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2004:13:2004:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2004:13:2004:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2004:13:2004:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2004:13:2004:27 | ... ^= ... | | {EXTERNAL LOCATION} | () | | main.rs:2004:23:2004:25 | rhs | | main.rs:1857:5:1862:5 | Vec2 | @@ -8938,17 +8928,17 @@ inferType | main.rs:2013:20:2013:25 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2013:20:2013:32 | ... << ... | | {EXTERNAL LOCATION} | i64 | | main.rs:2013:30:2013:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2019:23:2019:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2019:23:2019:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2019:23:2019:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2019:23:2019:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2019:34:2019:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2019:44:2022:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2020:13:2020:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2020:13:2020:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2020:13:2020:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2020:13:2020:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2020:13:2020:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:2020:13:2020:26 | ... <<= ... | | {EXTERNAL LOCATION} | () | | main.rs:2020:24:2020:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2021:13:2021:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2021:13:2021:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2021:13:2021:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2021:13:2021:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2021:13:2021:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2021:13:2021:26 | ... <<= ... | | {EXTERNAL LOCATION} | () | | main.rs:2021:24:2021:26 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -8964,17 +8954,17 @@ inferType | main.rs:2030:20:2030:25 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2030:20:2030:32 | ... >> ... | | {EXTERNAL LOCATION} | i64 | | main.rs:2030:30:2030:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2036:23:2036:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2036:23:2036:31 | SelfParam | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2036:23:2036:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2036:23:2036:31 | SelfParam | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2036:34:2036:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2036:44:2039:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2037:13:2037:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2037:13:2037:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2037:13:2037:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2037:13:2037:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2037:13:2037:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:2037:13:2037:26 | ... >>= ... | | {EXTERNAL LOCATION} | () | | main.rs:2037:24:2037:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2038:13:2038:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2038:13:2038:16 | self | TRef | main.rs:1857:5:1862:5 | Vec2 | +| main.rs:2038:13:2038:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2038:13:2038:16 | self | TRefMut | main.rs:1857:5:1862:5 | Vec2 | | main.rs:2038:13:2038:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2038:13:2038:26 | ... >>= ... | | {EXTERNAL LOCATION} | () | | main.rs:2038:24:2038:26 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -9433,10 +9423,10 @@ inferType | main.rs:2250:9:2250:16 | { ... } | | {EXTERNAL LOCATION} | dyn Future | | main.rs:2250:9:2250:16 | { ... } | dyn(Output) | {EXTERNAL LOCATION} | () | | main.rs:2259:13:2259:42 | SelfParam | | {EXTERNAL LOCATION} | Pin | -| main.rs:2259:13:2259:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | & | -| main.rs:2259:13:2259:42 | SelfParam | Ptr.TRef | main.rs:2253:5:2253:14 | S2 | -| main.rs:2260:13:2260:15 | _cx | | {EXTERNAL LOCATION} | & | -| main.rs:2260:13:2260:15 | _cx | TRef | {EXTERNAL LOCATION} | Context | +| main.rs:2259:13:2259:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | &mut | +| main.rs:2259:13:2259:42 | SelfParam | Ptr.TRefMut | main.rs:2253:5:2253:14 | S2 | +| main.rs:2260:13:2260:15 | _cx | | {EXTERNAL LOCATION} | &mut | +| main.rs:2260:13:2260:15 | _cx | TRefMut | {EXTERNAL LOCATION} | Context | | main.rs:2261:44:2263:9 | { ... } | | {EXTERNAL LOCATION} | Poll | | main.rs:2261:44:2263:9 | { ... } | T | main.rs:2235:5:2235:14 | S1 | | main.rs:2262:13:2262:38 | ...::Ready(...) | | {EXTERNAL LOCATION} | Poll | @@ -9611,14 +9601,14 @@ inferType | main.rs:2384:27:2384:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | | main.rs:2384:27:2384:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | | main.rs:2384:27:2384:36 | ...::new(...) | T | main.rs:2382:10:2382:10 | T | -| main.rs:2387:17:2387:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2387:17:2387:25 | SelfParam | TRef | main.rs:2377:5:2380:5 | MyVec | -| main.rs:2387:17:2387:25 | SelfParam | TRef.T | main.rs:2382:10:2382:10 | T | +| main.rs:2387:17:2387:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2387:17:2387:25 | SelfParam | TRefMut | main.rs:2377:5:2380:5 | MyVec | +| main.rs:2387:17:2387:25 | SelfParam | TRefMut.T | main.rs:2382:10:2382:10 | T | | main.rs:2387:28:2387:32 | value | | main.rs:2382:10:2382:10 | T | | main.rs:2387:38:2389:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2388:13:2388:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2388:13:2388:16 | self | TRef | main.rs:2377:5:2380:5 | MyVec | -| main.rs:2388:13:2388:16 | self | TRef.T | main.rs:2382:10:2382:10 | T | +| main.rs:2388:13:2388:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2388:13:2388:16 | self | TRefMut | main.rs:2377:5:2380:5 | MyVec | +| main.rs:2388:13:2388:16 | self | TRefMut.T | main.rs:2382:10:2382:10 | T | | main.rs:2388:13:2388:21 | self.data | | {EXTERNAL LOCATION} | Vec | | main.rs:2388:13:2388:21 | self.data | A | {EXTERNAL LOCATION} | Global | | main.rs:2388:13:2388:21 | self.data | T | main.rs:2382:10:2382:10 | T | @@ -10002,13 +9992,13 @@ inferType | main.rs:2642:19:2642:26 | strings1 | TArray.TRef | {EXTERNAL LOCATION} | str | | main.rs:2642:28:2642:29 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2643:9:2643:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2643:13:2643:13 | s | | {EXTERNAL LOCATION} | & | -| main.rs:2643:13:2643:13 | s | TRef | {EXTERNAL LOCATION} | & | -| main.rs:2643:13:2643:13 | s | TRef.TRef | {EXTERNAL LOCATION} | str | -| main.rs:2643:18:2643:30 | &mut strings1 | | {EXTERNAL LOCATION} | & | -| main.rs:2643:18:2643:30 | &mut strings1 | TRef | {EXTERNAL LOCATION} | [;] | -| main.rs:2643:18:2643:30 | &mut strings1 | TRef.TArray | {EXTERNAL LOCATION} | & | -| main.rs:2643:18:2643:30 | &mut strings1 | TRef.TArray.TRef | {EXTERNAL LOCATION} | str | +| main.rs:2643:13:2643:13 | s | | {EXTERNAL LOCATION} | &mut | +| main.rs:2643:13:2643:13 | s | TRefMut | {EXTERNAL LOCATION} | & | +| main.rs:2643:13:2643:13 | s | TRefMut.TRef | {EXTERNAL LOCATION} | str | +| main.rs:2643:18:2643:30 | &mut strings1 | | {EXTERNAL LOCATION} | &mut | +| main.rs:2643:18:2643:30 | &mut strings1 | TRefMut | {EXTERNAL LOCATION} | [;] | +| main.rs:2643:18:2643:30 | &mut strings1 | TRefMut.TArray | {EXTERNAL LOCATION} | & | +| main.rs:2643:18:2643:30 | &mut strings1 | TRefMut.TArray.TRef | {EXTERNAL LOCATION} | str | | main.rs:2643:23:2643:30 | strings1 | | {EXTERNAL LOCATION} | [;] | | main.rs:2643:23:2643:30 | strings1 | TArray | {EXTERNAL LOCATION} | & | | main.rs:2643:23:2643:30 | strings1 | TArray.TRef | {EXTERNAL LOCATION} | str | @@ -11650,26 +11640,26 @@ inferType | pattern_matching.rs:269:13:269:23 | ref_mut_val | | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:269:27:269:30 | 5i32 | | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:270:5:276:5 | match ... { ... } | | {EXTERNAL LOCATION} | () | -| pattern_matching.rs:270:11:270:26 | &mut ref_mut_val | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:270:11:270:26 | &mut ref_mut_val | TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:270:11:270:26 | &mut ref_mut_val | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:270:11:270:26 | &mut ref_mut_val | TRefMut | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:270:16:270:26 | ref_mut_val | | {EXTERNAL LOCATION} | i32 | -| pattern_matching.rs:271:17:271:17 | x | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:271:17:271:17 | x | TRef | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:271:17:271:17 | x | TRef.TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:271:17:271:17 | x | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:271:17:271:17 | x | TRefMut | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:271:17:271:17 | x | TRefMut.TRefMut | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:271:22:275:9 | { ... } | | {EXTERNAL LOCATION} | () | -| pattern_matching.rs:272:17:272:29 | ref_mut_bound | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:272:17:272:29 | ref_mut_bound | TRef | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:272:17:272:29 | ref_mut_bound | TRef.TRef | {EXTERNAL LOCATION} | i32 | -| pattern_matching.rs:272:33:272:33 | x | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:272:33:272:33 | x | TRef | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:272:33:272:33 | x | TRef.TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:272:17:272:29 | ref_mut_bound | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:272:17:272:29 | ref_mut_bound | TRefMut | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:272:17:272:29 | ref_mut_bound | TRefMut.TRefMut | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:272:33:272:33 | x | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:272:33:272:33 | x | TRefMut | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:272:33:272:33 | x | TRefMut.TRefMut | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:273:13:273:27 | * ... | | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:273:13:273:32 | ... += ... | | {EXTERNAL LOCATION} | () | -| pattern_matching.rs:273:14:273:27 | * ... | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:273:14:273:27 | * ... | TRef | {EXTERNAL LOCATION} | i32 | -| pattern_matching.rs:273:15:273:27 | ref_mut_bound | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:273:15:273:27 | ref_mut_bound | TRef | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:273:15:273:27 | ref_mut_bound | TRef.TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:273:14:273:27 | * ... | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:273:14:273:27 | * ... | TRefMut | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:273:15:273:27 | ref_mut_bound | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:273:15:273:27 | ref_mut_bound | TRefMut | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:273:15:273:27 | ref_mut_bound | TRefMut.TRefMut | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:273:32:273:32 | 1 | | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:274:22:274:38 | "Ref mut pattern\\n" | | {EXTERNAL LOCATION} | & | | pattern_matching.rs:274:22:274:38 | "Ref mut pattern\\n" | TRef | {EXTERNAL LOCATION} | str | @@ -11793,11 +11783,11 @@ inferType | pattern_matching.rs:338:22:338:60 | { ... } | | {EXTERNAL LOCATION} | () | | pattern_matching.rs:338:50:338:60 | deref_bound | | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:342:5:347:5 | match ... { ... } | | {EXTERNAL LOCATION} | () | -| pattern_matching.rs:342:11:342:28 | &mut mutable_value | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:342:11:342:28 | &mut mutable_value | TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:342:11:342:28 | &mut mutable_value | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:342:11:342:28 | &mut mutable_value | TRefMut | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:342:16:342:28 | mutable_value | | {EXTERNAL LOCATION} | i32 | -| pattern_matching.rs:343:9:343:18 | &mut ... | | {EXTERNAL LOCATION} | & | -| pattern_matching.rs:343:9:343:18 | &mut ... | TRef | {EXTERNAL LOCATION} | i32 | +| pattern_matching.rs:343:9:343:18 | &mut ... | | {EXTERNAL LOCATION} | &mut | +| pattern_matching.rs:343:9:343:18 | &mut ... | TRefMut | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:343:18:343:18 | x | | {EXTERNAL LOCATION} | & | | pattern_matching.rs:343:18:343:18 | x | TRef | {EXTERNAL LOCATION} | i32 | | pattern_matching.rs:343:23:346:9 | { ... } | | {EXTERNAL LOCATION} | () | @@ -13013,8 +13003,8 @@ inferType | raw_pointer.rs:54:29:54:31 | &10 | TRef | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:54:30:54:31 | 10 | | {EXTERNAL LOCATION} | i32 | | raw_pointer.rs:55:5:55:36 | raw_pointer_mut_deref(...) | | {EXTERNAL LOCATION} | i32 | -| raw_pointer.rs:55:27:55:35 | &mut true | | {EXTERNAL LOCATION} | & | -| raw_pointer.rs:55:27:55:35 | &mut true | TRef | {EXTERNAL LOCATION} | bool | +| raw_pointer.rs:55:27:55:35 | &mut true | | {EXTERNAL LOCATION} | &mut | +| raw_pointer.rs:55:27:55:35 | &mut true | TRefMut | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:55:32:55:35 | true | | {EXTERNAL LOCATION} | bool | | raw_pointer.rs:56:5:56:22 | raw_const_borrow(...) | | {EXTERNAL LOCATION} | () | | raw_pointer.rs:57:5:57:20 | raw_mut_borrow(...) | | {EXTERNAL LOCATION} | () | diff --git a/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 8dfdad04adf5..000000000000 --- a/rust/ql/test/library-tests/variables/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,17 +0,0 @@ -multipleResolvedTargets -| main.rs:16:15:16:16 | * ... | -| main.rs:91:19:91:40 | ...::from(...) | -| main.rs:113:19:113:40 | ...::from(...) | -| main.rs:507:5:507:10 | * ... | -| main.rs:512:5:512:6 | * ... | -| main.rs:513:9:513:10 | * ... | -| main.rs:514:9:514:10 | * ... | -| main.rs:519:5:519:6 | * ... | -| main.rs:520:9:520:10 | * ... | -| main.rs:521:9:521:10 | * ... | -| main.rs:522:5:522:6 | * ... | -| main.rs:530:5:530:6 | * ... | -| main.rs:542:5:542:7 | * ... | -| main.rs:542:6:542:7 | * ... | -| main.rs:552:5:552:6 | * ... | -| main.rs:699:9:699:13 | * ... | diff --git a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index fbf9238f366e..000000000000 --- a/rust/ql/test/query-tests/diagnostics/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleResolvedTargets -| my_struct.rs:25:19:25:37 | ...::from(...) | diff --git a/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected b/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected index 563e370b4ed3..ed21d9772fce 100644 --- a/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected +++ b/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected @@ -6,7 +6,7 @@ | Files extracted - without errors % | 57 | | Inconsistencies - AST | 0 | | Inconsistencies - CFG | 0 | -| Inconsistencies - Path resolution | 1 | +| Inconsistencies - Path resolution | 0 | | Inconsistencies - SSA | 0 | | Inconsistencies - data flow | 0 | | Lines of code extracted | 60 | diff --git a/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected index 3187982b20e0..f957ba46e0ff 100644 --- a/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-089/CONSISTENCY/PathResolutionConsistency.expected @@ -1,30 +1,3 @@ -multipleResolvedTargets -| mysql.rs:15:24:15:39 | ...::from(...) | -| mysql.rs:16:26:16:85 | ...::from(...) | -| mysql.rs:18:13:18:66 | ...::from(...) | -| mysql.rs:19:30:19:83 | ...::from(...) | -| mysql.rs:100:24:100:39 | ...::from(...) | -| mysql.rs:101:26:101:85 | ...::from(...) | -| mysql.rs:103:13:103:66 | ...::from(...) | -| mysql.rs:104:30:104:83 | ...::from(...) | -| sqlx.rs:46:24:46:44 | ...::from(...) | -| sqlx.rs:47:56:47:76 | ...::from(...) | -| sqlx.rs:48:97:48:117 | ...::from(...) | -| sqlx.rs:50:24:50:83 | ...::from(...) | -| sqlx.rs:51:24:51:77 | ...::from(...) | -| sqlx.rs:55:26:55:79 | ...::from(...) | -| sqlx.rs:61:28:61:81 | ...::from(...) | -| sqlx.rs:99:24:99:44 | ...::from(...) | -| sqlx.rs:100:97:100:117 | ...::from(...) | -| sqlx.rs:101:24:101:77 | ...::from(...) | -| sqlx.rs:102:26:102:79 | ...::from(...) | -| sqlx.rs:103:28:103:81 | ...::from(...) | -| sqlx.rs:172:24:172:44 | ...::from(...) | -| sqlx.rs:173:97:173:117 | ...::from(...) | -| sqlx.rs:174:24:174:77 | ...::from(...) | -| sqlx.rs:175:26:175:79 | ...::from(...) | -| sqlx.rs:176:28:176:82 | ...::from(...) | -| sqlx.rs:202:57:202:85 | ...::from(...) | multiplePathResolutions | mysql.rs:5:37:5:74 | Result::<...> | | mysql.rs:26:20:26:44 | Result::<...> | diff --git a/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 698af5a02797..000000000000 --- a/rust/ql/test/query-tests/security/CWE-117/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,2 +0,0 @@ -multipleResolvedTargets -| main.rs:9:43:9:63 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected index 260e09db470e..580c9cd8202c 100644 --- a/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-312/CONSISTENCY/PathResolutionConsistency.expected @@ -1,39 +1,2 @@ multipleResolvedTargets -| test_logging.rs:214:13:214:22 | * ... | -| test_logging.rs:214:13:214:22 | * ... | -| test_logging.rs:214:13:214:22 | * ... | -| test_logging.rs:214:13:214:22 | * ... | -| test_logging.rs:217:13:217:22 | * ... | -| test_logging.rs:217:13:217:22 | * ... | -| test_logging.rs:217:13:217:22 | * ... | -| test_logging.rs:217:13:217:22 | * ... | -| test_logging.rs:223:13:223:28 | * ... | -| test_logging.rs:223:13:223:28 | * ... | -| test_logging.rs:223:13:223:28 | * ... | -| test_logging.rs:223:13:223:28 | * ... | -| test_logging.rs:226:13:226:28 | * ... | -| test_logging.rs:226:13:226:28 | * ... | -| test_logging.rs:226:13:226:28 | * ... | -| test_logging.rs:226:13:226:28 | * ... | -| test_storage.rs:13:10:13:33 | ...::from(...) | -| test_storage.rs:17:10:17:35 | ...::from(...) | -| test_storage.rs:21:10:21:35 | ...::from(...) | -| test_storage.rs:25:10:25:32 | ...::from(...) | -| test_storage.rs:29:10:29:35 | ...::from(...) | | test_storage.rs:36:45:36:57 | text.as_ref() | -| test_storage.rs:68:25:68:74 | ...::from(...) | -| test_storage.rs:69:25:69:76 | ...::from(...) | -| test_storage.rs:70:25:70:82 | ...::from(...) | -| test_storage.rs:71:25:71:79 | ...::from(...) | -| test_storage.rs:72:25:72:70 | ...::from(...) | -| test_storage.rs:73:25:73:67 | ...::from(...) | -| test_storage.rs:75:25:75:65 | ...::from(...) | -| test_storage.rs:76:25:76:65 | ...::from(...) | -| test_storage.rs:78:25:78:65 | ...::from(...) | -| test_storage.rs:79:25:79:65 | ...::from(...) | -| test_storage.rs:80:25:80:70 | ...::from(...) | -| test_storage.rs:81:25:81:72 | ...::from(...) | -| test_storage.rs:82:26:82:77 | ...::from(...) | -| test_storage.rs:188:29:188:86 | ...::from(...) | -| test_storage.rs:189:28:189:82 | ...::from(...) | -| test_storage.rs:190:28:190:81 | ...::from(...) | diff --git a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index b3a011a27afa..000000000000 --- a/rust/ql/test/query-tests/security/CWE-825/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,16 +0,0 @@ -multipleResolvedTargets -| deallocation.rs:354:11:354:29 | ...::from(...) | -| deallocation.rs:355:11:355:29 | ...::from(...) | -| deallocation.rs:420:2:420:4 | * ... | -| deallocation.rs:421:23:421:25 | * ... | -| deallocation.rs:425:33:425:35 | * ... | -| deallocation.rs:430:27:430:29 | * ... | -| lifetime.rs:217:17:217:25 | * ... | -| lifetime.rs:610:13:610:31 | ...::from(...) | -| lifetime.rs:611:13:611:31 | ...::from(...) | -| lifetime.rs:628:13:628:31 | ...::from(...) | -| lifetime.rs:630:11:630:25 | * ... | -| lifetime.rs:692:12:692:14 | * ... | -| lifetime.rs:693:12:693:14 | * ... | -| lifetime.rs:694:12:694:14 | * ... | -| lifetime.rs:734:11:734:13 | * ... | diff --git a/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index be3b445209d5..000000000000 --- a/rust/ql/test/query-tests/unusedentities/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,31 +0,0 @@ -multipleResolvedTargets -| main.rs:14:13:14:29 | ...::from(...) | -| main.rs:15:13:15:29 | ...::from(...) | -| main.rs:223:9:223:18 | * ... | -| main.rs:223:9:223:18 | * ... | -| main.rs:223:9:223:18 | * ... | -| main.rs:223:9:223:18 | * ... | -| main.rs:228:9:228:18 | * ... | -| main.rs:228:9:228:18 | * ... | -| main.rs:228:9:228:18 | * ... | -| main.rs:228:9:228:18 | * ... | -| main.rs:353:5:353:14 | * ... | -| main.rs:353:5:353:14 | * ... | -| main.rs:353:5:353:14 | * ... | -| main.rs:353:5:353:14 | * ... | -| main.rs:539:13:539:14 | * ... | -| main.rs:544:19:544:20 | * ... | -| more.rs:34:11:34:19 | * ... | -| more.rs:45:20:45:26 | * ... | -| more.rs:56:20:56:30 | * ... | -| more.rs:56:21:56:30 | * ... | -| more.rs:61:20:61:30 | * ... | -| more.rs:61:21:61:30 | * ... | -| more.rs:67:20:67:25 | * ... | -| more.rs:71:5:71:10 | * ... | -| more.rs:75:5:75:10 | * ... | -| more.rs:80:5:80:10 | * ... | -| more.rs:82:20:82:26 | * ... | -| unreachable.rs:165:20:165:42 | ...::from(...) | -| unreachable.rs:171:9:171:15 | ...::from(...) | -| unreachable.rs:177:17:177:25 | ...::from(...) | diff --git a/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index b9195fc15f0a..000000000000 --- a/rust/ql/test/utils-tests/modelgenerator/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,9 +0,0 @@ -multipleResolvedTargets -| option.rs:34:18:34:22 | * ... | -| option.rs:61:15:61:19 | * ... | -| option.rs:69:15:69:19 | * ... | -| option.rs:306:9:306:13 | * ... | -| option.rs:335:13:335:17 | * ... | -| option.rs:483:27:483:29 | * ... | -| summaries.rs:87:5:87:6 | * ... | -| summaries.rs:92:5:92:6 | * ... |