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 b281889ef1d7..40330444913a 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll @@ -304,11 +304,18 @@ module CertainTypeInference { pragma[nomagic] private Type getCallExprType(CallExpr ce, Path p, Function f, TypePath tp) { callResolvesTo(ce, p, f) and - result = - [ - f.(MethodCallMatchingInput::Declaration).getReturnType(tp), - f.(NonMethodCallMatchingInput::Declaration).getReturnType(tp) - ] + ( + exists(ImplOrTraitItemNode i, AssocFunction af | + af = MkAssocFuntion(i, f) and + f = i.getAnAssocItem() and + result = af.(MethodCallMatchingInput::Declaration).getReturnType(tp) + ) + or + exists(NonMethodCallMatchingInput::FreeFunctionDeclaration ffd | + f = ffd.getFunction() and + result = ffd.getReturnType(tp) + ) + ) } pragma[nomagic] @@ -393,7 +400,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() ) } @@ -610,9 +620,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 @@ -985,6 +1000,49 @@ private Trait getCallExprTraitQualifier(CallExpr ce) { ) } +private newtype TAssocFunction = + MkAssocFuntion(ImplOrTraitItemNode i, Function f) { f = i.getASuccessor(_) } + +final class AssocFunction extends MkAssocFuntion { + ImplOrTraitItemNode i; + Function f; + + AssocFunction() { this = MkAssocFuntion(i, f) } + + Function getFunction() { result = f } + + ImplOrTraitItemNode getImplOrTraitItemNode() { result = i } + + Type getDeclaredType(FunctionPosition pos, TypePath path) { + result = getAssocFunctionTypeAt(f, i, pos, path) + } + + TypeParameter getTypeParameter(TypeParameterPosition ppos) { + typeParamMatchPosition(f.getGenericParamList().getATypeParam(), result, ppos) + or + typeParamMatchPosition(i.getTypeParam(_), result, ppos) + or + ppos.isImplicit() and result = TSelfTypeParameter(i) + or + ppos.isImplicit() and + result.(AssociatedTypeTypeParameter).getTrait() = i + or + ppos.isImplicit() and + f = result.(ImplTraitTypeTypeParameter).getFunction() + } + + string toString() { + if f = i.getAnAssocItem() + then result = f.toString() + else + result = + f.toString() + " [" + [i.(Impl).getSelfTy().toString(), i.(Trait).getName().toString()] + + "]" + } + + Location getLocation() { result = f.getLocation() } +} + /** * Provides functionality related to context-based typing of calls. */ @@ -1026,14 +1084,13 @@ private module ContextTyping { } /** - * Holds if this call resolves to `target` inside `i`, and the return type + * Holds if this call resolves to `f`, and the return type * at `pos` and `path` may have to be inferred from the context. */ - bindingset[this, i, target] - predicate hasUnknownTypeAt( - ImplOrTraitItemNode i, Function target, FunctionPosition pos, TypePath path - ) { - exists(TypeParameter tp | + bindingset[this, f] + predicate hasUnknownTypeAt0(AssocFunction f, FunctionPosition pos, TypePath path) { + exists(ImplOrTraitItemNode i, Function target, TypeParameter tp | + f = MkAssocFuntion(i, target) and assocFunctionReturnContextTypedAt(i, target, pos, path, tp) and // check that no explicit type arguments have been supplied for `tp` not exists(TypeArgumentPosition tapos | this.hasTypeArgument(tapos) | @@ -1153,6 +1210,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. * @@ -1195,7 +1280,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] @@ -1411,7 +1496,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 @@ -1436,7 +1521,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, @@ -1453,7 +1538,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, _, _) @@ -1468,13 +1553,15 @@ private module MethodResolution { */ pragma[nomagic] Type getACandidateReceiverTypeAtSubstituteLookupTraits( - string derefChain, boolean borrow, TypePath path + string derefChain, BorrowKind borrow, TypePath path ) { result = substituteLookupTraits(this.getACandidateReceiverTypeAt(derefChain, borrow, path)) } pragma[nomagic] - private Type getComplexStrippedType(string derefChain, boolean borrow, TypePath strippedTypePath) { + private Type getComplexStrippedType( + string derefChain, BorrowKind borrow, TypePath strippedTypePath + ) { result = this.getACandidateReceiverTypeAtSubstituteLookupTraits(derefChain, borrow, strippedTypePath) and isComplexRootStripped(strippedTypePath, result) @@ -1482,7 +1569,7 @@ private module MethodResolution { 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) @@ -1493,7 +1580,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 @@ -1504,7 +1591,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 @@ -1529,9 +1616,8 @@ private module MethodResolution { derefChain = "" ) and exists(TypePath strippedTypePath, Type strippedType | - not derefChain.matches("%.ref") and // no need to try a borrow if the last thing we did was a deref - strippedType = this.getComplexStrippedType(derefChain, false, strippedTypePath) and - this.hasNoCompatibleTargetCheck(derefChain, false, strippedTypePath, strippedType) + strippedType = this.getComplexStrippedType(derefChain, TNoBorrowKind(), strippedTypePath) and + this.hasNoCompatibleTargetCheck(derefChain, TNoBorrowKind(), strippedTypePath, strippedType) ) } @@ -1549,36 +1635,67 @@ private module MethodResolution { derefChain = "" ) and exists(TypePath strippedTypePath, Type strippedType | - not derefChain.matches("%.ref") and // no need to try a borrow if the last thing we did was a deref - strippedType = this.getComplexStrippedType(derefChain, false, strippedTypePath) and - this.hasNoCompatibleNonBlanketTargetCheck(derefChain, false, strippedTypePath, strippedType) + strippedType = this.getComplexStrippedType(derefChain, TNoBorrowKind(), strippedTypePath) and + this.hasNoCompatibleNonBlanketTargetCheck(derefChain, TNoBorrowKind(), strippedTypePath, + strippedType) ) } /** * 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(TypePath strippedTypePath, Type strippedType | this.hasNoCompatibleTargetNoBorrow(derefChain) and - strippedType = this.getComplexStrippedType(derefChain, true, strippedTypePath) and - this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, true, strippedTypePath, - strippedType) + strippedType = + this.getComplexStrippedType(derefChain, TSharedBorrowKind(), strippedTypePath) and + this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, TSharedBorrowKind(), + strippedTypePath, strippedType) ) } /** * 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 method target. */ pragma[nomagic] - predicate hasNoCompatibleNonBlanketTargetBorrow(string derefChain) { + predicate hasNoCompatibleTargetMutBorrow(string derefChain) { + exists(TypePath strippedTypePath, Type strippedType | + this.hasNoCompatibleTargetSharedBorrow(derefChain) and + strippedType = this.getComplexStrippedType(derefChain, TMutBorrowKind(), strippedTypePath) and + this.hasNoCompatibleNonBlanketLikeTargetCheck(derefChain, TMutBorrowKind(), + strippedTypePath, strippedType) + ) + } + + /** + * 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(TypePath strippedTypePath, Type strippedType | this.hasNoCompatibleTargetNoBorrow(derefChain) and - strippedType = this.getComplexStrippedType(derefChain, true, strippedTypePath) and - this.hasNoCompatibleNonBlanketTargetCheck(derefChain, true, strippedTypePath, strippedType) + strippedType = + this.getComplexStrippedType(derefChain, TSharedBorrowKind(), strippedTypePath) and + this.hasNoCompatibleNonBlanketTargetCheck(derefChain, TSharedBorrowKind(), strippedTypePath, + strippedType) + ) + } + + /** + * Holds if the candidate receiver type represented by `derefChain`, followed + * by a `mut` borrow, does not have a matching non-blanket method target. + */ + pragma[nomagic] + predicate hasNoCompatibleNonBlanketTargetMutBorrow(string derefChain) { + exists(TypePath strippedTypePath, Type strippedType | + this.hasNoCompatibleNonBlanketTargetSharedBorrow(derefChain) and + strippedType = this.getComplexStrippedType(derefChain, TMutBorrowKind(), strippedTypePath) and + this.hasNoCompatibleNonBlanketTargetCheck(derefChain, TMutBorrowKind(), strippedTypePath, + strippedType) ) } @@ -1595,20 +1712,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) + ) ) ) } @@ -1616,10 +1742,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) @@ -1627,12 +1753,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())) } } @@ -1741,30 +1868,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) ) } @@ -1781,7 +1919,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, _)) } @@ -1789,7 +1927,7 @@ private module MethodResolution { private class MethodCallCand extends MkMethodCallCand { MethodCall mc_; string derefChain; - boolean borrow; + BorrowKind borrow; MethodCallCand() { this = MkMethodCallCand(mc_, derefChain, borrow) } @@ -1803,11 +1941,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] @@ -1878,8 +2019,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() } @@ -1892,17 +2031,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) ) } } @@ -2076,45 +2215,23 @@ private module MethodResolution { private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSig { import FunctionPositionMatchingInput - final class Declaration extends Function { - TypeParameter getTypeParameter(TypeParameterPosition ppos) { - typeParamMatchPosition(this.getGenericParamList().getATypeParam(), result, ppos) - or - exists(ImplOrTraitItemNode i | this = i.getAnAssocItem() | - typeParamMatchPosition(i.getTypeParam(_), result, ppos) - or - ppos.isImplicit() and result = TSelfTypeParameter(i) - or - ppos.isImplicit() and - result.(AssociatedTypeTypeParameter).getTrait() = i - ) - or - ppos.isImplicit() and - this = result.(ImplTraitTypeTypeParameter).getFunction() - } - + final class Declaration extends AssocFunction { pragma[nomagic] Type getParameterType(DeclarationPosition dpos, TypePath path) { - exists(Param p, int i | - p = this.getParam(i) and - i = dpos.asPosition() and - result = p.getTypeRepr().(TypeMention).resolveTypeAt(path) - ) - or - dpos.isSelf() and - exists(SelfParam self | - self = pragma[only_bind_into](this.getSelfParam()) and - result = getSelfParamTypeMention(self).resolveTypeAt(path) - ) + result = super.getDeclaredType(dpos, path) and + not dpos.isReturn() } private Type resolveRetType(TypePath path) { - result = getReturnTypeMention(this).resolveTypeAt(path) + exists(DeclarationPosition dpos | + result = super.getDeclaredType(dpos, path) and + dpos.isReturn() + ) } pragma[nomagic] Type getReturnType(TypePath path) { - if this.isAsync() + if f.isAsync() then path.isEmpty() and result = getFutureTraitType() @@ -2137,10 +2254,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; @@ -2165,7 +2280,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() @@ -2201,9 +2316,9 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi } Declaration 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 + result = MkAssocFuntion(i, this.resolveCallTarget(i, derefChain, borrow)) // mutual recursion; resolving method calls requires resolving types and vice versa ) } @@ -2216,7 +2331,7 @@ private module MethodCallMatchingInput implements MatchingWithEnvironmentInputSi pragma[nomagic] predicate hasUnknownTypeAt(string derefChainBorrow, FunctionPosition pos, TypePath path) { exists(ImplOrTraitItemNode i | - this.hasUnknownTypeAt(i, this.getTarget(i, derefChainBorrow), pos, path) + this.hasUnknownTypeAt0(this.getTarget(i, derefChainBorrow), pos, path) ) } } @@ -2271,7 +2386,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) ) } @@ -2586,6 +2701,72 @@ private module NonMethodResolution { ArgsAreInstantiationsOf; } +abstract private class TupleConstructor extends Addressable { + abstract TypeParameter getTypeParameter(TypeParameterPosition ppos); + + abstract Type getParameterType(FunctionPosition pos, TypePath path); + + abstract Type getReturnType(TypePath path); + + Type getDeclaredType(FunctionPosition pos, TypePath path) { + result = this.getParameterType(pos, path) + or + pos.isReturn() and + result = this.getReturnType(path) + or + pos.isSelf() and + result = this.getReturnType(path) + } +} + +private class TupleStruct extends TupleConstructor, Struct { + TupleStruct() { this.isTuple() } + + override TypeParameter getTypeParameter(TypeParameterPosition ppos) { + typeParamMatchPosition(this.getGenericParamList().getATypeParam(), result, ppos) + } + + override Type getParameterType(FunctionPosition pos, TypePath path) { + exists(int i | + result = this.getTupleField(i).getTypeRepr().(TypeMention).resolveTypeAt(path) and + i = pos.asPosition() + ) + } + + override Type getReturnType(TypePath path) { + result = TStruct(this) and + path.isEmpty() + or + result = TTypeParamTypeParameter(this.getGenericParamList().getATypeParam()) and + path = TypePath::singleton(result) + } +} + +private class TupleVariant extends TupleConstructor, Variant { + TupleVariant() { this.isTuple() } + + override TypeParameter getTypeParameter(TypeParameterPosition ppos) { + typeParamMatchPosition(this.getEnum().getGenericParamList().getATypeParam(), result, ppos) + } + + override Type getParameterType(FunctionPosition pos, TypePath path) { + exists(int i | + result = this.getTupleField(i).getTypeRepr().(TypeMention).resolveTypeAt(path) and + i = pos.asPosition() + ) + } + + override Type getReturnType(TypePath path) { + exists(Enum enum | enum = this.getEnum() | + result = TEnum(enum) and + path.isEmpty() + or + result = TTypeParamTypeParameter(enum.getGenericParamList().getATypeParam()) and + path = TypePath::singleton(result) + ) + } +} + /** * A matching configuration for resolving types of calls like * `foo::bar(baz)` where the target is not a method. @@ -2596,7 +2777,14 @@ private module NonMethodResolution { private module NonMethodCallMatchingInput implements MatchingInputSig { import FunctionPositionMatchingInput - abstract class Declaration extends AstNode { + private newtype TDeclaration = + TNonMethodFunctionDeclaration(MethodCallMatchingInput::Declaration f) { + f.getFunction() instanceof NonMethodFunction + } or + TFreeFunctionDeclaration(Function f) { not f = any(ImplOrTraitItemNode i).getAnAssocItem() } or + TTupleConstructorDeclaration(TupleConstructor tc) + + abstract class Declaration extends TDeclaration { abstract TypeParameter getTypeParameter(TypeParameterPosition ppos); pragma[nomagic] @@ -2610,103 +2798,121 @@ private module NonMethodCallMatchingInput implements MatchingInputSig { dpos.isReturn() and result = this.getReturnType(path) } - } - abstract additional class TupleDeclaration extends Declaration { - override Type getDeclaredType(DeclarationPosition dpos, TypePath path) { - result = super.getDeclaredType(dpos, path) - or - dpos.isSelf() and - result = this.getReturnType(path) - } + abstract string toString(); + + abstract Location getLocation(); } - private class TupleStructDecl extends TupleDeclaration, Struct { - TupleStructDecl() { this.isTuple() } + private class NonMethodFunctionDecl extends Declaration, TNonMethodFunctionDeclaration { + private MethodCallMatchingInput::Declaration f; + + NonMethodFunctionDecl() { this = TNonMethodFunctionDeclaration(f) } override TypeParameter getTypeParameter(TypeParameterPosition ppos) { - typeParamMatchPosition(this.getGenericParamList().getATypeParam(), result, ppos) + result = f.getTypeParameter(ppos) } override Type getParameterType(DeclarationPosition dpos, TypePath path) { - exists(int pos | - result = this.getTupleField(pos).getTypeRepr().(TypeMention).resolveTypeAt(path) and - pos = dpos.asPosition() - ) + // For associated functions, we may also need to match type arguments against + // the `Self` type. For example, in + // + // ```rust + // struct Foo(T); + // + // impl Foo { + // fn default() -> Self { + // Foo(Default::default()) + // } + // } + // + // Foo::::default(); + // ``` + // + // we need to match `i32` against the type parameter `T` of the `impl` block. + dpos.isSelf() and + result = resolveImplOrTraitType(f.getImplOrTraitItemNode(), path) + or + // f.getFunction().fromSource() and + result = f.getParameterType(dpos, path) } override Type getReturnType(TypePath path) { - result = TStruct(this) and - path.isEmpty() - or - result = TTypeParamTypeParameter(this.getGenericParamList().getATypeParam()) and - path = TypePath::singleton(result) + // f.getFunction().fromSource() and + result = f.getReturnType(path) } + + override string toString() { result = f.toString() } + + override Location getLocation() { result = f.getLocation() } } - private class TupleVariantDecl extends TupleDeclaration, Variant { - TupleVariantDecl() { this.isTuple() } + additional class FreeFunctionDeclaration extends Declaration, TFreeFunctionDeclaration { + Function f; + + FreeFunctionDeclaration() { this = TFreeFunctionDeclaration(f) } + + Function getFunction() { result = f } override TypeParameter getTypeParameter(TypeParameterPosition ppos) { - typeParamMatchPosition(this.getEnum().getGenericParamList().getATypeParam(), result, ppos) + typeParamMatchPosition(f.getGenericParamList().getATypeParam(), result, ppos) + or + // todo: dedup + ppos.isImplicit() and + f = result.(ImplTraitTypeTypeParameter).getFunction() } override Type getParameterType(DeclarationPosition dpos, TypePath path) { - exists(int pos | - result = this.getTupleField(pos).getTypeRepr().(TypeMention).resolveTypeAt(path) and - pos = dpos.asPosition() + exists(Param p, int i | + p = f.getParam(i) and + i = dpos.asPosition() and + result = p.getTypeRepr().(TypeMention).resolveTypeAt(path) ) } + private Type resolveRetType(TypePath path) { + result = getReturnTypeMention(f).resolveTypeAt(path) + } + override Type getReturnType(TypePath path) { - exists(Enum enum | enum = this.getEnum() | - result = TEnum(enum) and - path.isEmpty() + if f.isAsync() + then + path.isEmpty() and + result = getFutureTraitType() or - result = TTypeParamTypeParameter(enum.getGenericParamList().getATypeParam()) and - path = TypePath::singleton(result) - ) + exists(TypePath suffix | + result = this.resolveRetType(suffix) and + path = TypePath::cons(getDynFutureOutputTypeParameter(), suffix) + ) + else result = this.resolveRetType(path) } + + override string toString() { result = f.toString() } + + override Location getLocation() { result = f.getLocation() } } - private class NonMethodFunctionDecl extends Declaration, NonMethodFunction instanceof MethodCallMatchingInput::Declaration - { + private class TupleConstructorDeclaration extends Declaration, TTupleConstructorDeclaration { + TupleConstructor tc; + + TupleConstructorDeclaration() { this = TTupleConstructorDeclaration(tc) } + override TypeParameter getTypeParameter(TypeParameterPosition ppos) { - result = MethodCallMatchingInput::Declaration.super.getTypeParameter(ppos) + result = tc.getTypeParameter(ppos) } override Type getParameterType(DeclarationPosition dpos, TypePath path) { - // For associated functions, we may also need to match type arguments against - // the `Self` type. For example, in - // - // ```rust - // struct Foo(T); - // - // impl Foo { - // fn default() -> Self { - // Foo(Default::default()) - // } - // } - // - // Foo::::default(); - // ``` - // - // we need to match `i32` against the type parameter `T` of the `impl` block. - dpos.isSelf() and - exists(ImplOrTraitItemNode i | - this = i.getAnAssocItem() and - result = resolveImplOrTraitType(i, path) - ) - or - exists(FunctionPosition fpos | - result = MethodCallMatchingInput::Declaration.super.getParameterType(fpos, path) and - dpos = fpos.getFunctionCallAdjusted(this) - ) + result = tc.getParameterType(dpos, path) } override Type getReturnType(TypePath path) { - result = MethodCallMatchingInput::Declaration.super.getReturnType(path) + // tc.fromSource() and + result = tc.getReturnType(path) } + + override string toString() { result = tc.toString() } + + override Location getLocation() { result = tc.getLocation() } } class Access extends NonMethodResolution::NonMethodCall, ContextTyping::ContextTypedCallCand { @@ -2724,7 +2930,26 @@ private module NonMethodCallMatchingInput implements MatchingInputSig { } Declaration getTarget() { - result = this.resolveCallTarget() // potential mutual recursion; resolving some associated function calls requires resolving types + exists(ImplOrTraitItemNode i | + result = + TNonMethodFunctionDeclaration(MkAssocFuntion(i, + [ + this.resolveCallTargetViaTypeInference(i), // mutual recursion; resolving some associated function calls requires resolving types + this.resolveTraitFunctionViaPathResolution(i) + ])) + or + exists(Function f | + f = this.resolveCallTargetViaPathResolution() and + result = TNonMethodFunctionDeclaration(MkAssocFuntion(i, f)) and + f = i.getAnAssocItem() + ) + ) + or + exists(ItemNode i | i = this.resolveCallTargetViaPathResolution() | + result = TFreeFunctionDeclaration(i) + or + result = TTupleConstructorDeclaration(i) + ) } /** @@ -2733,18 +2958,14 @@ private module NonMethodCallMatchingInput implements MatchingInputSig { */ pragma[nomagic] predicate hasUnknownTypeAt(FunctionPosition pos, TypePath path) { - exists(ImplOrTraitItemNode i | - this.hasUnknownTypeAt(i, - [ - this.resolveCallTargetViaPathResolution().(NonMethodFunction), - this.resolveCallTargetViaTypeInference(i), - this.resolveTraitFunctionViaPathResolution(i) - ], pos, path) + exists(AssocFunction f | + TNonMethodFunctionDeclaration(f) = this.getTarget() and + this.hasUnknownTypeAt0(f, pos, path) ) or // Tuple declarations, such as `Result::Ok(...)`, may also be context typed - exists(TupleDeclaration td, TypeParameter tp | - td = this.resolveCallTargetViaPathResolution() and + exists(TupleConstructorDeclaration td, TypeParameter tp | + td = TTupleConstructorDeclaration(this.resolveCallTargetViaPathResolution()) and pos.isReturn() and tp = td.getReturnType(path) and not tp = td.getParameterType(_, _) and @@ -2785,9 +3006,9 @@ private module OperationMatchingInput implements MatchingInputSig { class Declaration extends MethodCallMatchingInput::Declaration { private Method getSelfOrImpl() { - result = this + result = f or - this.implements(result) + f.implements(result) } pragma[nomagic] @@ -2840,7 +3061,9 @@ private module OperationMatchingInput implements MatchingInputSig { } Declaration getTarget() { - result = this.resolveCallTarget(_, _, _) // mutual recursion + exists(ImplOrTraitItemNode i | + result = MkAssocFuntion(i, this.resolveCallTarget(i, _, _)) // mutual recursion + ) } } } @@ -3037,14 +3260,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] @@ -3098,9 +3333,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 @@ -3307,7 +3542,7 @@ private Type inferStructPatType(AstNode n, TypePath path) { private module TupleStructPatMatchingInput implements MatchingInputSig { import FunctionPositionMatchingInput - class Declaration = NonMethodCallMatchingInput::TupleDeclaration; + class Declaration = TupleConstructor; class Access extends TupleStructPat { Type getTypeArgument(TypeArgumentPosition apos, TypePath path) { none() } @@ -3400,12 +3635,9 @@ private Type inferForLoopExprType(AstNode n, TypePath path) { * first-class function. */ final private class InvokedClosureExpr extends Expr { - private CallExpr call; + private CallExprImpl::DynamicCallExpr call; - InvokedClosureExpr() { - call.getFunction() = this and - (not this instanceof PathExpr or this = any(Variable v).getAnAccess()) - } + InvokedClosureExpr() { call.getFunction() = this } Type getTypeAt(TypePath path) { result = inferType(this, path) } @@ -3537,7 +3769,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, _) } /** @@ -3691,8 +3923,10 @@ private module Debug { Locatable getRelevantLocatable() { exists(string filepath, int startline, int startcolumn, int endline, int endcolumn | result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and - filepath.matches("%/sqlx.rs") and - startline = [56 .. 60] + filepath.matches("%/codeql-dca-worker_rust/src/grid_fmt.rs") and + startline = [285 .. 298] + // filepath.matches("%/main.rs") and + // startline = 1204 ) } diff --git a/rust/ql/lib/codeql/rust/internal/TypeMention.qll b/rust/ql/lib/codeql/rust/internal/TypeMention.qll index 3e2ca8111079..c3743c5df42d 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,16 +441,22 @@ 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 + result = this.resolveSelfRefRootType() or exists(TypePath suffix | result = this.resolveSelfType(suffix) and - typePath = TypePath::cons(getRefTypeParameter(), suffix) + typePath = + TypePath::cons(this.resolveSelfRefRootType().getPositionalTypeParameter(0), suffix) ) else // `fn f(self, ...)` 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/global/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected deleted file mode 100644 index 10c2285e621e..000000000000 --- a/rust/ql/test/library-tests/dataflow/global/CONSISTENCY/PathResolutionConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -multipleResolvedTargets -| main.rs:236:11:236:15 | * ... | -| main.rs:272:13:272:29 | * ... | diff --git a/rust/ql/test/library-tests/dataflow/global/viableCallable.expected b/rust/ql/test/library-tests/dataflow/global/viableCallable.expected index 9170332ea251..8524e35fad50 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:212:24:212:33 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:214:5:214:11 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:236:11:236:15 | * ... | {EXTERNAL LOCATION} | fn deref | -| main.rs:236:11:236:15 | * ... | {EXTERNAL LOCATION} | fn deref | | main.rs:242:28:242:36 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:244:13:244:17 | ... + ... | main.rs:220:5:223:5 | fn add | | main.rs:245:5:245:17 | sink(...) | main.rs:5:1:7:1 | fn sink | @@ -79,7 +78,6 @@ | main.rs:267:5:267:17 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:270:28:270:37 | source(...) | main.rs:1:1:3:1 | fn source | | main.rs:272:13:272:29 | * ... | {EXTERNAL LOCATION} | fn deref | -| main.rs:272:13:272:29 | * ... | {EXTERNAL LOCATION} | fn deref | | main.rs:272:14:272:29 | ...::deref(...) | main.rs:235:5:237:5 | fn deref | | main.rs:273:5:273:11 | sink(...) | main.rs:5:1:7:1 | fn sink | | main.rs:275:28:275: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 d2807602e2f9..840342155a73 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:1077:14:1077:18 | * ... | -| main.rs:1159:26:1159:30 | * ... | -| main.rs:1504:14:1504:21 | * ... | -| main.rs:1504:16:1504:20 | * ... | -| main.rs:1509:14:1509:18 | * ... | -| main.rs:1540:27:1540:29 | * ... | -| main.rs:1654:17:1654:24 | * ... | -| main.rs:1654:18:1654:24 | * ... | -| main.rs:1792:17:1792:21 | * ... | -| main.rs:1807:28:1807:32 | * ... | -| main.rs:2440:13:2440:18 | * ... | -| main.rs:2634:13:2634:31 | ...::from(...) | -| main.rs:2635:13:2635:31 | ...::from(...) | -| main.rs:2636:13:2636:31 | ...::from(...) | -| main.rs:2642:13:2642:31 | ...::from(...) | -| main.rs:2643:13:2643:31 | ...::from(...) | -| main.rs:2644:13:2644:31 | ...::from(...) | | main.rs:3067:13:3067: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/blanket_impl.rs b/rust/ql/test/library-tests/type-inference/blanket_impl.rs index 49fcd8af0a64..c139af01c422 100644 --- a/rust/ql/test/library-tests/type-inference/blanket_impl.rs +++ b/rust/ql/test/library-tests/type-inference/blanket_impl.rs @@ -236,7 +236,7 @@ mod blanket_like_impl { impl MyTrait2 for &&S1 { // MyTrait2RefRefS1::m2 fn m2(self) { - self.m1() // $ MISSING: target=S1::m1 + self.m1() // $ target=S1::m1 } } 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 466733cf47c7..f9f046c32ff9 100644 --- a/rust/ql/test/library-tests/type-inference/main.rs +++ b/rust/ql/test/library-tests/type-inference/main.rs @@ -2626,7 +2626,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 14cc45775397..96abc29c80db 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 | @@ -1793,19 +1793,19 @@ inferCertainType | main.rs:1374:13:1374:13 | x | T.T42 | main.rs:1332:5:1332:22 | S5 | | main.rs:1374:13:1374:13 | x | T.T42.T5 | main.rs:1307:5:1308:14 | S2 | | main.rs:1376:22:1376:25 | true | | {EXTERNAL LOCATION} | bool | -| main.rs:1389:16:1389:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1389:16:1389:24 | SelfParam | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1389:16:1389:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1389:16:1389:24 | SelfParam | TRefMut | main.rs:1387:5:1394:5 | Self [trait MyTrait] | | main.rs:1389:27:1389:31 | value | | main.rs:1387:19:1387:19 | S | -| main.rs:1391:21:1391:29 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1391:21:1391:29 | SelfParam | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1391:21:1391:29 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1391:21:1391:29 | SelfParam | TRefMut | main.rs:1387:5:1394:5 | Self [trait MyTrait] | | main.rs:1391:32:1391:36 | value | | main.rs:1387:19:1387:19 | S | | main.rs:1391:42:1393:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1392:13:1392:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1392:13:1392:16 | self | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1392:13:1392:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1392:13:1392:16 | self | TRefMut | main.rs:1387:5:1394:5 | Self [trait MyTrait] | | main.rs:1392:22:1392:26 | value | | main.rs:1387:19:1387:19 | S | -| main.rs:1398:16:1398:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1398:16:1398:24 | SelfParam | TRef | main.rs:1381:5:1385:5 | MyOption | -| main.rs:1398:16:1398:24 | SelfParam | TRef.T | main.rs:1396:10:1396:10 | T | +| main.rs:1398:16:1398:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1398:16:1398:24 | SelfParam | TRefMut | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1398:16:1398:24 | SelfParam | TRefMut.T | main.rs:1396:10:1396:10 | T | | main.rs:1398:27:1398:31 | value | | main.rs:1396:10:1396:10 | T | | main.rs:1398:37:1398:38 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1402:26:1404:9 | { ... } | | main.rs:1381:5:1385:5 | MyOption | @@ -1848,7 +1848,7 @@ inferCertainType | main.rs:1432:17:1432:18 | x4 | | main.rs:1381:5:1385:5 | MyOption | | main.rs:1432:22:1432:36 | ...::new(...) | | main.rs:1381:5:1385:5 | MyOption | | main.rs:1433:9:1433:33 | ...::set(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1433:23:1433:29 | &mut x4 | | {EXTERNAL LOCATION} | & | +| main.rs:1433:23:1433:29 | &mut x4 | | {EXTERNAL LOCATION} | &mut | | main.rs:1433:28:1433:29 | x4 | | main.rs:1381:5:1385:5 | MyOption | | main.rs:1434:18:1434:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | | main.rs:1434:18:1434:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | @@ -2042,13 +2042,13 @@ inferCertainType | main.rs:1607:16:1613:5 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1612:15:1612:17 | &... | | {EXTERNAL LOCATION} | & | | main.rs:1612:16:1612:17 | &x | | {EXTERNAL LOCATION} | & | -| main.rs:1623:17:1623:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1623:17:1623:25 | SelfParam | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1623:17:1623:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1623:17:1623:25 | SelfParam | TRefMut | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1623:28:1625:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1624:13:1624:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1624:13:1624:16 | self | TRef | main.rs:1617:5:1620:5 | MyFlag | -| main.rs:1624:26:1624:29 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1624:26:1624:29 | self | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1624:13:1624:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1624:13:1624:16 | self | TRefMut | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1624:26:1624:29 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1624:26:1624:29 | self | TRefMut | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1631:15:1631:19 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:1631:15:1631:19 | SelfParam | TRef | main.rs:1628:5:1628:13 | S | | main.rs:1631:31:1633:9 | { ... } | | {EXTERNAL LOCATION} | & | @@ -2095,7 +2095,7 @@ inferCertainType | main.rs:1654:20:1654:24 | &true | | {EXTERNAL LOCATION} | & | | main.rs:1654:21:1654:24 | true | | {EXTERNAL LOCATION} | bool | | main.rs:1659:9:1659:31 | ...::flip(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1659:22:1659:30 | &mut flag | | {EXTERNAL LOCATION} | & | +| main.rs:1659:22:1659:30 | &mut flag | | {EXTERNAL LOCATION} | &mut | | main.rs:1660:18:1660:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | | main.rs:1660:18:1660:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | | main.rs:1660:18:1660:29 | ...::_print(...) | | {EXTERNAL LOCATION} | () | @@ -2267,7 +2267,7 @@ inferCertainType | main.rs:1810:31:1812:13 | { ... } | | main.rs:1805:14:1805:23 | T | | main.rs:1816:13:1816:13 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1816:13:1816:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | -| main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | & | +| main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | &mut | | main.rs:1817:26:1817:26 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1817:26:1817:26 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | | main.rs:1818:26:1818:48 | ...::my_method(...) | | {EXTERNAL LOCATION} | & | @@ -2297,15 +2297,15 @@ inferCertainType | main.rs:1860:29:1860:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1861:20:1861:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1861:29:1861:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1868:23:1868:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1868:23:1868:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1868:23:1868:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1868:23:1868:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1868:34:1868:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1868:45:1871:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1869:13:1869:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1869:13:1869:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1869:13:1869:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1869:13:1869:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1869:23:1869:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1870:13:1870:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1870:13:1870:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1870:13:1870:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1870:13:1870:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1870:23:1870:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1876:16:1876:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1876:22:1876:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -2315,15 +2315,15 @@ inferCertainType | main.rs:1878:29:1878:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1879:20:1879:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1879:29:1879:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1886:23:1886:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1886:23:1886:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1886:23:1886:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1886:23:1886:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1886:34:1886:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1886:45:1889:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1887:13:1887:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1887:13:1887:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1887:13:1887:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1887:13:1887:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1887:23:1887:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1888:13:1888:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1888:13:1888:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1888:13:1888:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1888:13:1888:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1888:23:1888:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1894:16:1894:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1894:22:1894:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -2333,15 +2333,15 @@ inferCertainType | main.rs:1896:29:1896:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1897:20:1897:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1897:29:1897:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1903:23:1903:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1903:23:1903:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1903:23:1903:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1903:23:1903:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1903:34:1903:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1903:45:1906:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1904:13:1904:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1904:13:1904:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1904:13:1904:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1904:13:1904:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1904:23:1904:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1905:13:1905:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1905:13:1905:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1905:13:1905:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1905:13:1905:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1905:23:1905:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1911:16:1911:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1911:22:1911:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -2351,15 +2351,15 @@ inferCertainType | main.rs:1913:29:1913:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1914:20:1914:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1914:29:1914:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1920:23:1920:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1920:23:1920:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1920:23:1920:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1920:23:1920:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1920:34:1920:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1920:45:1923:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1921:13:1921:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1921:13:1921:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1921:13:1921:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1921:13:1921:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1921:23:1921:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1922:13:1922:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1922:13:1922:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1922:13:1922:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1922:13:1922:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1922:23:1922:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1928:16:1928:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1928:22:1928:24 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -2369,15 +2369,15 @@ inferCertainType | main.rs:1930:29:1930:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1931:20:1931:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1931:29:1931:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1937:23:1937:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1937:23:1937:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1937:23:1937:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1937:23:1937:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1937:34:1937:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1937:45:1940:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1938:13:1938:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1938:13:1938:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1938:13:1938:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1938:13:1938:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1938:23:1938:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1939:13:1939:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1939:13:1939:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1939:13:1939:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1939:13:1939:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1939:23:1939:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1945:19:1945:22 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1945:25:1945:27 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -2387,15 +2387,15 @@ inferCertainType | main.rs:1947:29:1947:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1948:20:1948:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1948:29:1948:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1954:26:1954:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1954:26:1954:34 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1954:26:1954:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1954:26:1954:34 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1954:37:1954:39 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1954:48:1957:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1955:13:1955:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1955:13:1955:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1955:13:1955:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1955:13:1955:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1955:23:1955:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1956:13:1956:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1956:13:1956:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1956:13:1956:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1956:13:1956:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1956:23:1956:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1962:18:1962:21 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1962:24:1962:26 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -2405,15 +2405,15 @@ inferCertainType | main.rs:1964:29:1964:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1965:20:1965:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1965:29:1965:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1971:25:1971:33 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1971:25:1971:33 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1971:25:1971:33 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1971:25:1971:33 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1971:36:1971:38 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1971:47:1974:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1972:13:1972:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1972:13:1972:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1972:13:1972:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1972:13:1972:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1972:23:1972:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1973:13:1973:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1973:13:1973:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1973:13:1973:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1973:13:1973:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1973:23:1973:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1979:19:1979:22 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1979:25:1979:27 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -2423,15 +2423,15 @@ inferCertainType | main.rs:1981:29:1981:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1982:20:1982:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1982:29:1982:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1988:26:1988:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1988:26:1988:34 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1988:26:1988:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1988:26:1988:34 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1988:37:1988:39 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1988:48:1991:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1989:13:1989:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1989:13:1989:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1989:13:1989:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1989:13:1989:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1989:23:1989:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | -| main.rs:1990:13:1990:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1990:13:1990:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1990:13:1990:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1990:13:1990:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1990:23:1990:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1996:16:1996:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1996:22:1996:24 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -2441,15 +2441,15 @@ inferCertainType | main.rs:1998:30:1998:32 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:1999:20:1999:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1999:30:1999:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2005:23:2005:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2005:23:2005:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2005:23:2005:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2005:23:2005:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2005:34:2005:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2005:44:2008:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2006:13:2006:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2006:13:2006:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2006:13:2006:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2006:13:2006:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2006:24:2006:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2007:13:2007:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2007:13:2007:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2007:13:2007:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2007:13:2007:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2007:24:2007:26 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2013:16:2013:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2013:22:2013:24 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -2459,15 +2459,15 @@ inferCertainType | main.rs:2015:30:2015:32 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2016:20:2016:23 | self | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2016:30:2016:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2022:23:2022:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2022:23:2022:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2022:23:2022:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2022:23:2022:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2022:34:2022:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2022:44:2025:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2023:13:2023:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2023:13:2023:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2023:13:2023:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2023:13:2023:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2023:24:2023:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2024:13:2024:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2024:13:2024:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2024:13:2024:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2024:13:2024:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2024:24:2024:26 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2030:16:2030:19 | SelfParam | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2030:30:2035:9 | { ... } | | main.rs:1843:5:1848:5 | Vec2 | @@ -2760,10 +2760,10 @@ inferCertainType | main.rs:2236:9:2236:16 | { ... } | | {EXTERNAL LOCATION} | dyn Future | | main.rs:2236:9:2236:16 | { ... } | dyn(Output) | {EXTERNAL LOCATION} | () | | main.rs:2245:13:2245:42 | SelfParam | | {EXTERNAL LOCATION} | Pin | -| main.rs:2245:13:2245:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | & | -| main.rs:2245:13:2245:42 | SelfParam | Ptr.TRef | main.rs:2239:5:2239:14 | S2 | -| main.rs:2246:13:2246:15 | _cx | | {EXTERNAL LOCATION} | & | -| main.rs:2246:13:2246:15 | _cx | TRef | {EXTERNAL LOCATION} | Context | +| main.rs:2245:13:2245:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | &mut | +| main.rs:2245:13:2245:42 | SelfParam | Ptr.TRefMut | main.rs:2239:5:2239:14 | S2 | +| main.rs:2246:13:2246:15 | _cx | | {EXTERNAL LOCATION} | &mut | +| main.rs:2246:13:2246:15 | _cx | TRefMut | {EXTERNAL LOCATION} | Context | | main.rs:2247:44:2249:9 | { ... } | | {EXTERNAL LOCATION} | Poll | | main.rs:2247:44:2249:9 | { ... } | T | main.rs:2221:5:2221:14 | S1 | | main.rs:2252:41:2254:5 | { ... } | | main.rs:2252:16:2252:39 | impl ... | @@ -2851,14 +2851,14 @@ inferCertainType | main.rs:2370:13:2370:38 | MyVec {...} | | main.rs:2363:5:2366:5 | MyVec | | main.rs:2370:27:2370:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | | main.rs:2370:27:2370:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | -| main.rs:2373:17:2373:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2373:17:2373:25 | SelfParam | TRef | main.rs:2363:5:2366:5 | MyVec | -| main.rs:2373:17:2373:25 | SelfParam | TRef.T | main.rs:2368:10:2368:10 | T | +| main.rs:2373:17:2373:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2373:17:2373:25 | SelfParam | TRefMut | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2373:17:2373:25 | SelfParam | TRefMut.T | main.rs:2368:10:2368:10 | T | | main.rs:2373:28:2373:32 | value | | main.rs:2368:10:2368:10 | T | | main.rs:2373:38:2375:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2374:13:2374:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2374:13:2374:16 | self | TRef | main.rs:2363:5:2366:5 | MyVec | -| main.rs:2374:13:2374:16 | self | TRef.T | main.rs:2368:10:2368:10 | T | +| main.rs:2374:13:2374:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2374:13:2374:16 | self | TRefMut | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2374:13:2374:16 | self | TRefMut.T | main.rs:2368:10:2368:10 | T | | main.rs:2374:28:2374:32 | value | | main.rs:2368:10:2368:10 | T | | main.rs:2382:18:2382:22 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:2382:18:2382:22 | SelfParam | TRef | main.rs:2363:5:2366:5 | MyVec | @@ -3075,7 +3075,7 @@ inferCertainType | main.rs:2628:19:2628:26 | strings1 | | {EXTERNAL LOCATION} | [;] | | main.rs:2628:28:2628:29 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2629:9:2629:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2629:18:2629:30 | &mut strings1 | | {EXTERNAL LOCATION} | & | +| main.rs:2629:18:2629:30 | &mut strings1 | | {EXTERNAL LOCATION} | &mut | | main.rs:2629:23:2629:30 | strings1 | | {EXTERNAL LOCATION} | [;] | | main.rs:2629:32:2629:33 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2630:9:2630:28 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | @@ -3808,13 +3808,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} | () | @@ -3910,9 +3910,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} | & | @@ -4486,7 +4486,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} | () | @@ -5300,8 +5300,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 | @@ -5313,55 +5313,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} | & | @@ -7620,20 +7610,20 @@ inferType | main.rs:1376:17:1376:38 | ... .get_input() | E | {EXTERNAL LOCATION} | bool | | main.rs:1376:17:1376:38 | ... .get_input() | T | {EXTERNAL LOCATION} | bool | | main.rs:1376:22:1376:25 | true | | {EXTERNAL LOCATION} | bool | -| main.rs:1389:16:1389:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1389:16:1389:24 | SelfParam | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1389:16:1389:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1389:16:1389:24 | SelfParam | TRefMut | main.rs:1387:5:1394:5 | Self [trait MyTrait] | | main.rs:1389:27:1389:31 | value | | main.rs:1387:19:1387:19 | S | -| main.rs:1391:21:1391:29 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1391:21:1391:29 | SelfParam | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1391:21:1391:29 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1391:21:1391:29 | SelfParam | TRefMut | main.rs:1387:5:1394:5 | Self [trait MyTrait] | | main.rs:1391:32:1391:36 | value | | main.rs:1387:19:1387:19 | S | | main.rs:1391:42:1393:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1392:13:1392:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1392:13:1392:16 | self | TRef | main.rs:1387:5:1394:5 | Self [trait MyTrait] | +| main.rs:1392:13:1392:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1392:13:1392:16 | self | TRefMut | main.rs:1387:5:1394:5 | Self [trait MyTrait] | | main.rs:1392:13:1392:27 | self.set(...) | | {EXTERNAL LOCATION} | () | | main.rs:1392:22:1392:26 | value | | main.rs:1387:19:1387:19 | S | -| main.rs:1398:16:1398:24 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1398:16:1398:24 | SelfParam | TRef | main.rs:1381:5:1385:5 | MyOption | -| main.rs:1398:16:1398:24 | SelfParam | TRef.T | main.rs:1396:10:1396:10 | T | +| main.rs:1398:16:1398:24 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1398:16:1398:24 | SelfParam | TRefMut | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1398:16:1398:24 | SelfParam | TRefMut.T | main.rs:1396:10:1396:10 | T | | main.rs:1398:27:1398:31 | value | | main.rs:1396:10:1396:10 | T | | main.rs:1398:37:1398:38 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1402:26:1404:9 | { ... } | | main.rs:1381:5:1385:5 | MyOption | @@ -7688,8 +7678,11 @@ inferType | main.rs:1425:26:1425:27 | x2 | | main.rs:1381:5:1385:5 | MyOption | | main.rs:1425:26:1425:27 | x2 | T | main.rs:1416:5:1417:13 | S | | main.rs:1428:17:1428:18 | x3 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1428:17:1428:18 | x3 | T | main.rs:1416:5:1417:13 | S | | main.rs:1428:22:1428:36 | ...::new(...) | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1428:22:1428:36 | ...::new(...) | T | main.rs:1416:5:1417:13 | S | | main.rs:1429:9:1429:10 | x3 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1429:9:1429:10 | x3 | T | main.rs:1416:5:1417:13 | S | | main.rs:1429:9:1429:22 | x3.call_set(...) | | {EXTERNAL LOCATION} | () | | main.rs:1429:21:1429:21 | S | | main.rs:1416:5:1417:13 | S | | main.rs:1430:18:1430:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | @@ -7697,14 +7690,15 @@ inferType | main.rs:1430:18:1430:27 | ...::_print(...) | | {EXTERNAL LOCATION} | () | | main.rs:1430:18:1430:27 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:1430:26:1430:27 | x3 | | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1430:26:1430:27 | x3 | T | main.rs:1416:5:1417:13 | S | | main.rs:1432:17:1432:18 | x4 | | main.rs:1381:5:1385:5 | MyOption | | main.rs:1432:17:1432:18 | x4 | T | main.rs:1416:5:1417:13 | S | | main.rs:1432:22:1432:36 | ...::new(...) | | main.rs:1381:5:1385:5 | MyOption | | main.rs:1432:22:1432:36 | ...::new(...) | T | main.rs:1416:5:1417:13 | S | | main.rs:1433:9:1433:33 | ...::set(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1433:23:1433:29 | &mut x4 | | {EXTERNAL LOCATION} | & | -| main.rs:1433:23:1433:29 | &mut x4 | TRef | main.rs:1381:5:1385:5 | MyOption | -| main.rs:1433:23:1433:29 | &mut x4 | TRef.T | main.rs:1416:5:1417:13 | S | +| main.rs:1433:23:1433:29 | &mut x4 | | {EXTERNAL LOCATION} | &mut | +| main.rs:1433:23:1433:29 | &mut x4 | TRefMut | main.rs:1381:5:1385:5 | MyOption | +| main.rs:1433:23:1433:29 | &mut x4 | TRefMut.T | main.rs:1416:5:1417:13 | S | | main.rs:1433:28:1433:29 | x4 | | main.rs:1381:5:1385:5 | MyOption | | main.rs:1433:28:1433:29 | x4 | T | main.rs:1416:5:1417:13 | S | | main.rs:1433:32:1433:32 | S | | main.rs:1416:5:1417:13 | S | @@ -8133,16 +8127,16 @@ inferType | main.rs:1612:16:1612:17 | &x | TRef.T | main.rs:1593:5:1593:13 | S | | main.rs:1612:17:1612:17 | x | | main.rs:1595:5:1595:26 | MyStruct | | main.rs:1612:17:1612:17 | x | T | main.rs:1593:5:1593:13 | S | -| main.rs:1623:17:1623:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1623:17:1623:25 | SelfParam | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1623:17:1623:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1623:17:1623:25 | SelfParam | TRefMut | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1623:28:1625:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1624:13:1624:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1624:13:1624:16 | self | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1624:13:1624:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1624:13:1624:16 | self | TRefMut | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1624:13:1624:21 | self.bool | | {EXTERNAL LOCATION} | bool | | main.rs:1624:13:1624:34 | ... = ... | | {EXTERNAL LOCATION} | () | | main.rs:1624:25:1624:34 | ! ... | | {EXTERNAL LOCATION} | bool | -| main.rs:1624:26:1624:29 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1624:26:1624:29 | self | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1624:26:1624:29 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1624:26:1624:29 | self | TRefMut | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1624:26:1624:34 | self.bool | | {EXTERNAL LOCATION} | bool | | main.rs:1631:15:1631:19 | SelfParam | | {EXTERNAL LOCATION} | & | | main.rs:1631:15:1631:19 | SelfParam | TRef | main.rs:1628:5:1628:13 | S | @@ -8234,8 +8228,8 @@ inferType | main.rs:1658:17:1658:20 | flag | | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1658:24:1658:41 | ...::default(...) | | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1659:9:1659:31 | ...::flip(...) | | {EXTERNAL LOCATION} | () | -| main.rs:1659:22:1659:30 | &mut flag | | {EXTERNAL LOCATION} | & | -| main.rs:1659:22:1659:30 | &mut flag | TRef | main.rs:1617:5:1620:5 | MyFlag | +| main.rs:1659:22:1659:30 | &mut flag | | {EXTERNAL LOCATION} | &mut | +| main.rs:1659:22:1659:30 | &mut flag | TRefMut | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1659:27:1659:30 | flag | | main.rs:1617:5:1620:5 | MyFlag | | main.rs:1660:18:1660:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | & | | main.rs:1660:18:1660:23 | "{:?}\\n" | TRef | {EXTERNAL LOCATION} | str | @@ -8594,8 +8588,8 @@ inferType | main.rs:1815:21:1815:22 | 42 | | {EXTERNAL LOCATION} | i32 | | main.rs:1816:13:1816:13 | p | | {EXTERNAL LOCATION} | *mut | | main.rs:1816:13:1816:13 | p | TPtrMut | {EXTERNAL LOCATION} | i32 | -| main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | & | -| main.rs:1816:27:1816:32 | &mut v | TRef | {EXTERNAL LOCATION} | i32 | +| main.rs:1816:27:1816:32 | &mut v | | {EXTERNAL LOCATION} | &mut | +| main.rs:1816:27:1816:32 | &mut v | TRefMut | {EXTERNAL LOCATION} | i32 | | main.rs:1816:32:1816:32 | v | | {EXTERNAL LOCATION} | i32 | | main.rs:1817:13:1817:13 | x | | {EXTERNAL LOCATION} | & | | main.rs:1817:13:1817:13 | x | TRef | {EXTERNAL LOCATION} | i32 | @@ -8663,18 +8657,18 @@ inferType | main.rs:1861:20:1861:33 | ... + ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1861:29:1861:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1861:29:1861:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1868:23:1868:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1868:23:1868:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1868:23:1868:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1868:23:1868:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1868:34:1868:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1868:45:1871:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1869:13:1869:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1869:13:1869:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1869:13:1869:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1869:13:1869:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1869:13:1869:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1869:13:1869:27 | ... += ... | | {EXTERNAL LOCATION} | () | | main.rs:1869:23:1869:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1869:23:1869:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1870:13:1870:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1870:13:1870:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1870:13:1870:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1870:13:1870:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1870:13:1870:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1870:13:1870:27 | ... += ... | | {EXTERNAL LOCATION} | () | | main.rs:1870:23:1870:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8693,18 +8687,18 @@ inferType | main.rs:1879:20:1879:33 | ... - ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1879:29:1879:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1879:29:1879:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1886:23:1886:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1886:23:1886:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1886:23:1886:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1886:23:1886:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1886:34:1886:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1886:45:1889:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1887:13:1887:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1887:13:1887:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1887:13:1887:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1887:13:1887:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1887:13:1887:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1887:13:1887:27 | ... -= ... | | {EXTERNAL LOCATION} | () | | main.rs:1887:23:1887:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1887:23:1887:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1888:13:1888:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1888:13:1888:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1888:13:1888:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1888:13:1888:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1888:13:1888:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1888:13:1888:27 | ... -= ... | | {EXTERNAL LOCATION} | () | | main.rs:1888:23:1888:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8723,18 +8717,18 @@ inferType | main.rs:1897:20:1897:33 | ... * ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1897:29:1897:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1897:29:1897:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1903:23:1903:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1903:23:1903:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1903:23:1903:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1903:23:1903:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1903:34:1903:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1903:45:1906:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1904:13:1904:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1904:13:1904:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1904:13:1904:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1904:13:1904:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1904:13:1904:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1904:13:1904:27 | ... *= ... | | {EXTERNAL LOCATION} | () | | main.rs:1904:23:1904:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1904:23:1904:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1905:13:1905:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1905:13:1905:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1905:13:1905:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1905:13:1905:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1905:13:1905:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1905:13:1905:27 | ... *= ... | | {EXTERNAL LOCATION} | () | | main.rs:1905:23:1905:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8753,18 +8747,18 @@ inferType | main.rs:1914:20:1914:33 | ... / ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1914:29:1914:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1914:29:1914:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1920:23:1920:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1920:23:1920:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1920:23:1920:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1920:23:1920:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1920:34:1920:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1920:45:1923:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1921:13:1921:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1921:13:1921:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1921:13:1921:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1921:13:1921:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1921:13:1921:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1921:13:1921:27 | ... /= ... | | {EXTERNAL LOCATION} | () | | main.rs:1921:23:1921:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1921:23:1921:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1922:13:1922:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1922:13:1922:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1922:13:1922:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1922:13:1922:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1922:13:1922:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1922:13:1922:27 | ... /= ... | | {EXTERNAL LOCATION} | () | | main.rs:1922:23:1922:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8783,18 +8777,18 @@ inferType | main.rs:1931:20:1931:33 | ... % ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1931:29:1931:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1931:29:1931:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1937:23:1937:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1937:23:1937:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1937:23:1937:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1937:23:1937:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1937:34:1937:36 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1937:45:1940:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1938:13:1938:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1938:13:1938:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1938:13:1938:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1938:13:1938:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1938:13:1938:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1938:13:1938:27 | ... %= ... | | {EXTERNAL LOCATION} | () | | main.rs:1938:23:1938:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1938:23:1938:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1939:13:1939:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1939:13:1939:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1939:13:1939:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1939:13:1939:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1939:13:1939:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1939:13:1939:27 | ... %= ... | | {EXTERNAL LOCATION} | () | | main.rs:1939:23:1939:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8813,18 +8807,18 @@ inferType | main.rs:1948:20:1948:33 | ... & ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1948:29:1948:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1948:29:1948:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1954:26:1954:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1954:26:1954:34 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1954:26:1954:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1954:26:1954:34 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1954:37:1954:39 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1954:48:1957:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1955:13:1955:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1955:13:1955:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1955:13:1955:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1955:13:1955:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1955:13:1955:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1955:13:1955:27 | ... &= ... | | {EXTERNAL LOCATION} | () | | main.rs:1955:23:1955:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1955:23:1955:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1956:13:1956:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1956:13:1956:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1956:13:1956:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1956:13:1956:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1956:13:1956:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1956:13:1956:27 | ... &= ... | | {EXTERNAL LOCATION} | () | | main.rs:1956:23:1956:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8843,18 +8837,18 @@ inferType | main.rs:1965:20:1965:33 | ... \| ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1965:29:1965:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1965:29:1965:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1971:25:1971:33 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1971:25:1971:33 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1971:25:1971:33 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1971:25:1971:33 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1971:36:1971:38 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1971:47:1974:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1972:13:1972:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1972:13:1972:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1972:13:1972:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1972:13:1972:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1972:13:1972:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1972:13:1972:27 | ... \|= ... | | {EXTERNAL LOCATION} | () | | main.rs:1972:23:1972:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1972:23:1972:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1973:13:1973:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1973:13:1973:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1973:13:1973:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1973:13:1973:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1973:13:1973:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1973:13:1973:27 | ... \|= ... | | {EXTERNAL LOCATION} | () | | main.rs:1973:23:1973:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8873,18 +8867,18 @@ inferType | main.rs:1982:20:1982:33 | ... ^ ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1982:29:1982:31 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1982:29:1982:33 | rhs.y | | {EXTERNAL LOCATION} | i64 | -| main.rs:1988:26:1988:34 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:1988:26:1988:34 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1988:26:1988:34 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:1988:26:1988:34 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1988:37:1988:39 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1988:48:1991:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:1989:13:1989:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1989:13:1989:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1989:13:1989:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1989:13:1989:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1989:13:1989:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:1989:13:1989:27 | ... ^= ... | | {EXTERNAL LOCATION} | () | | main.rs:1989:23:1989:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1989:23:1989:27 | rhs.x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1990:13:1990:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:1990:13:1990:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:1990:13:1990:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:1990:13:1990:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:1990:13:1990:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1990:13:1990:27 | ... ^= ... | | {EXTERNAL LOCATION} | () | | main.rs:1990:23:1990:25 | rhs | | main.rs:1843:5:1848:5 | Vec2 | @@ -8901,17 +8895,17 @@ inferType | main.rs:1999:20:1999:25 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:1999:20:1999:32 | ... << ... | | {EXTERNAL LOCATION} | i64 | | main.rs:1999:30:1999:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2005:23:2005:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2005:23:2005:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2005:23:2005:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2005:23:2005:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2005:34:2005:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2005:44:2008:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2006:13:2006:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2006:13:2006:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2006:13:2006:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2006:13:2006:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2006:13:2006:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:2006:13:2006:26 | ... <<= ... | | {EXTERNAL LOCATION} | () | | main.rs:2006:24:2006:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2007:13:2007:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2007:13:2007:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2007:13:2007:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2007:13:2007:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2007:13:2007:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2007:13:2007:26 | ... <<= ... | | {EXTERNAL LOCATION} | () | | main.rs:2007:24:2007:26 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -8927,17 +8921,17 @@ inferType | main.rs:2016:20:2016:25 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2016:20:2016:32 | ... >> ... | | {EXTERNAL LOCATION} | i64 | | main.rs:2016:30:2016:32 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2022:23:2022:31 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2022:23:2022:31 | SelfParam | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2022:23:2022:31 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2022:23:2022:31 | SelfParam | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2022:34:2022:36 | rhs | | {EXTERNAL LOCATION} | u32 | | main.rs:2022:44:2025:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2023:13:2023:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2023:13:2023:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2023:13:2023:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2023:13:2023:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2023:13:2023:18 | self.x | | {EXTERNAL LOCATION} | i64 | | main.rs:2023:13:2023:26 | ... >>= ... | | {EXTERNAL LOCATION} | () | | main.rs:2023:24:2023:26 | rhs | | {EXTERNAL LOCATION} | u32 | -| main.rs:2024:13:2024:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2024:13:2024:16 | self | TRef | main.rs:1843:5:1848:5 | Vec2 | +| main.rs:2024:13:2024:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2024:13:2024:16 | self | TRefMut | main.rs:1843:5:1848:5 | Vec2 | | main.rs:2024:13:2024:18 | self.y | | {EXTERNAL LOCATION} | i64 | | main.rs:2024:13:2024:26 | ... >>= ... | | {EXTERNAL LOCATION} | () | | main.rs:2024:24:2024:26 | rhs | | {EXTERNAL LOCATION} | u32 | @@ -9394,10 +9388,10 @@ inferType | main.rs:2236:9:2236:16 | { ... } | | {EXTERNAL LOCATION} | dyn Future | | main.rs:2236:9:2236:16 | { ... } | dyn(Output) | {EXTERNAL LOCATION} | () | | main.rs:2245:13:2245:42 | SelfParam | | {EXTERNAL LOCATION} | Pin | -| main.rs:2245:13:2245:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | & | -| main.rs:2245:13:2245:42 | SelfParam | Ptr.TRef | main.rs:2239:5:2239:14 | S2 | -| main.rs:2246:13:2246:15 | _cx | | {EXTERNAL LOCATION} | & | -| main.rs:2246:13:2246:15 | _cx | TRef | {EXTERNAL LOCATION} | Context | +| main.rs:2245:13:2245:42 | SelfParam | Ptr | {EXTERNAL LOCATION} | &mut | +| main.rs:2245:13:2245:42 | SelfParam | Ptr.TRefMut | main.rs:2239:5:2239:14 | S2 | +| main.rs:2246:13:2246:15 | _cx | | {EXTERNAL LOCATION} | &mut | +| main.rs:2246:13:2246:15 | _cx | TRefMut | {EXTERNAL LOCATION} | Context | | main.rs:2247:44:2249:9 | { ... } | | {EXTERNAL LOCATION} | Poll | | main.rs:2247:44:2249:9 | { ... } | T | main.rs:2221:5:2221:14 | S1 | | main.rs:2248:13:2248:38 | ...::Ready(...) | | {EXTERNAL LOCATION} | Poll | @@ -9575,14 +9569,14 @@ inferType | main.rs:2370:27:2370:36 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | | main.rs:2370:27:2370:36 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | | main.rs:2370:27:2370:36 | ...::new(...) | T | main.rs:2368:10:2368:10 | T | -| main.rs:2373:17:2373:25 | SelfParam | | {EXTERNAL LOCATION} | & | -| main.rs:2373:17:2373:25 | SelfParam | TRef | main.rs:2363:5:2366:5 | MyVec | -| main.rs:2373:17:2373:25 | SelfParam | TRef.T | main.rs:2368:10:2368:10 | T | +| main.rs:2373:17:2373:25 | SelfParam | | {EXTERNAL LOCATION} | &mut | +| main.rs:2373:17:2373:25 | SelfParam | TRefMut | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2373:17:2373:25 | SelfParam | TRefMut.T | main.rs:2368:10:2368:10 | T | | main.rs:2373:28:2373:32 | value | | main.rs:2368:10:2368:10 | T | | main.rs:2373:38:2375:9 | { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2374:13:2374:16 | self | | {EXTERNAL LOCATION} | & | -| main.rs:2374:13:2374:16 | self | TRef | main.rs:2363:5:2366:5 | MyVec | -| main.rs:2374:13:2374:16 | self | TRef.T | main.rs:2368:10:2368:10 | T | +| main.rs:2374:13:2374:16 | self | | {EXTERNAL LOCATION} | &mut | +| main.rs:2374:13:2374:16 | self | TRefMut | main.rs:2363:5:2366:5 | MyVec | +| main.rs:2374:13:2374:16 | self | TRefMut.T | main.rs:2368:10:2368:10 | T | | main.rs:2374:13:2374:21 | self.data | | {EXTERNAL LOCATION} | Vec | | main.rs:2374:13:2374:21 | self.data | A | {EXTERNAL LOCATION} | Global | | main.rs:2374:13:2374:21 | self.data | T | main.rs:2368:10:2368:10 | T | @@ -9966,13 +9960,13 @@ inferType | main.rs:2628:19:2628:26 | strings1 | TArray.TRef | {EXTERNAL LOCATION} | str | | main.rs:2628:28:2628:29 | { ... } | | {EXTERNAL LOCATION} | () | | main.rs:2629:9:2629:33 | for ... in ... { ... } | | {EXTERNAL LOCATION} | () | -| main.rs:2629:13:2629:13 | s | | {EXTERNAL LOCATION} | & | -| main.rs:2629:13:2629:13 | s | TRef | {EXTERNAL LOCATION} | & | -| main.rs:2629:13:2629:13 | s | TRef.TRef | {EXTERNAL LOCATION} | str | -| main.rs:2629:18:2629:30 | &mut strings1 | | {EXTERNAL LOCATION} | & | -| main.rs:2629:18:2629:30 | &mut strings1 | TRef | {EXTERNAL LOCATION} | [;] | -| main.rs:2629:18:2629:30 | &mut strings1 | TRef.TArray | {EXTERNAL LOCATION} | & | -| main.rs:2629:18:2629:30 | &mut strings1 | TRef.TArray.TRef | {EXTERNAL LOCATION} | str | +| main.rs:2629:13:2629:13 | s | | {EXTERNAL LOCATION} | &mut | +| main.rs:2629:13:2629:13 | s | TRefMut | {EXTERNAL LOCATION} | & | +| main.rs:2629:13:2629:13 | s | TRefMut.TRef | {EXTERNAL LOCATION} | str | +| main.rs:2629:18:2629:30 | &mut strings1 | | {EXTERNAL LOCATION} | &mut | +| main.rs:2629:18:2629:30 | &mut strings1 | TRefMut | {EXTERNAL LOCATION} | [;] | +| main.rs:2629:18:2629:30 | &mut strings1 | TRefMut.TArray | {EXTERNAL LOCATION} | & | +| main.rs:2629:18:2629:30 | &mut strings1 | TRefMut.TArray.TRef | {EXTERNAL LOCATION} | str | | main.rs:2629:23:2629:30 | strings1 | | {EXTERNAL LOCATION} | [;] | | main.rs:2629:23:2629:30 | strings1 | TArray | {EXTERNAL LOCATION} | & | | main.rs:2629:23:2629:30 | strings1 | TArray.TRef | {EXTERNAL LOCATION} | str | @@ -11579,26 +11573,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 | @@ -11722,11 +11716,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} | () | @@ -12942,8 +12936,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 | * ... |