diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 13b8156aaa96..5ed2894e273f 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -287,7 +287,6 @@ lib/codeql/rust/elements/internal/ImplConstructor.qll 24edccca59f70d812d1458b412 lib/codeql/rust/elements/internal/ImplTraitTypeReprConstructor.qll 1ed355e5e56f432b24b6f4778e4dc45c6e65095190cacb7a5015529e0c9d01f8 c8505185a042da4eb20a0cc32323194a0290c4bf821c7e0fce7351b194b10f31 lib/codeql/rust/elements/internal/IndexExprConstructor.qll 99bdc3d793c4dbd993860da60abe2b7c604345d645e86916462bc55a6939a5d1 3fe9d7da725956903707806aadbecac8d5b3874e8bed63c9bab54fff630e75dd lib/codeql/rust/elements/internal/InferTypeReprConstructor.qll bc5f16853401617fc9c5af8a1287a23c5921df1b615cfbe2d7c7a70145ecfcbd da93bd28ea2daade2cbb0a729be3fbf05f72bc02009565c7bb062e4f68fdb9e7 -lib/codeql/rust/elements/internal/ItemImpl.qll e3fb78d572ce1c3cc857d2671bd71ff4d7850321acfddc5f15533ff87accda79 fbabc2081e4b2773b04938d57bb51af908c80b7bc53c3127c74ab5d4fb9837bc lib/codeql/rust/elements/internal/ItemListConstructor.qll 08af3bd12536941c3dd4a43c81cc861be24325e242e2593c087a3ce632674291 2fa166159c409d2aaffa73a30babb40829a6de580bd40894d909ee6152801082 lib/codeql/rust/elements/internal/ItemListImpl.qll 195dbe93c334ad2bfc29db530bda9aaea88fc31696b2f230faae9e6c2ecb74a8 e498983a5b2f7a91e2fd336e85ac17e521a18c677784a0788d95bb283f3652e7 lib/codeql/rust/elements/internal/LabelConstructor.qll 1f814c94251e664bfa1b1a606aef995382e40e78d4f953350ec951ee0bc8bd34 3157fb8c7c6bd365a739f217ad73ba1e0b65ccd59b922e5ab034e3449915b36c diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index ff149fb36d36..bde61270e6aa 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -289,7 +289,6 @@ /lib/codeql/rust/elements/internal/ImplTraitTypeReprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/IndexExprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/InferTypeReprConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/ItemImpl.qll linguist-generated /lib/codeql/rust/elements/internal/ItemListConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/ItemListImpl.qll linguist-generated /lib/codeql/rust/elements/internal/LabelConstructor.qll linguist-generated diff --git a/rust/ql/integration-tests/hello-workspace/path-resolution.ql b/rust/ql/integration-tests/hello-workspace/path-resolution.ql index 9ec97b61eeb3..574a95531558 100644 --- a/rust/ql/integration-tests/hello-workspace/path-resolution.ql +++ b/rust/ql/integration-tests/hello-workspace/path-resolution.ql @@ -2,7 +2,7 @@ import rust import codeql.rust.internal.PathResolution import utils.test.PathResolutionInlineExpectationsTest -query predicate resolveDollarCrate(RelevantPath p, Crate c) { +query predicate resolveDollarCrate(PathExt p, Crate c) { c = resolvePath(p) and p.isDollarCrate() and p.fromSource() and diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll b/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll index 0250f1cbc435..33da4db473eb 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll @@ -1,5 +1,6 @@ private import codeql.util.Boolean private import codeql.rust.controlflow.ControlFlowGraph +private import codeql.rust.elements.internal.VariableImpl::Impl as VariableImpl private import rust newtype TCompletion = @@ -123,13 +124,7 @@ class BooleanCompletion extends ConditionalCompletion, TBooleanCompletion { */ private predicate cannotCauseMatchFailure(Pat pat) { pat instanceof RangePat or - // Identifier patterns that are in fact path patterns can cause failures. For - // instance `None`. Only if an `@ ...` part is present can we be sure that - // it's an actual identifier pattern. As a heuristic, if the identifier starts - // with a lower case letter, then we assume that it's an identifier. This - // works for code that follows the Rust naming convention for enums and - // constants. - pat = any(IdentPat p | p.hasPat() or p.getName().getText().charAt(0).isLowercase()) or + pat = any(IdentPat p | p.hasPat() or VariableImpl::variableDecl(_, p.getName(), _)) or pat instanceof WildcardPat or pat instanceof RestPat or pat instanceof RefPat or diff --git a/rust/ql/lib/codeql/rust/elements/internal/AstNodeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/AstNodeImpl.qll index 237ebfa6b413..69138190dba3 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/AstNodeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/AstNodeImpl.qll @@ -13,9 +13,9 @@ private import codeql.rust.controlflow.ControlFlowGraph */ module Impl { private import rust + private import codeql.rust.elements.internal.ElementImpl::Impl as ElementImpl private import codeql.rust.elements.internal.generated.ParentChild private import codeql.rust.controlflow.ControlFlowGraph - private import codeql.rust.elements.internal.MacroCallImpl::Impl as MacroCallImpl /** * Gets the immediate parent of a non-`AstNode` element `e`. @@ -71,21 +71,15 @@ module Impl { } /** Holds if this node is inside a macro expansion. */ - predicate isInMacroExpansion() { MacroCallImpl::isInMacroExpansion(_, this) } + predicate isInMacroExpansion() { ElementImpl::MacroExpansion::isInMacroExpansion(this) } /** * Holds if this node exists only as the result of a macro expansion. * * This is the same as `isInMacroExpansion()`, but excludes AST nodes corresponding - * to macro arguments. + * to macro arguments, including attribute macro targets. */ - pragma[nomagic] - predicate isFromMacroExpansion() { - exists(AstNode root | - MacroCallImpl::isInMacroExpansion(root, this) and - not this = root.(MacroCall).getATokenTreeNode() - ) - } + predicate isFromMacroExpansion() { ElementImpl::MacroExpansion::isFromMacroExpansion(this) } /** * Gets a control flow node for this AST node, if any. diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll index 210820fd1053..71c6cfbffc07 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll @@ -82,7 +82,7 @@ module Impl { } private predicate callHasTraitQualifier(CallExpr call, Trait qualifier) { - exists(RelevantPath qualifierPath | + exists(PathExt qualifierPath | callHasQualifier(call, _, qualifierPath) and qualifier = resolvePath(qualifierPath) and // When the qualifier is `Self` and resolves to a trait, it's inside a diff --git a/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll index 0234f7cf7302..44114674a566 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ConstImpl.qll @@ -5,6 +5,8 @@ */ private import codeql.rust.elements.internal.generated.Const +private import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl +private import codeql.rust.elements.internal.IdentPatImpl::Impl as IdentPatImpl private import codeql.rust.elements.internal.PathExprImpl::Impl as PathExprImpl private import codeql.rust.internal.PathResolution @@ -36,14 +38,30 @@ module Impl { * } * ``` */ - class ConstAccess extends PathExprImpl::PathExpr { + abstract class ConstAccess extends AstNodeImpl::AstNode { + /** Gets the constant being accessed. */ + abstract Const getConst(); + + override string getAPrimaryQlClass() { result = "ConstAccess" } + } + + private class PathExprConstAccess extends ConstAccess, PathExprImpl::PathExpr { private Const c; - ConstAccess() { c = resolvePath(this.getPath()) } + PathExprConstAccess() { c = resolvePath(this.getPath()) } - /** Gets the constant being accessed. */ - Const getConst() { result = c } + override Const getConst() { result = c } - override string getAPrimaryQlClass() { result = "ConstAccess" } + override string getAPrimaryQlClass() { result = ConstAccess.super.getAPrimaryQlClass() } + } + + private class IdentPatConstAccess extends ConstAccess, IdentPatImpl::IdentPat { + private Const c; + + IdentPatConstAccess() { c = resolvePath(this) } + + override Const getConst() { result = c } + + override string getAPrimaryQlClass() { result = ConstAccess.super.getAPrimaryQlClass() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll index 7a464a378d1e..36b4f22c20e4 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ElementImpl.qll @@ -11,7 +11,118 @@ private import codeql.rust.elements.internal.generated.Element * be referenced directly. */ module Impl { + private import rust + private import codeql.rust.elements.internal.generated.ParentChild + private import codeql.rust.elements.internal.generated.Synth + private import codeql.rust.elements.internal.generated.Raw + private import codeql.rust.elements.internal.LocationImpl + + /** + * Provides logic for classifying elements with respect to macro expansions. + */ + cached + module MacroExpansion { + /** + * Holds if `e` is superseded by an attribute macro expansion. That is, `e` is + * a transitive child of an item with an attribute macro expansion. + * + * Since this predicate is referenced in the charpred of `Element`, we need to + * use the parent-child relation on raw elements to avoid non-monotonicity. + */ + private predicate supersededByAttributeMacroExpansionRaw(Raw::Item item, Raw::Element e) { + exists(item.getAttributeMacroExpansion()) and + e = Raw::getImmediateChild(item, _) and + not e = item.getAttributeMacroExpansion() and + // Don't consider attributes themselves to be superseded. E.g., in `#[a] fn + // f() {}` the macro expansion supersedes `fn f() {}` but not `#[a]`. + not e instanceof Raw::Attr + or + exists(Raw::Element parent | + e = Raw::getImmediateChild(parent, _) and + supersededByAttributeMacroExpansionRaw(item, parent) + ) + } + + private predicate isMacroExpansion(AstNode macro, AstNode expansion) { + expansion = macro.(MacroCall).getMacroCallExpansion() + or + expansion = macro.(Adt).getDeriveMacroExpansion(_) + or + expansion = macro.(Item).getAttributeMacroExpansion() + } + + /** + * Gets the immediately enclosing macro invocation for element `e`, if any. + * + * The result is either a `MacroCall`, and `Adt` with a derive macro expansion, or + * an `Item` with an attribute macro expansion. + */ + cached + AstNode getImmediatelyEnclosingMacroInvocation(Element e) { + isMacroExpansion(result, e) + or + exists(Element mid | + result = getImmediatelyEnclosingMacroInvocation(mid) and + mid = getImmediateParent(e) and + not isMacroExpansion(mid, e) + ) + } + + pragma[nomagic] + private predicate isAttributeMacroExpansionSourceLocation(Item i, Location l) { + exists(Raw::Locatable e, @location_default loc | + supersededByAttributeMacroExpansionRaw(Synth::convertElementToRaw(i), e) and + locatable_locations(e, loc) and + l = LocationImpl::TLocationDefault(loc) + ) + } + + /** Gets an AST node whose location is inside the token tree belonging to `mc`. */ + pragma[nomagic] + private AstNode getATokenTreeNode(MacroCall mc) { + mc = getImmediatelyEnclosingMacroInvocation(result) and + mc.getTokenTree().getLocation().contains(result.getLocation()) + } + + /** Holds if `n` is inside a macro expansion. */ + cached + predicate isInMacroExpansion(AstNode n) { exists(getImmediatelyEnclosingMacroInvocation(n)) } + + /** + * Holds if `n` exists only as the result of a macro expansion. + * + * This is the same as `isInMacroExpansion(n)`, but excludes AST nodes corresponding + * to macro arguments, including attribute macro targets. + * + * Note: This predicate is a heuristic based on location information and may not be + * accurate in all cases. + */ + cached + predicate isFromMacroExpansion(AstNode n) { + exists(AstNode macro | + macro = getImmediatelyEnclosingMacroInvocation(n) and + not n = getATokenTreeNode(macro) and + not isAttributeMacroExpansionSourceLocation(macro, n.getLocation()) + ) + or + isFromMacroExpansion(getImmediatelyEnclosingMacroInvocation(n)) + } + + cached + predicate isRelevantElement(Generated::Element e) { + exists(Raw::Element raw | + raw = Synth::convertElementToRaw(e) and + not supersededByAttributeMacroExpansionRaw(_, raw) + ) + or + // Synthetic elements are relevant when their parents are + Synth::convertFormatArgsExprToRaw(_) = Synth::getSynthParent(e) + } + } + class Element extends Generated::Element { + Element() { MacroExpansion::isRelevantElement(this) } + override string toStringImpl() { result = this.getAPrimaryQlClass() } /** diff --git a/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll index f211708bc812..46e554e4b420 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ItemImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `Item`. * @@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.Item * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * An item such as a function, struct, enum, etc. * @@ -23,4 +23,10 @@ module Impl { * ``` */ class Item extends Generated::Item { } + + private class ItemWithAttributeMacroExpansion extends Item { + ItemWithAttributeMacroExpansion() { this.hasAttributeMacroExpansion() } + + override string toStringImpl() { result = "(item with attribute macro expansion)" } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LocatableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LocatableImpl.qll index fcb5289e0493..78a9e7f38eca 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LocatableImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LocatableImpl.qll @@ -5,6 +5,7 @@ */ import codeql.Locations +private import codeql.rust.elements.internal.ElementImpl::Impl as ElementImpl private import codeql.rust.elements.internal.LocationImpl private import codeql.rust.elements.internal.generated.Locatable private import codeql.rust.elements.internal.generated.Synth @@ -50,21 +51,12 @@ module Impl { locatable_locations(Synth::convertLocatableToRaw(l), result) } - private MacroCall getImmediatelyEnclosingMacroCall(AstNode n) { - result = n.getParentNode() - or - exists(AstNode mid | - result = getImmediatelyEnclosingMacroCall(mid) and - n.getParentNode() = mid and - not mid instanceof MacroCall - ) - } - /** Gets the non-synthesized location of `l`, if any. */ LocationImpl::LocationDefault getLocationDefault(Locatable l) { result = LocationImpl::TLocationDefault(getDbLocation(l)) or not exists(getDbLocation(l)) and - result = getLocationDefault(getImmediatelyEnclosingMacroCall(l)) + result = + getLocationDefault(ElementImpl::MacroExpansion::getImmediatelyEnclosingMacroInvocation(l)) } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll index 17cc47d803f8..8e048517f63c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll @@ -14,17 +14,6 @@ module Impl { private import rust private import codeql.rust.internal.PathResolution - pragma[nomagic] - predicate isInMacroExpansion(AstNode root, AstNode n) { - n = root.(MacroCall).getMacroCallExpansion() - or - n = root.(Adt).getDeriveMacroExpansion(_) - or - n = root.(Item).getAttributeMacroExpansion() - or - isInMacroExpansion(root, n.getParentNode()) - } - // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A macro invocation. @@ -35,16 +24,7 @@ module Impl { * ``` */ class MacroCall extends Generated::MacroCall { - override string toStringImpl() { - if this.hasPath() then result = this.getPath().toAbbreviatedString() + "!..." else result = "" - } - - /** Gets an AST node whose location is inside the token tree belonging to this macro call. */ - pragma[nomagic] - AstNode getATokenTreeNode() { - isInMacroExpansion(this, result) and - this.getTokenTree().getLocation().contains(result.getLocation()) - } + override string toStringImpl() { result = this.getPath().toAbbreviatedString() + "!..." } /** * Gets the macro definition that this macro call resolves to. diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll index 652dc68b3c9c..3be4d22b796a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll @@ -4,6 +4,7 @@ * INTERNAL: Do not use. */ +private import rust private import codeql.rust.elements.internal.generated.PathExpr /** @@ -25,5 +26,10 @@ module Impl { override string toStringImpl() { result = this.toAbbreviatedString() } override string toAbbreviatedString() { result = this.getPath().toStringImpl() } + + override string getAPrimaryQlClass() { + result = super.getAPrimaryQlClass() and + not this instanceof VariableAccess + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll index 61f022c8bfda..97e2f23f9a93 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll @@ -1,6 +1,8 @@ private import rust private import codeql.rust.controlflow.ControlFlowGraph +private import codeql.rust.internal.PathResolution as PathResolution private import codeql.rust.elements.internal.generated.ParentChild as ParentChild +private import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl private import codeql.rust.elements.internal.PathImpl::Impl as PathImpl private import codeql.rust.elements.internal.PathExprBaseImpl::Impl as PathExprBaseImpl private import codeql.rust.elements.internal.FormatTemplateVariableAccessImpl::Impl as FormatTemplateVariableAccessImpl @@ -98,7 +100,7 @@ module Impl { * pattern. */ cached - private predicate variableDecl(AstNode definingNode, Name name, string text) { + predicate variableDecl(AstNode definingNode, Name name, string text) { Cached::ref() and exists(SelfParam sp | name = sp.getName() and @@ -117,11 +119,7 @@ module Impl { not exists(getOutermostEnclosingOrPat(pat)) and definingNode = name ) and text = name.getText() and - // exclude for now anything starting with an uppercase character, which may be a reference to - // an enum constant (e.g. `None`). This excludes static and constant variables (UPPERCASE), - // which we don't appear to recognize yet anyway. This also assumes programmers follow the - // naming guidelines, which they generally do, but they're not enforced. - not text.charAt(0).isUppercase() and + not PathResolution::identPatIsResolvable(pat) and // exclude parameters from functions without a body as these are trait method declarations // without implementations not exists(Function f | not f.hasBody() and f.getAParam().getPat() = pat) and diff --git a/rust/ql/lib/codeql/rust/internal/Definitions.qll b/rust/ql/lib/codeql/rust/internal/Definitions.qll index b1b3e475c468..60520a77cbf5 100644 --- a/rust/ql/lib/codeql/rust/internal/Definitions.qll +++ b/rust/ql/lib/codeql/rust/internal/Definitions.qll @@ -37,6 +37,9 @@ private module Cached { TFormatArgsArgIndex(Expr e) { e = any(FormatArgsArg a).getExpr() } or TItemNode(ItemNode i) + pragma[nomagic] + private predicate isMacroCallLocation(Location loc) { loc = any(MacroCall m).getLocation() } + /** * Gets an element, of kind `kind`, that element `use` uses, if any. */ @@ -44,7 +47,7 @@ private module Cached { Definition definitionOf(Use use, string kind) { result = use.getDefinition() and kind = use.getUseType() and - not result.getLocation() = any(MacroCall m).getLocation() + not isMacroCallLocation(result.getLocation()) } } diff --git a/rust/ql/lib/codeql/rust/internal/PathResolution.qll b/rust/ql/lib/codeql/rust/internal/PathResolution.qll index fc49b7ca5e82..c2b3e9c8e5cf 100644 --- a/rust/ql/lib/codeql/rust/internal/PathResolution.qll +++ b/rust/ql/lib/codeql/rust/internal/PathResolution.qll @@ -4,6 +4,7 @@ private import rust private import codeql.rust.elements.internal.generated.ParentChild +private import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl private import codeql.rust.elements.internal.CallExprImpl::Impl as CallExprImpl private import codeql.rust.internal.CachedStages private import codeql.rust.frameworks.stdlib.Builtins as Builtins @@ -90,24 +91,6 @@ private module UseOption = Option; private class UseOption = UseOption::Option; -/** - * Holds if `n` is superseded by an attribute macro expansion. That is, `n` is - * an item or a transitive child of an item with an attribute macro expansion. - */ -predicate supersededByAttributeMacroExpansion(AstNode n) { - n.(Item).hasAttributeMacroExpansion() - or - exists(AstNode parent | - n.getParentNode() = parent and - supersededByAttributeMacroExpansion(parent) and - // Don't exclude expansions themselves as they supercede other nodes. - not n = parent.(Item).getAttributeMacroExpansion() and - // Don't consider attributes themselves to be superseded. E.g., in `#[a] fn - // f() {}` the macro expansion supercedes `fn f() {}` but not `#[a]`. - not n instanceof Attr - ) -} - /** * An item that may be referred to by a path, and which is a node in * the _item graph_. @@ -186,10 +169,7 @@ predicate supersededByAttributeMacroExpansion(AstNode n) { * - https://doc.rust-lang.org/reference/names/namespaces.html */ abstract class ItemNode extends Locatable { - ItemNode() { - // Exclude items that are superseded by the expansion of an attribute macro. - not supersededByAttributeMacroExpansion(this) - } + ItemNode() { not this.(Item).hasAttributeMacroExpansion() } /** Gets the (original) name of this item. */ abstract string getName(); @@ -205,7 +185,7 @@ abstract class ItemNode extends Locatable { pragma[nomagic] final Attr getAttr(string name) { result = this.getAnAttr() and - result.getMeta().getPath().(RelevantPath).isUnqualified(name) + result.getMeta().getPath().(PathExt).isUnqualified(name) } final predicate hasAttr(string name) { exists(this.getAttr(name)) } @@ -1457,6 +1437,24 @@ private predicate crateDependencyEdge(SourceFileItemNode file, string name, Crat not hasDeclOrDep(file, name) } +/** + * Gets a `UseTree` that is nested under `tree`, and which needs to be resolved + * relative to the path of `tree`. + * + * `tree` is restricted to either having a path or being a direct child of some + * `use` statement without a path. + */ +private UseTree getAUseTreeUseTree(UseTree tree) { + result = tree.getUseTreeList().getAUseTree() and + (if tree.hasPath() then any() else tree = any(Use u).getUseTree()) + or + exists(UseTree mid | + mid = getAUseTreeUseTree(tree) and + not mid.hasPath() and + result = mid.getUseTreeList().getAUseTree() + ) +} + private predicate useTreeDeclares(UseTree tree, string name) { not tree.isGlob() and not exists(tree.getUseTreeList()) and @@ -1470,7 +1468,7 @@ private predicate useTreeDeclares(UseTree tree, string name) { or exists(UseTree mid | useTreeDeclares(mid, name) and - mid = tree.getUseTreeList().getAUseTree() + mid = getAUseTreeUseTree(tree) ) } @@ -1503,17 +1501,22 @@ private predicate declares(ItemNode item, Namespace ns, string name) { ) } -/** A path that does not access a local variable. */ -class RelevantPath extends Path { - RelevantPath() { not this = any(VariableAccess va).(PathExpr).getPath() } +/** + * A `Path` or an `IdentPat`. + * + * `IdentPat`s are included in order to resolve unqualified references to + * constructors in patterns. + */ +abstract class PathExt extends AstNode { + abstract string getText(); /** Holds if this is an unqualified path with the textual value `name`. */ pragma[nomagic] - predicate isUnqualified(string name) { - not exists(this.getQualifier()) and - not this = any(UseTreeList list).getAUseTree().getPath().getQualifier*() and - name = this.getText() - } + abstract predicate isUnqualified(string name); + + abstract Path getQualifier(); + + abstract string toStringDebug(); /** * Holds if this is an unqualified path with the textual value `name` and @@ -1535,6 +1538,33 @@ class RelevantPath extends Path { predicate isDollarCrate() { this.isUnqualified("$crate", _) } } +private class PathExtPath extends PathExt instanceof Path { + override string getText() { result = Path.super.getText() } + + override predicate isUnqualified(string name) { + not exists(Path.super.getQualifier()) and + not exists(UseTree tree | + tree.hasPath() and + this = getAUseTreeUseTree(tree).getPath().getQualifier*() + ) and + name = Path.super.getText() + } + + override Path getQualifier() { result = Path.super.getQualifier() } + + override string toStringDebug() { result = Path.super.toStringDebug() } +} + +private class PathExtIdentPat extends PathExt, IdentPat { + override string getText() { result = this.getName().getText() } + + override predicate isUnqualified(string name) { name = this.getText() } + + override Path getQualifier() { none() } + + override string toStringDebug() { result = this.getText() } +} + private predicate isModule(ItemNode m) { m instanceof Module } /** Holds if source file `source` contains the module `m`. */ @@ -1558,7 +1588,7 @@ private ItemNode getOuterScope(ItemNode i) { pragma[nomagic] private predicate unqualifiedPathLookup(ItemNode ancestor, string name, Namespace ns, ItemNode encl) { // lookup in the immediately enclosing item - exists(RelevantPath path | + exists(PathExt path | path.isUnqualified(name, encl) and ancestor = encl and not name = ["crate", "$crate", "super", "self"] @@ -1594,7 +1624,7 @@ private ItemNode getASuccessor( private predicate isSourceFile(ItemNode source) { source instanceof SourceFileItemNode } -private predicate hasCratePath(ItemNode i) { any(RelevantPath path).isCratePath(_, i) } +private predicate hasCratePath(ItemNode i) { any(PathExt path).isCratePath(_, i) } private predicate hasChild(ItemNode parent, ItemNode child) { child.getImmediateParent() = parent } @@ -1606,7 +1636,7 @@ private predicate sourceFileHasCratePathTc(ItemNode i1, ItemNode i2) = * `name` may be looked up inside `ancestor`. */ pragma[nomagic] -private predicate keywordLookup(ItemNode ancestor, string name, RelevantPath p) { +private predicate keywordLookup(ItemNode ancestor, string name, PathExt p) { // For `crate`, jump directly to the root module exists(ItemNode i | p.isCratePath(name, i) | ancestor instanceof SourceFile and @@ -1620,7 +1650,7 @@ private predicate keywordLookup(ItemNode ancestor, string name, RelevantPath p) } pragma[nomagic] -private ItemNode unqualifiedPathLookup(RelevantPath p, Namespace ns, SuccessorKind kind) { +private ItemNode unqualifiedPathLookup(PathExt p, Namespace ns, SuccessorKind kind) { exists(ItemNode ancestor, string name | result = getASuccessor(ancestor, pragma[only_bind_into](name), ns, kind, _) and kind.isInternalOrBoth() @@ -1635,7 +1665,7 @@ private ItemNode unqualifiedPathLookup(RelevantPath p, Namespace ns, SuccessorKi } pragma[nomagic] -private predicate isUnqualifiedSelfPath(RelevantPath path) { path.isUnqualified("Self") } +private predicate isUnqualifiedSelfPath(PathExt path) { path.isUnqualified("Self") } /** Provides the input to `TraitIsVisible`. */ signature predicate relevantTraitVisibleSig(Element element, Trait trait); @@ -1718,14 +1748,14 @@ private module DollarCrateResolution { isDollarCrateSupportedMacroExpansion(_, expansion) } - private predicate isDollarCratePath(RelevantPath p) { p.isDollarCrate() } + private predicate isDollarCratePath(PathExt p) { p.isDollarCrate() } - private predicate isInDollarCrateMacroExpansion(RelevantPath p, AstNode expansion) = + private predicate isInDollarCrateMacroExpansion(PathExt p, AstNode expansion) = doublyBoundedFastTC(hasParent/2, isDollarCratePath/1, isDollarCrateSupportedMacroExpansion/1)(p, expansion) pragma[nomagic] - private predicate isInDollarCrateMacroExpansionFromFile(File macroDefFile, RelevantPath p) { + private predicate isInDollarCrateMacroExpansionFromFile(File macroDefFile, PathExt p) { exists(Path macroDefPath, AstNode expansion | isDollarCrateSupportedMacroExpansion(macroDefPath, expansion) and isInDollarCrateMacroExpansion(p, expansion) and @@ -1740,17 +1770,17 @@ private module DollarCrateResolution { * calls. */ pragma[nomagic] - predicate resolveDollarCrate(RelevantPath p, CrateItemNode crate) { + predicate resolveDollarCrate(PathExt p, CrateItemNode crate) { isInDollarCrateMacroExpansionFromFile(crate.getASourceFile().getFile(), p) } } pragma[nomagic] -private ItemNode resolvePathCand0(RelevantPath path, Namespace ns) { +private ItemNode resolvePathCand0(PathExt path, Namespace ns) { exists(ItemNode res | res = unqualifiedPathLookup(path, ns, _) and if - not any(RelevantPath parent).getQualifier() = path and + not any(PathExt parent).getQualifier() = path and isUnqualifiedSelfPath(path) and res instanceof ImplItemNode then result = res.(ImplItemNodeImpl).resolveSelfTyCand() @@ -1767,7 +1797,7 @@ private ItemNode resolvePathCand0(RelevantPath path, Namespace ns) { } pragma[nomagic] -private ItemNode resolvePathCandQualifier(RelevantPath qualifier, RelevantPath path, string name) { +private ItemNode resolvePathCandQualifier(PathExt qualifier, PathExt path, string name) { qualifier = path.getQualifier() and result = resolvePathCand(qualifier) and name = path.getText() @@ -1815,9 +1845,7 @@ private predicate checkQualifiedVisibility( * qualifier of `path` and `qualifier` resolves to `q`, if any. */ pragma[nomagic] -private ItemNode resolvePathCandQualified( - RelevantPath qualifier, ItemNode q, RelevantPath path, Namespace ns -) { +private ItemNode resolvePathCandQualified(PathExt qualifier, ItemNode q, PathExt path, Namespace ns) { exists(string name, SuccessorKind kind, UseOption useOpt | q = resolvePathCandQualifier(qualifier, path, name) and result = getASuccessor(q, name, ns, kind, useOpt) and @@ -1826,12 +1854,14 @@ private ItemNode resolvePathCandQualified( } /** Holds if path `p` must be looked up in namespace `n`. */ -private predicate pathUsesNamespace(Path p, Namespace n) { +private predicate pathUsesNamespace(PathExt p, Namespace n) { n.isValue() and ( p = any(PathExpr pe).getPath() or p = any(TupleStructPat tsp).getPath() + or + p instanceof PathExtIdentPat ) or n.isType() and @@ -1907,7 +1937,7 @@ private predicate macroUseEdge( * result in non-monotonic recursion. */ pragma[nomagic] -private ItemNode resolvePathCand(RelevantPath path) { +private ItemNode resolvePathCand(PathExt path) { exists(Namespace ns | result = resolvePathCand0(path, ns) and if path = any(ImplItemNode i).getSelfPath() @@ -1920,7 +1950,13 @@ private ItemNode resolvePathCand(RelevantPath path) { else if path = any(PathTypeRepr p).getPath() then result instanceof TypeItemNode - else any() + else + if path instanceof IdentPat + then + result instanceof VariantItemNode or + result instanceof StructItemNode or + result instanceof ConstItemNode + else any() | pathUsesNamespace(path, ns) or @@ -1937,7 +1973,7 @@ private ItemNode resolvePathCand(RelevantPath path) { } /** Get a trait that should be visible when `path` resolves to `node`, if any. */ -private Trait getResolvePathTraitUsed(RelevantPath path, AssocItemNode node) { +private Trait getResolvePathTraitUsed(PathExt path, AssocItemNode node) { exists(TypeItemNode type, ImplItemNodeImpl impl | node = resolvePathCandQualified(_, type, path, _) and typeImplEdge(type, impl, _, _, node, _) and @@ -1949,9 +1985,8 @@ private predicate pathTraitUsed(Element path, Trait trait) { trait = getResolvePathTraitUsed(path, _) } -/** Gets the item that `path` resolves to, if any. */ cached -ItemNode resolvePath(RelevantPath path) { +private ItemNode resolvePath0(PathExt path) { result = resolvePathCand(path) and not path = any(Path parent | exists(resolvePathCand(parent))).getQualifier() and ( @@ -1964,33 +1999,44 @@ ItemNode resolvePath(RelevantPath path) { or // if `path` is the qualifier of a resolvable `parent`, then we should // resolve `path` to something consistent with what `parent` resolves to - exists(RelevantPath parent | - resolvePathCandQualified(path, result, parent, _) = resolvePath(parent) - ) + exists(PathExt parent | resolvePathCandQualified(path, result, parent, _) = resolvePath0(parent)) } -private predicate isUseTreeSubPath(UseTree tree, RelevantPath path) { +/** + * Holds if `ip` resolves to some constructor. + */ +// use `forceLocal` once we implement overlay support +predicate identPatIsResolvable(IdentPat ip) { exists(resolvePath0(ip)) } + +/** Gets the item that `path` resolves to, if any. */ +pragma[nomagic] +ItemNode resolvePath(PathExt path) { + result = resolvePath0(path) and + not path = any(VariableAccess va).(PathExpr).getPath() +} + +private predicate isUseTreeSubPath(UseTree tree, PathExt path) { path = tree.getPath() or - exists(RelevantPath mid | + exists(PathExt mid | isUseTreeSubPath(tree, mid) and path = mid.getQualifier() ) } pragma[nomagic] -private predicate isUseTreeSubPathUnqualified(UseTree tree, RelevantPath path, string name) { +private predicate isUseTreeSubPathUnqualified(UseTree tree, PathExt path, string name) { isUseTreeSubPath(tree, path) and not exists(path.getQualifier()) and name = path.getText() } pragma[nomagic] -private ItemNode resolveUseTreeListItem(Use use, UseTree tree, RelevantPath path, SuccessorKind kind) { +private ItemNode resolveUseTreeListItem(Use use, UseTree tree, PathExt path, SuccessorKind kind) { exists(UseOption useOpt | checkQualifiedVisibility(use, result, kind, useOpt) | exists(UseTree midTree, ItemNode mid, string name | mid = resolveUseTreeListItem(use, midTree) and - tree = midTree.getUseTreeList().getAUseTree() and + tree = getAUseTreeUseTree(midTree) and isUseTreeSubPathUnqualified(tree, path, pragma[only_bind_into](name)) and result = mid.getASuccessor(pragma[only_bind_into](name), kind, useOpt) ) @@ -2003,21 +2049,36 @@ private ItemNode resolveUseTreeListItem(Use use, UseTree tree, RelevantPath path } pragma[nomagic] -private ItemNode resolveUseTreeListItemQualifier( - Use use, UseTree tree, RelevantPath path, string name -) { +private ItemNode resolveUseTreeListItemQualifier(Use use, UseTree tree, PathExt path, string name) { result = resolveUseTreeListItem(use, tree, path.getQualifier(), _) and name = path.getText() } +private UseTree getAUseUseTree(Use use) { + exists(UseTree root | root = use.getUseTree() | + result = root + or + not root.hasPath() and + result = getAUseTreeUseTree(root) + ) +} + pragma[nomagic] private ItemNode resolveUseTreeListItem(Use use, UseTree tree) { exists(Path path | path = tree.getPath() | - tree = use.getUseTree() and + tree = getAUseUseTree(use) and result = resolvePathCand(path) or result = resolveUseTreeListItem(use, tree, path, _) ) + or + exists(UseTree midTree | + // `use foo::{bar, *}`; midTree = `foo` and tree = `*` + result = resolveUseTreeListItem(use, midTree) and + tree = getAUseTreeUseTree(midTree) and + tree.isGlob() and + not tree.hasPath() + ) } /** Holds if `use` imports `item` as `name`. */ @@ -2142,7 +2203,7 @@ private module Debug { } predicate debugUnqualifiedPathLookup( - RelevantPath p, string name, Namespace ns, ItemNode ancestor, string path + PathExt p, string name, Namespace ns, ItemNode ancestor, string path ) { p = getRelevantLocatable() and exists(ItemNode encl | @@ -2152,13 +2213,28 @@ private module Debug { path = p.toStringDebug() } + ItemNode debugUnqualifiedPathLookup(PathExt p, Namespace ns, SuccessorKind kind) { + p = getRelevantLocatable() and + result = unqualifiedPathLookup(p, ns, kind) + } + predicate debugItemNode(ItemNode item) { item = getRelevantLocatable() } - ItemNode debugResolvePath(RelevantPath path) { + ItemNode debugResolvePath(PathExt path) { path = getRelevantLocatable() and result = resolvePath(path) } + ItemNode debugResolveUseTreeListItem(Use use, UseTree tree, PathExt path, SuccessorKind kind) { + use = getRelevantLocatable() and + result = resolveUseTreeListItem(use, tree, path, kind) + } + + ItemNode debugResolveUseTreeListItem(Use use, UseTree tree) { + use = getRelevantLocatable() and + result = resolveUseTreeListItem(use, tree) + } + predicate debugUseImportEdge(Use use, string name, ItemNode item, SuccessorKind kind) { use = getRelevantLocatable() and useImportEdge(use, name, item, kind) diff --git a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll index f7606b941ace..d8b2703203dc 100644 --- a/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll +++ b/rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll @@ -10,9 +10,8 @@ private import utils.test.InlineExpectationsTest private module ResolveTest implements TestSig { string getARelevantTag() { result = "item" } - private predicate itemAt(ItemNode i, string filepath, int line, boolean inMacro) { - i.getLocation().hasLocationInfo(filepath, _, _, line, _) and - if i.(AstNode).isInMacroExpansion() then inMacro = true else inMacro = false + private predicate itemAt(ItemNode i, string filepath, int line) { + i.getLocation().hasLocationInfo(filepath, _, _, line, _) } private predicate commmentAt(string text, string filepath, int line) { @@ -25,7 +24,7 @@ private module ResolveTest implements TestSig { } private predicate item(ItemNode i, string value) { - exists(string filepath, int line, boolean inMacro | itemAt(i, filepath, line, inMacro) | + exists(string filepath, int line | itemAt(i, filepath, line) | if i instanceof SourceFile then value = i.getFile().getBaseName() else ( diff --git a/rust/ql/src/queries/unusedentities/UnreachableCode.ql b/rust/ql/src/queries/unusedentities/UnreachableCode.ql index 15a45c6f4b58..bb9092fb5703 100644 --- a/rust/ql/src/queries/unusedentities/UnreachableCode.ql +++ b/rust/ql/src/queries/unusedentities/UnreachableCode.ql @@ -33,7 +33,7 @@ predicate hiddenNode(AstNode n) { n instanceof ControlFlowGraphImpl::PostOrderTree and // location is counter-intuitive not n instanceof MacroExpr or - n.isInMacroExpansion() + n.isFromMacroExpansion() } /** diff --git a/rust/ql/src/queries/unusedentities/UnusedValue.ql b/rust/ql/src/queries/unusedentities/UnusedValue.ql index 14204a2273b7..07e80b00b45a 100644 --- a/rust/ql/src/queries/unusedentities/UnusedValue.ql +++ b/rust/ql/src/queries/unusedentities/UnusedValue.ql @@ -18,7 +18,7 @@ from AstNode write, Ssa::Variable v where variableWrite(_, write, v) and not v instanceof DiscardVariable and - not write.isInMacroExpansion() and + not write.isFromMacroExpansion() and not isAllowableUnused(v) and // SSA definitions are only created for live writes not write = any(Ssa::WriteDefinition def).getWriteAccess().getAstNode() and diff --git a/rust/ql/src/queries/unusedentities/UnusedVariable.qll b/rust/ql/src/queries/unusedentities/UnusedVariable.qll index ad75415634c6..c0684636e77b 100644 --- a/rust/ql/src/queries/unusedentities/UnusedVariable.qll +++ b/rust/ql/src/queries/unusedentities/UnusedVariable.qll @@ -36,7 +36,7 @@ class IncompleteCallable extends Callable { */ predicate isAllowableUnused(Variable v) { // in a macro expansion - v.getPat().isInMacroExpansion() + v.getPat().isInMacroExpansion() // TODO: replace with `isFromMacroExpansion()` when false positives have been removed or // declared in an incomplete callable v.getEnclosingCfgScope() instanceof IncompleteCallable diff --git a/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected index ffff0f53e7e5..5174e0bd6186 100644 --- a/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected +++ b/rust/ql/test/extractor-tests/macro-expansion/PrintAst.expected @@ -174,7 +174,7 @@ macro_expansion.rs: # 1| getPath(): [Path] MyTrait # 1| getSegment(): [PathSegment] MyTrait # 1| getIdentifier(): [NameRef] MyTrait -# 3| getItem(1): [Function] fn foo +# 3| getItem(1): [Function] (item with attribute macro expansion) # 4| getAttributeMacroExpansion(): [MacroItems] MacroItems # 4| getItem(0): [Function] fn foo # 4| getParamList(): [ParamList] ParamList @@ -190,7 +190,7 @@ macro_expansion.rs: # 5| getIdentifier(): [NameRef] concat # 5| getTokenTree(): [TokenTree] TokenTree # 5| getMacroCallExpansion(): [StringLiteralExpr] "Hello world!" -# 7| getStatement(1): [Function] fn inner +# 7| getStatement(1): [Function] (item with attribute macro expansion) # 8| getAttributeMacroExpansion(): [MacroItems] MacroItems # 8| getItem(0): [Function] fn inner_0 # 8| getParamList(): [ParamList] ParamList @@ -202,16 +202,12 @@ macro_expansion.rs: # 8| getFunctionBody(): [BlockExpr] { ... } # 8| getStmtList(): [StmtList] StmtList # 8| getName(): [Name] inner_1 -# 8| getParamList(): [ParamList] ParamList # 7| getAttr(0): [Attr] Attr # 7| getMeta(): [Meta] Meta # 7| getPath(): [Path] repeat # 7| getSegment(): [PathSegment] repeat # 7| getIdentifier(): [NameRef] repeat # 7| getTokenTree(): [TokenTree] TokenTree -# 8| getFunctionBody(): [BlockExpr] { ... } -# 8| getStmtList(): [StmtList] StmtList -# 8| getName(): [Name] inner # 10| getStatement(2): [ExprStmt] ExprStmt # 10| getExpr(): [CallExpr] inner_0(...) # 10| getArgList(): [ArgList] ArgList @@ -242,7 +238,7 @@ macro_expansion.rs: # 5| getIdentifier(): [NameRef] concat # 5| getTokenTree(): [TokenTree] TokenTree # 5| getMacroCallExpansion(): [StringLiteralExpr] "Hello world!" -# 7| getStatement(1): [Function] fn inner +# 7| getStatement(1): [Function] (item with attribute macro expansion) # 8| getAttributeMacroExpansion(): [MacroItems] MacroItems # 8| getItem(0): [Function] fn inner_0 # 8| getParamList(): [ParamList] ParamList @@ -254,16 +250,12 @@ macro_expansion.rs: # 8| getFunctionBody(): [BlockExpr] { ... } # 8| getStmtList(): [StmtList] StmtList # 8| getName(): [Name] inner_1 -# 8| getParamList(): [ParamList] ParamList # 7| getAttr(0): [Attr] Attr # 7| getMeta(): [Meta] Meta # 7| getPath(): [Path] repeat # 7| getSegment(): [PathSegment] repeat # 7| getIdentifier(): [NameRef] repeat # 7| getTokenTree(): [TokenTree] TokenTree -# 8| getFunctionBody(): [BlockExpr] { ... } -# 8| getStmtList(): [StmtList] StmtList -# 8| getName(): [Name] inner # 10| getStatement(2): [ExprStmt] ExprStmt # 10| getExpr(): [CallExpr] inner_0(...) # 10| getArgList(): [ArgList] ArgList @@ -280,53 +272,14 @@ macro_expansion.rs: # 11| getIdentifier(): [NameRef] inner_1 # 4| getName(): [Name] foo_new # 4| getVisibility(): [Visibility] Visibility -# 4| getParamList(): [ParamList] ParamList # 3| getAttr(0): [Attr] Attr # 3| getMeta(): [Meta] Meta # 3| getPath(): [Path] add_one # 3| getSegment(): [PathSegment] add_one # 3| getIdentifier(): [NameRef] add_one -# 4| getFunctionBody(): [BlockExpr] { ... } -# 4| getStmtList(): [StmtList] StmtList -# 5| getStatement(0): [ExprStmt] ExprStmt -# 5| getExpr(): [AssignmentExpr] ... = ... -# 5| getLhs(): [UnderscoreExpr] _ -# 5| getRhs(): [MacroExpr] MacroExpr -# 5| getMacroCall(): [MacroCall] concat!... -# 5| getPath(): [Path] concat -# 5| getSegment(): [PathSegment] concat -# 5| getIdentifier(): [NameRef] concat -# 5| getTokenTree(): [TokenTree] TokenTree -# 7| getStatement(1): [Function] fn inner -# 8| getParamList(): [ParamList] ParamList -# 7| getAttr(0): [Attr] Attr -# 7| getMeta(): [Meta] Meta -# 7| getPath(): [Path] repeat -# 7| getSegment(): [PathSegment] repeat -# 7| getIdentifier(): [NameRef] repeat -# 7| getTokenTree(): [TokenTree] TokenTree -# 8| getFunctionBody(): [BlockExpr] { ... } -# 8| getStmtList(): [StmtList] StmtList -# 8| getName(): [Name] inner -# 10| getStatement(2): [ExprStmt] ExprStmt -# 10| getExpr(): [CallExpr] inner_0(...) -# 10| getArgList(): [ArgList] ArgList -# 10| getFunction(): [PathExpr] inner_0 -# 10| getPath(): [Path] inner_0 -# 10| getSegment(): [PathSegment] inner_0 -# 10| getIdentifier(): [NameRef] inner_0 -# 11| getStatement(3): [ExprStmt] ExprStmt -# 11| getExpr(): [CallExpr] inner_1(...) -# 11| getArgList(): [ArgList] ArgList -# 11| getFunction(): [PathExpr] inner_1 -# 11| getPath(): [Path] inner_1 -# 11| getSegment(): [PathSegment] inner_1 -# 11| getIdentifier(): [NameRef] inner_1 -# 4| getName(): [Name] foo -# 4| getVisibility(): [Visibility] Visibility -# 14| getItem(2): [Function] fn bar +# 14| getItem(2): [Function] (item with attribute macro expansion) # 15| getAttributeMacroExpansion(): [MacroItems] MacroItems -# 15| getItem(0): [Function] fn bar_0 +# 15| getItem(0): [Function] (item with attribute macro expansion) # 16| getAttributeMacroExpansion(): [MacroItems] MacroItems # 16| getItem(0): [Function] fn bar_0 # 16| getParamList(): [ParamList] ParamList @@ -340,17 +293,12 @@ macro_expansion.rs: # 16| getStmtList(): [StmtList] StmtList # 16| getName(): [Name] bar_0_new # 16| getVisibility(): [Visibility] Visibility -# 16| getParamList(): [ParamList] ParamList # 15| getAttr(0): [Attr] Attr # 15| getMeta(): [Meta] Meta # 15| getPath(): [Path] add_one # 15| getSegment(): [PathSegment] add_one # 15| getIdentifier(): [NameRef] add_one -# 16| getFunctionBody(): [BlockExpr] { ... } -# 16| getStmtList(): [StmtList] StmtList -# 16| getName(): [Name] bar_0 -# 16| getVisibility(): [Visibility] Visibility -# 15| getItem(1): [Function] fn bar_1 +# 15| getItem(1): [Function] (item with attribute macro expansion) # 16| getAttributeMacroExpansion(): [MacroItems] MacroItems # 16| getItem(0): [Function] fn bar_1 # 16| getParamList(): [ParamList] ParamList @@ -364,17 +312,11 @@ macro_expansion.rs: # 16| getStmtList(): [StmtList] StmtList # 16| getName(): [Name] bar_1_new # 16| getVisibility(): [Visibility] Visibility -# 16| getParamList(): [ParamList] ParamList # 15| getAttr(0): [Attr] Attr # 15| getMeta(): [Meta] Meta # 15| getPath(): [Path] add_one # 15| getSegment(): [PathSegment] add_one # 15| getIdentifier(): [NameRef] add_one -# 16| getFunctionBody(): [BlockExpr] { ... } -# 16| getStmtList(): [StmtList] StmtList -# 16| getName(): [Name] bar_1 -# 16| getVisibility(): [Visibility] Visibility -# 16| getParamList(): [ParamList] ParamList # 14| getAttr(0): [Attr] Attr # 14| getMeta(): [Meta] Meta # 14| getPath(): [Path] repeat @@ -386,22 +328,13 @@ macro_expansion.rs: # 15| getPath(): [Path] add_one # 15| getSegment(): [PathSegment] add_one # 15| getIdentifier(): [NameRef] add_one -# 16| getFunctionBody(): [BlockExpr] { ... } -# 16| getStmtList(): [StmtList] StmtList -# 16| getName(): [Name] bar -# 16| getVisibility(): [Visibility] Visibility -# 18| getItem(3): [Function] fn baz +# 18| getItem(3): [Function] (item with attribute macro expansion) # 18| getAttributeMacroExpansion(): [MacroItems] MacroItems -# 19| getParamList(): [ParamList] ParamList # 18| getAttr(0): [Attr] Attr # 18| getMeta(): [Meta] Meta # 18| getPath(): [Path] erase # 18| getSegment(): [PathSegment] erase # 18| getIdentifier(): [NameRef] erase -# 19| getFunctionBody(): [BlockExpr] { ... } -# 19| getStmtList(): [StmtList] StmtList -# 19| getName(): [Name] baz -# 19| getVisibility(): [Visibility] Visibility # 22| getItem(4): [MacroRules] MacroRules # 22| getName(): [Name] hello # 22| getTokenTree(): [TokenTree] TokenTree @@ -410,7 +343,7 @@ macro_expansion.rs: # 28| getVisibility(): [Visibility] Visibility # 30| getItem(6): [Impl] impl S { ... } # 30| getAssocItemList(): [AssocItemList] AssocItemList -# 31| getAssocItem(0): [Function] fn bzz +# 31| getAssocItem(0): [Function] (item with attribute macro expansion) # 32| getAttributeMacroExpansion(): [MacroItems] MacroItems # 32| getItem(0): [Function] fn bzz_0 # 32| getParamList(): [ParamList] ParamList @@ -556,24 +489,12 @@ macro_expansion.rs: # 31| getIdentifier(): [NameRef] _print # 32| getName(): [Name] bzz_2 # 32| getVisibility(): [Visibility] Visibility -# 32| getParamList(): [ParamList] ParamList # 31| getAttr(0): [Attr] Attr # 31| getMeta(): [Meta] Meta # 31| getPath(): [Path] repeat # 31| getSegment(): [PathSegment] repeat # 31| getIdentifier(): [NameRef] repeat # 31| getTokenTree(): [TokenTree] TokenTree -# 32| getFunctionBody(): [BlockExpr] { ... } -# 32| getStmtList(): [StmtList] StmtList -# 33| getStatement(0): [ExprStmt] ExprStmt -# 33| getExpr(): [MacroExpr] MacroExpr -# 33| getMacroCall(): [MacroCall] hello!... -# 33| getPath(): [Path] hello -# 33| getSegment(): [PathSegment] hello -# 33| getIdentifier(): [NameRef] hello -# 33| getTokenTree(): [TokenTree] TokenTree -# 32| getName(): [Name] bzz -# 32| getVisibility(): [Visibility] Visibility # 30| getSelfTy(): [PathTypeRepr] S # 30| getPath(): [Path] S # 30| getSegment(): [PathSegment] S @@ -739,7 +660,7 @@ macro_expansion.rs: # 71| getSegment(): [PathSegment] i32 # 71| getIdentifier(): [NameRef] i32 # 72| getTailExpr(): [CastExpr] a as ... -# 72| getExpr(): [PathExpr,VariableAccess] a +# 72| getExpr(): [VariableAccess] a # 72| getPath(): [Path] a # 72| getSegment(): [PathSegment] a # 72| getIdentifier(): [NameRef] a @@ -817,7 +738,7 @@ macro_expansion.rs: # 84| getFunctionBody(): [BlockExpr] { ... } # 84| getStmtList(): [StmtList] StmtList # 84| getTailExpr(): [MatchExpr] match self { ... } -# 83| getScrutinee(): [PathExpr,VariableAccess] self +# 83| getScrutinee(): [VariableAccess] self # 83| getPath(): [Path] self # 83| getSegment(): [PathSegment] self # 83| getIdentifier(): [NameRef] self @@ -830,7 +751,7 @@ macro_expansion.rs: # 85| getArgList(): [ArgList] ArgList # 83| getArg(0): [StringLiteralExpr] "field" # 85| getArg(1): [RefExpr] &field -# 85| getExpr(): [PathExpr,VariableAccess] field +# 85| getExpr(): [VariableAccess] field # 85| getPath(): [Path] field # 85| getSegment(): [PathSegment] field # 85| getIdentifier(): [NameRef] field @@ -839,7 +760,7 @@ macro_expansion.rs: # 83| getArgList(): [ArgList] ArgList # 83| getArg(0): [StringLiteralExpr] "MyDerive" # 83| getIdentifier(): [NameRef] debug_struct -# 83| getReceiver(): [PathExpr,VariableAccess] f +# 83| getReceiver(): [VariableAccess] f # 83| getPath(): [Path] f # 83| getSegment(): [PathSegment] f # 83| getIdentifier(): [NameRef] f @@ -915,11 +836,11 @@ macro_expansion.rs: # 89| getStmtList(): [StmtList] StmtList # 89| getTailExpr(): [MatchExpr] match ... { ... } # 88| getScrutinee(): [TupleExpr] TupleExpr -# 88| getField(0): [PathExpr,VariableAccess] self +# 88| getField(0): [VariableAccess] self # 88| getPath(): [Path] self # 88| getSegment(): [PathSegment] self # 88| getIdentifier(): [NameRef] self -# 88| getField(1): [PathExpr,VariableAccess] other +# 88| getField(1): [VariableAccess] other # 88| getPath(): [Path] other # 88| getSegment(): [PathSegment] other # 88| getIdentifier(): [NameRef] other @@ -1155,7 +1076,7 @@ proc_macro.rs: # 6| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 6| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 6| getArgList(): [ArgList] ArgList -# 6| getArg(0): [PathExpr,VariableAccess] attr +# 6| getArg(0): [VariableAccess] attr # 6| getPath(): [Path] attr # 6| getSegment(): [PathSegment] attr # 6| getIdentifier(): [NameRef] attr @@ -1177,7 +1098,7 @@ proc_macro.rs: # 6| getIdentifier(): [NameRef] parse # 6| getMatchArmList(): [MatchArmList] MatchArmList # 6| getArm(0): [MatchArm] ... => data -# 6| getExpr(): [PathExpr,VariableAccess] data +# 6| getExpr(): [VariableAccess] data # 6| getPath(): [Path] data # 6| getSegment(): [PathSegment] data # 6| getIdentifier(): [NameRef] data @@ -1203,7 +1124,7 @@ proc_macro.rs: # 6| getArg(0): [MethodCallExpr] err.to_compile_error() # 6| getArgList(): [ArgList] ArgList # 6| getIdentifier(): [NameRef] to_compile_error -# 6| getReceiver(): [PathExpr,VariableAccess] err +# 6| getReceiver(): [VariableAccess] err # 6| getPath(): [Path] err # 6| getSegment(): [PathSegment] err # 6| getIdentifier(): [NameRef] err @@ -1247,7 +1168,7 @@ proc_macro.rs: # 7| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 7| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 7| getArgList(): [ArgList] ArgList -# 7| getArg(0): [PathExpr,VariableAccess] item +# 7| getArg(0): [VariableAccess] item # 7| getPath(): [Path] item # 7| getSegment(): [PathSegment] item # 7| getIdentifier(): [NameRef] item @@ -1269,7 +1190,7 @@ proc_macro.rs: # 7| getIdentifier(): [NameRef] parse # 7| getMatchArmList(): [MatchArmList] MatchArmList # 7| getArm(0): [MatchArm] ... => data -# 7| getExpr(): [PathExpr,VariableAccess] data +# 7| getExpr(): [VariableAccess] data # 7| getPath(): [Path] data # 7| getSegment(): [PathSegment] data # 7| getIdentifier(): [NameRef] data @@ -1295,7 +1216,7 @@ proc_macro.rs: # 7| getArg(0): [MethodCallExpr] err.to_compile_error() # 7| getArgList(): [ArgList] ArgList # 7| getIdentifier(): [NameRef] to_compile_error -# 7| getReceiver(): [PathExpr,VariableAccess] err +# 7| getReceiver(): [VariableAccess] err # 7| getPath(): [Path] err # 7| getSegment(): [PathSegment] err # 7| getIdentifier(): [NameRef] err @@ -1352,7 +1273,7 @@ proc_macro.rs: # 10| getInitializer(): [MethodCallExpr] ast.clone() # 10| getArgList(): [ArgList] ArgList # 10| getIdentifier(): [NameRef] clone -# 10| getReceiver(): [PathExpr,VariableAccess] ast +# 10| getReceiver(): [VariableAccess] ast # 10| getPath(): [Path] ast # 10| getSegment(): [PathSegment] ast # 10| getIdentifier(): [NameRef] ast @@ -1362,7 +1283,7 @@ proc_macro.rs: # 11| getExpr(): [AssignmentExpr] ... = ... # 11| getLhs(): [FieldExpr] ... .ident # 11| getContainer(): [FieldExpr] new_ast.sig -# 11| getContainer(): [PathExpr,VariableAccess] new_ast +# 11| getContainer(): [VariableAccess] new_ast # 11| getPath(): [Path] new_ast # 11| getSegment(): [PathSegment] new_ast # 11| getIdentifier(): [NameRef] new_ast @@ -1399,14 +1320,14 @@ proc_macro.rs: # 11| getArg(0): [FormatArgsArg] FormatArgsArg # 11| getExpr(): [FieldExpr] ... .ident # 11| getContainer(): [FieldExpr] ast.sig -# 11| getContainer(): [PathExpr,VariableAccess] ast +# 11| getContainer(): [VariableAccess] ast # 11| getPath(): [Path] ast # 11| getSegment(): [PathSegment] ast # 11| getIdentifier(): [NameRef] ast # 11| getIdentifier(): [NameRef] sig # 11| getIdentifier(): [NameRef] ident # 11| getArg(1): [FormatArgsArg] FormatArgsArg -# 11| getExpr(): [PathExpr,VariableAccess] i +# 11| getExpr(): [VariableAccess] i # 11| getPath(): [Path] i # 11| getSegment(): [PathSegment] i # 11| getIdentifier(): [NameRef] i @@ -1438,7 +1359,7 @@ proc_macro.rs: # 11| getIdentifier(): [NameRef] span # 11| getReceiver(): [FieldExpr] ... .ident # 11| getContainer(): [FieldExpr] ast.sig -# 11| getContainer(): [PathExpr,VariableAccess] ast +# 11| getContainer(): [VariableAccess] ast # 11| getPath(): [Path] ast # 11| getSegment(): [PathSegment] ast # 11| getIdentifier(): [NameRef] ast @@ -1454,14 +1375,14 @@ proc_macro.rs: # 11| getIdentifier(): [NameRef] Ident # 11| getSegment(): [PathSegment] new # 11| getIdentifier(): [NameRef] new -# 12| getTailExpr(): [PathExpr,VariableAccess] new_ast +# 12| getTailExpr(): [VariableAccess] new_ast # 12| getPath(): [Path] new_ast # 12| getSegment(): [PathSegment] new_ast # 12| getIdentifier(): [NameRef] new_ast # 9| getIdentifier(): [NameRef] map # 8| getReceiver(): [ParenExpr] (...) # 8| getExpr(): [RangeExpr] 0..number -# 8| getEnd(): [PathExpr,VariableAccess] number +# 8| getEnd(): [VariableAccess] number # 8| getPath(): [Path] number # 8| getSegment(): [PathSegment] number # 8| getIdentifier(): [NameRef] number @@ -1693,7 +1614,7 @@ proc_macro.rs: # 16| getInitializer(): [MethodCallExpr] items.quote_into_iter() # 15| getArgList(): [ArgList] ArgList # 15| getIdentifier(): [NameRef] quote_into_iter -# 16| getReceiver(): [PathExpr,VariableAccess] items +# 16| getReceiver(): [VariableAccess] items # 16| getPath(): [Path] items # 16| getSegment(): [PathSegment] items # 16| getIdentifier(): [NameRef] items @@ -1704,11 +1625,11 @@ proc_macro.rs: # 15| getName(): [Name] i # 15| getStatement(1): [LetStmt] let ... = ... # 15| getInitializer(): [BinaryExpr] ... | ... -# 15| getLhs(): [PathExpr,VariableAccess] has_iter +# 15| getLhs(): [VariableAccess] has_iter # 15| getPath(): [Path] has_iter # 15| getSegment(): [PathSegment] has_iter # 15| getIdentifier(): [NameRef] has_iter -# 15| getRhs(): [PathExpr,VariableAccess] i +# 15| getRhs(): [VariableAccess] i # 15| getPath(): [Path] i # 15| getSegment(): [PathSegment] i # 15| getIdentifier(): [NameRef] i @@ -1725,7 +1646,7 @@ proc_macro.rs: # 16| getTokenTree(): [TokenTree] TokenTree # 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr # 15| getStatement(3): [LetStmt] let _ = has_iter -# 15| getInitializer(): [PathExpr,VariableAccess] has_iter +# 15| getInitializer(): [VariableAccess] has_iter # 15| getPath(): [Path] has_iter # 15| getSegment(): [PathSegment] has_iter # 15| getIdentifier(): [NameRef] has_iter @@ -1843,7 +1764,7 @@ proc_macro.rs: # 16| getScrutinee(): [MethodCallExpr] items.next() # 15| getArgList(): [ArgList] ArgList # 15| getIdentifier(): [NameRef] next -# 16| getReceiver(): [PathExpr,VariableAccess] items +# 16| getReceiver(): [VariableAccess] items # 16| getPath(): [Path] items # 16| getSegment(): [PathSegment] items # 16| getIdentifier(): [NameRef] items @@ -1851,7 +1772,7 @@ proc_macro.rs: # 15| getArm(0): [MatchArm] ... => ... # 15| getExpr(): [CallExpr] ...::RepInterp(...) # 15| getArgList(): [ArgList] ArgList -# 15| getArg(0): [PathExpr] _x +# 15| getArg(0): [VariableAccess] _x # 15| getPath(): [Path] _x # 15| getSegment(): [PathSegment] _x # 15| getIdentifier(): [NameRef] _x @@ -1955,12 +1876,12 @@ proc_macro.rs: # 16| getExpr(): [CallExpr] ...::to_tokens(...) # 16| getArgList(): [ArgList] ArgList # 16| getArg(0): [RefExpr] &items -# 16| getExpr(): [PathExpr,VariableAccess] items +# 16| getExpr(): [VariableAccess] items # 16| getPath(): [Path] items # 16| getSegment(): [PathSegment] items # 16| getIdentifier(): [NameRef] items # 15| getArg(1): [RefExpr] &mut _s -# 15| getExpr(): [PathExpr] _s +# 15| getExpr(): [VariableAccess] _s # 15| getPath(): [Path] _s # 15| getSegment(): [PathSegment] _s # 15| getIdentifier(): [NameRef] _s @@ -2072,7 +1993,7 @@ proc_macro.rs: # 15| getIdentifier(): [NameRef] quote_token_with_context # 16| getTokenTree(): [TokenTree] TokenTree # 15| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 15| getTailExpr(): [PathExpr] _s +# 15| getTailExpr(): [VariableAccess] _s # 15| getPath(): [Path] _s # 15| getSegment(): [PathSegment] _s # 15| getIdentifier(): [NameRef] _s @@ -2119,7 +2040,7 @@ proc_macro.rs: # 22| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 22| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 22| getArgList(): [ArgList] ArgList -# 22| getArg(0): [PathExpr,VariableAccess] item +# 22| getArg(0): [VariableAccess] item # 22| getPath(): [Path] item # 22| getSegment(): [PathSegment] item # 22| getIdentifier(): [NameRef] item @@ -2141,7 +2062,7 @@ proc_macro.rs: # 22| getIdentifier(): [NameRef] parse # 22| getMatchArmList(): [MatchArmList] MatchArmList # 22| getArm(0): [MatchArm] ... => data -# 22| getExpr(): [PathExpr,VariableAccess] data +# 22| getExpr(): [VariableAccess] data # 22| getPath(): [Path] data # 22| getSegment(): [PathSegment] data # 22| getIdentifier(): [NameRef] data @@ -2167,7 +2088,7 @@ proc_macro.rs: # 22| getArg(0): [MethodCallExpr] err.to_compile_error() # 22| getArgList(): [ArgList] ArgList # 22| getIdentifier(): [NameRef] to_compile_error -# 22| getReceiver(): [PathExpr,VariableAccess] err +# 22| getReceiver(): [VariableAccess] err # 22| getPath(): [Path] err # 22| getSegment(): [PathSegment] err # 22| getIdentifier(): [NameRef] err @@ -2202,7 +2123,7 @@ proc_macro.rs: # 23| getInitializer(): [MethodCallExpr] ast.clone() # 23| getArgList(): [ArgList] ArgList # 23| getIdentifier(): [NameRef] clone -# 23| getReceiver(): [PathExpr,VariableAccess] ast +# 23| getReceiver(): [VariableAccess] ast # 23| getPath(): [Path] ast # 23| getSegment(): [PathSegment] ast # 23| getIdentifier(): [NameRef] ast @@ -2212,7 +2133,7 @@ proc_macro.rs: # 24| getExpr(): [AssignmentExpr] ... = ... # 24| getLhs(): [FieldExpr] ... .ident # 24| getContainer(): [FieldExpr] new_ast.sig -# 24| getContainer(): [PathExpr,VariableAccess] new_ast +# 24| getContainer(): [VariableAccess] new_ast # 24| getPath(): [Path] new_ast # 24| getSegment(): [PathSegment] new_ast # 24| getIdentifier(): [NameRef] new_ast @@ -2249,7 +2170,7 @@ proc_macro.rs: # 24| getArg(0): [FormatArgsArg] FormatArgsArg # 24| getExpr(): [FieldExpr] ... .ident # 24| getContainer(): [FieldExpr] ast.sig -# 24| getContainer(): [PathExpr,VariableAccess] ast +# 24| getContainer(): [VariableAccess] ast # 24| getPath(): [Path] ast # 24| getSegment(): [PathSegment] ast # 24| getIdentifier(): [NameRef] ast @@ -2282,7 +2203,7 @@ proc_macro.rs: # 24| getIdentifier(): [NameRef] span # 24| getReceiver(): [FieldExpr] ... .ident # 24| getContainer(): [FieldExpr] ast.sig -# 24| getContainer(): [PathExpr,VariableAccess] ast +# 24| getContainer(): [VariableAccess] ast # 24| getPath(): [Path] ast # 24| getSegment(): [PathSegment] ast # 24| getIdentifier(): [NameRef] ast @@ -2396,12 +2317,12 @@ proc_macro.rs: # 26| getExpr(): [CallExpr] ...::to_tokens(...) # 26| getArgList(): [ArgList] ArgList # 26| getArg(0): [RefExpr] &ast -# 26| getExpr(): [PathExpr,VariableAccess] ast +# 26| getExpr(): [VariableAccess] ast # 26| getPath(): [Path] ast # 26| getSegment(): [PathSegment] ast # 26| getIdentifier(): [NameRef] ast # 25| getArg(1): [RefExpr] &mut _s -# 25| getExpr(): [PathExpr] _s +# 25| getExpr(): [VariableAccess] _s # 25| getPath(): [Path] _s # 25| getSegment(): [PathSegment] _s # 25| getIdentifier(): [NameRef] _s @@ -2441,12 +2362,12 @@ proc_macro.rs: # 27| getExpr(): [CallExpr] ...::to_tokens(...) # 27| getArgList(): [ArgList] ArgList # 27| getArg(0): [RefExpr] &new_ast -# 27| getExpr(): [PathExpr,VariableAccess] new_ast +# 27| getExpr(): [VariableAccess] new_ast # 27| getPath(): [Path] new_ast # 27| getSegment(): [PathSegment] new_ast # 27| getIdentifier(): [NameRef] new_ast # 25| getArg(1): [RefExpr] &mut _s -# 25| getExpr(): [PathExpr] _s +# 25| getExpr(): [VariableAccess] _s # 25| getPath(): [Path] _s # 25| getSegment(): [PathSegment] _s # 25| getIdentifier(): [NameRef] _s @@ -2503,7 +2424,7 @@ proc_macro.rs: # 25| getIdentifier(): [NameRef] quote_token_with_context # 27| getTokenTree(): [TokenTree] TokenTree # 25| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 25| getTailExpr(): [PathExpr] _s +# 25| getTailExpr(): [VariableAccess] _s # 25| getPath(): [Path] _s # 25| getSegment(): [PathSegment] _s # 25| getIdentifier(): [NameRef] _s @@ -2583,7 +2504,7 @@ proc_macro.rs: # 38| getMacroCallExpansion(): [MatchExpr] match ... { ... } # 38| getScrutinee(): [CallExpr] ...::parse::<...>(...) # 38| getArgList(): [ArgList] ArgList -# 38| getArg(0): [PathExpr,VariableAccess] input +# 38| getArg(0): [VariableAccess] input # 38| getPath(): [Path] input # 38| getSegment(): [PathSegment] input # 38| getIdentifier(): [NameRef] input @@ -2605,7 +2526,7 @@ proc_macro.rs: # 38| getIdentifier(): [NameRef] parse # 38| getMatchArmList(): [MatchArmList] MatchArmList # 38| getArm(0): [MatchArm] ... => data -# 38| getExpr(): [PathExpr,VariableAccess] data +# 38| getExpr(): [VariableAccess] data # 38| getPath(): [Path] data # 38| getSegment(): [PathSegment] data # 38| getIdentifier(): [NameRef] data @@ -2631,7 +2552,7 @@ proc_macro.rs: # 38| getArg(0): [MethodCallExpr] err.to_compile_error() # 38| getArgList(): [ArgList] ArgList # 38| getIdentifier(): [NameRef] to_compile_error -# 38| getReceiver(): [PathExpr,VariableAccess] err +# 38| getReceiver(): [VariableAccess] err # 38| getPath(): [Path] err # 38| getSegment(): [PathSegment] err # 38| getIdentifier(): [NameRef] err @@ -2665,7 +2586,7 @@ proc_macro.rs: # 39| getStatement(1): [LetStmt] let ... = ... # 39| getInitializer(): [RefExpr] &... # 39| getExpr(): [FieldExpr] ast.ident -# 39| getContainer(): [PathExpr,VariableAccess] ast +# 39| getContainer(): [VariableAccess] ast # 39| getPath(): [Path] ast # 39| getSegment(): [PathSegment] ast # 39| getIdentifier(): [NameRef] ast @@ -2702,7 +2623,7 @@ proc_macro.rs: # 40| getTokenTree(): [TokenTree] TokenTree # 40| getMacroCallExpansion(): [FormatArgsExpr] FormatArgsExpr # 40| getArg(0): [FormatArgsArg] FormatArgsArg -# 40| getExpr(): [PathExpr,VariableAccess] name +# 40| getExpr(): [VariableAccess] name # 40| getPath(): [Path] name # 40| getSegment(): [PathSegment] name # 40| getIdentifier(): [NameRef] name @@ -2731,7 +2652,7 @@ proc_macro.rs: # 40| getArg(1): [MethodCallExpr] name.span() # 40| getArgList(): [ArgList] ArgList # 40| getIdentifier(): [NameRef] span -# 40| getReceiver(): [PathExpr,VariableAccess] name +# 40| getReceiver(): [VariableAccess] name # 40| getPath(): [Path] name # 40| getSegment(): [PathSegment] name # 40| getIdentifier(): [NameRef] name @@ -2855,7 +2776,7 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::push_ident(...) # 42| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2891,12 +2812,12 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::to_tokens(...) # 42| getArgList(): [ArgList] ArgList # 42| getArg(0): [RefExpr] &const_ident -# 42| getExpr(): [PathExpr,VariableAccess] const_ident +# 42| getExpr(): [VariableAccess] const_ident # 42| getPath(): [Path] const_ident # 42| getSegment(): [PathSegment] const_ident # 42| getIdentifier(): [NameRef] const_ident # 41| getArg(1): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2946,7 +2867,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_colon(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -2985,7 +2906,7 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::push_ident(...) # 42| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3031,7 +2952,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_eq(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3070,7 +2991,7 @@ proc_macro.rs: # 42| getExpr(): [CallExpr] ...::parse(...) # 42| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3116,7 +3037,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_semi(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3155,7 +3076,7 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::push_ident(...) # 44| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3201,7 +3122,7 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::push_ident(...) # 44| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3247,7 +3168,7 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::push_ident(...) # 44| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3283,12 +3204,12 @@ proc_macro.rs: # 44| getExpr(): [CallExpr] ...::to_tokens(...) # 44| getArgList(): [ArgList] ArgList # 44| getArg(0): [RefExpr] &name -# 44| getExpr(): [PathExpr,VariableAccess] name +# 44| getExpr(): [VariableAccess] name # 44| getPath(): [Path] name # 44| getSegment(): [PathSegment] name # 44| getIdentifier(): [NameRef] name # 41| getArg(1): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3338,7 +3259,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_group(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3463,7 +3384,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_ident(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3509,7 +3430,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_ident(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3555,7 +3476,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_group(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3631,7 +3552,7 @@ proc_macro.rs: # 41| getExpr(): [CallExpr] ...::push_rarrow(...) # 41| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3670,7 +3591,7 @@ proc_macro.rs: # 45| getExpr(): [CallExpr] ...::push_ident(...) # 45| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3716,7 +3637,7 @@ proc_macro.rs: # 46| getExpr(): [CallExpr] ...::push_group(...) # 46| getArgList(): [ArgList] ArgList # 41| getArg(0): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3766,12 +3687,12 @@ proc_macro.rs: # 46| getExpr(): [CallExpr] ...::to_tokens(...) # 46| getArgList(): [ArgList] ArgList # 46| getArg(0): [RefExpr] &const_ident -# 46| getExpr(): [PathExpr,VariableAccess] const_ident +# 46| getExpr(): [VariableAccess] const_ident # 46| getPath(): [Path] const_ident # 46| getSegment(): [PathSegment] const_ident # 46| getIdentifier(): [NameRef] const_ident # 41| getArg(1): [RefExpr] &mut _s -# 41| getExpr(): [PathExpr] _s +# 41| getExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3785,7 +3706,7 @@ proc_macro.rs: # 41| getIdentifier(): [NameRef] ToTokens # 41| getSegment(): [PathSegment] to_tokens # 41| getIdentifier(): [NameRef] to_tokens -# 41| getTailExpr(): [PathExpr] _s +# 41| getTailExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3831,7 +3752,7 @@ proc_macro.rs: # 41| getIdentifier(): [NameRef] quote_token_with_context # 45| getTokenTree(): [TokenTree] TokenTree # 41| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 41| getTailExpr(): [PathExpr] _s +# 41| getTailExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s @@ -3877,7 +3798,7 @@ proc_macro.rs: # 41| getIdentifier(): [NameRef] quote_token_with_context # 44| getTokenTree(): [TokenTree] TokenTree # 41| getMacroCallExpansion(): [MacroBlockExpr] MacroBlockExpr -# 41| getTailExpr(): [PathExpr] _s +# 41| getTailExpr(): [VariableAccess] _s # 41| getPath(): [Path] _s # 41| getSegment(): [PathSegment] _s # 41| getIdentifier(): [NameRef] _s diff --git a/rust/ql/test/extractor-tests/macro-expansion/test.expected b/rust/ql/test/extractor-tests/macro-expansion/test.expected index 930a0f443bd8..5abff30113bc 100644 --- a/rust/ql/test/extractor-tests/macro-expansion/test.expected +++ b/rust/ql/test/extractor-tests/macro-expansion/test.expected @@ -1,19 +1,19 @@ attribute_macros -| macro_expansion.rs:3:1:12:1 | fn foo | 0 | macro_expansion.rs:4:1:12:1 | fn foo | -| macro_expansion.rs:3:1:12:1 | fn foo | 1 | macro_expansion.rs:4:1:12:1 | fn foo_new | -| macro_expansion.rs:7:5:8:17 | fn inner | 0 | macro_expansion.rs:8:5:8:17 | fn inner_0 | -| macro_expansion.rs:7:5:8:17 | fn inner | 0 | macro_expansion.rs:8:5:8:17 | fn inner_0 | -| macro_expansion.rs:7:5:8:17 | fn inner | 1 | macro_expansion.rs:8:5:8:17 | fn inner_1 | -| macro_expansion.rs:7:5:8:17 | fn inner | 1 | macro_expansion.rs:8:5:8:17 | fn inner_1 | -| macro_expansion.rs:14:1:16:15 | fn bar | 0 | macro_expansion.rs:15:1:16:15 | fn bar_0 | -| macro_expansion.rs:14:1:16:15 | fn bar | 1 | macro_expansion.rs:15:1:16:15 | fn bar_1 | -| macro_expansion.rs:15:1:16:15 | fn bar_0 | 0 | macro_expansion.rs:16:1:16:15 | fn bar_0 | -| macro_expansion.rs:15:1:16:15 | fn bar_0 | 1 | macro_expansion.rs:16:1:16:15 | fn bar_0_new | -| macro_expansion.rs:15:1:16:15 | fn bar_1 | 0 | macro_expansion.rs:16:1:16:15 | fn bar_1 | -| macro_expansion.rs:15:1:16:15 | fn bar_1 | 1 | macro_expansion.rs:16:1:16:15 | fn bar_1_new | -| macro_expansion.rs:31:5:34:5 | fn bzz | 0 | macro_expansion.rs:32:5:34:5 | fn bzz_0 | -| macro_expansion.rs:31:5:34:5 | fn bzz | 1 | macro_expansion.rs:32:5:34:5 | fn bzz_1 | -| macro_expansion.rs:31:5:34:5 | fn bzz | 2 | macro_expansion.rs:32:5:34:5 | fn bzz_2 | +| macro_expansion.rs:3:1:12:1 | (item with attribute macro expansion) | 0 | macro_expansion.rs:4:1:12:1 | fn foo | +| macro_expansion.rs:3:1:12:1 | (item with attribute macro expansion) | 1 | macro_expansion.rs:4:1:12:1 | fn foo_new | +| macro_expansion.rs:7:5:8:17 | (item with attribute macro expansion) | 0 | macro_expansion.rs:8:5:8:17 | fn inner_0 | +| macro_expansion.rs:7:5:8:17 | (item with attribute macro expansion) | 0 | macro_expansion.rs:8:5:8:17 | fn inner_0 | +| macro_expansion.rs:7:5:8:17 | (item with attribute macro expansion) | 1 | macro_expansion.rs:8:5:8:17 | fn inner_1 | +| macro_expansion.rs:7:5:8:17 | (item with attribute macro expansion) | 1 | macro_expansion.rs:8:5:8:17 | fn inner_1 | +| macro_expansion.rs:14:1:16:15 | (item with attribute macro expansion) | 0 | macro_expansion.rs:15:1:16:15 | (item with attribute macro expansion) | +| macro_expansion.rs:14:1:16:15 | (item with attribute macro expansion) | 1 | macro_expansion.rs:15:1:16:15 | (item with attribute macro expansion) | +| macro_expansion.rs:15:1:16:15 | (item with attribute macro expansion) | 0 | macro_expansion.rs:16:1:16:15 | fn bar_0 | +| macro_expansion.rs:15:1:16:15 | (item with attribute macro expansion) | 0 | macro_expansion.rs:16:1:16:15 | fn bar_1 | +| macro_expansion.rs:15:1:16:15 | (item with attribute macro expansion) | 1 | macro_expansion.rs:16:1:16:15 | fn bar_0_new | +| macro_expansion.rs:15:1:16:15 | (item with attribute macro expansion) | 1 | macro_expansion.rs:16:1:16:15 | fn bar_1_new | +| macro_expansion.rs:31:5:34:5 | (item with attribute macro expansion) | 0 | macro_expansion.rs:32:5:34:5 | fn bzz_0 | +| macro_expansion.rs:31:5:34:5 | (item with attribute macro expansion) | 1 | macro_expansion.rs:32:5:34:5 | fn bzz_1 | +| macro_expansion.rs:31:5:34:5 | (item with attribute macro expansion) | 2 | macro_expansion.rs:32:5:34:5 | fn bzz_2 | derive_macros | macro_expansion.rs:83:1:86:1 | struct MyDerive | 0 | 0 | macro_expansion.rs:84:8:85:9 | impl ...::Debug for MyDerive::<...> { ... } | | macro_expansion.rs:88:1:92:1 | enum MyDeriveEnum | 0 | 0 | macro_expansion.rs:89:6:91:12 | impl ...::PartialEq for MyDeriveEnum::<...> { ... } | @@ -46,8 +46,6 @@ macro_calls | macro_expansion.rs:79:12:79:20 | my_int!... | macro_expansion.rs:79:12:79:18 | i32 | unexpanded_macro_calls | included/included.rs:2:9:2:39 | concat!... | -| macro_expansion.rs:5:9:5:35 | concat!... | -| macro_expansion.rs:33:9:33:16 | hello!... | | macro_expansion.rs:56:9:56:31 | concat!... | | macro_expansion.rs:63:9:63:32 | include_str!... | warnings diff --git a/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected b/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected index b88537912102..30dbc24103b9 100644 --- a/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected +++ b/rust/ql/test/extractor-tests/macro-in-library/PrintAst.expected @@ -5,7 +5,7 @@ lib.rs: # 1| getVisibility(): [Visibility] Visibility macro_in_library.rs: # 1| [SourceFile] SourceFile -# 1| getItem(0): [MacroCall] +# 1| getItem(0): [MacroCall] (item with attribute macro expansion) # 2| getAttributeMacroExpansion(): [MacroItems] MacroItems # 2| getItem(0): [Function] fn foo # 2| getParamList(): [ParamList] ParamList 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 352992bf4f2d..ca5c386b720c 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 @@ -7,4 +7,3 @@ multipleCallTargets | 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(...) | -| test.rs:519:50:519:66 | ...::from(...) | diff --git a/rust/ql/test/library-tests/dataflow/sources/net/TaintSources.expected b/rust/ql/test/library-tests/dataflow/sources/net/TaintSources.expected index 190628f93d7d..bfe1ce0e56bc 100644 --- a/rust/ql/test/library-tests/dataflow/sources/net/TaintSources.expected +++ b/rust/ql/test/library-tests/dataflow/sources/net/TaintSources.expected @@ -15,4 +15,3 @@ | test.rs:332:22:332:50 | ...::new | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:373:19:373:36 | ...::connect | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:519:16:519:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). | -| test.rs:519:16:519:29 | ...::args | Flow source 'CommandLineArgs' of type commandargs (DEFAULT). | diff --git a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected index e128916f8473..24a0cf78aec0 100644 --- a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected +++ b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected @@ -12,20 +12,12 @@ models | 11 | Summary: ::as_str; Argument[self]; ReturnValue; value | edges | test.rs:11:31:11:31 | a | test.rs:13:14:13:14 | a | provenance | | -| test.rs:11:31:11:31 | a | test.rs:13:14:13:14 | a | provenance | | -| test.rs:11:31:11:31 | a | test.rs:13:14:13:23 | a.as_str() | provenance | MaD:11 | | test.rs:11:31:11:31 | a | test.rs:13:14:13:23 | a.as_str() | provenance | MaD:11 | | test.rs:11:31:11:31 | a | test.rs:14:14:14:14 | a | provenance | | -| test.rs:11:31:11:31 | a | test.rs:14:14:14:14 | a | provenance | | | test.rs:11:31:11:31 | a | test.rs:14:14:14:25 | a.as_bytes() | provenance | MaD:10 | -| test.rs:11:31:11:31 | a | test.rs:14:14:14:25 | a.as_bytes() | provenance | MaD:10 | -| test.rs:11:31:11:31 | a | test.rs:15:14:15:14 | a | provenance | | | test.rs:11:31:11:31 | a | test.rs:15:14:15:14 | a | provenance | | | test.rs:13:14:13:14 | a | test.rs:13:14:13:23 | a.as_str() | provenance | MaD:11 | -| test.rs:13:14:13:14 | a | test.rs:13:14:13:23 | a.as_str() | provenance | MaD:11 | | test.rs:14:14:14:14 | a | test.rs:14:14:14:25 | a.as_bytes() | provenance | MaD:10 | -| test.rs:14:14:14:14 | a | test.rs:14:14:14:25 | a.as_bytes() | provenance | MaD:10 | -| test.rs:68:15:68:15 | a | test.rs:70:14:70:14 | a | provenance | | | test.rs:68:15:68:15 | a | test.rs:70:14:70:14 | a | provenance | | | test.rs:98:9:98:31 | ...: ...::Path::<...> | test.rs:100:17:100:33 | path.into_inner() | provenance | MaD:9 | | test.rs:98:9:98:31 | ...: ...::Path::<...> | test.rs:100:17:100:33 | path.into_inner() [tuple.0] | provenance | MaD:6 | @@ -87,37 +79,21 @@ edges | test.rs:139:41:139:42 | to | test.rs:98:9:98:31 | ...: ...::Path::<...> | provenance | Src:MaD:5 | | test.rs:140:45:140:46 | to | test.rs:109:9:109:41 | ...: ...::Path::<...> | provenance | Src:MaD:5 | | test.rs:242:33:242:35 | map | test.rs:242:38:242:46 | ...: String | provenance | Src:MaD:2 | -| test.rs:242:33:242:35 | map | test.rs:242:38:242:46 | ...: String | provenance | Src:MaD:2 | | test.rs:242:38:242:46 | ...: String | test.rs:244:18:244:18 | a | provenance | | -| test.rs:242:38:242:46 | ...: String | test.rs:244:18:244:18 | a | provenance | | -| test.rs:250:46:250:49 | then | test.rs:251:25:251:33 | ...: String | provenance | Src:MaD:3 | | test.rs:250:46:250:49 | then | test.rs:251:25:251:33 | ...: String | provenance | Src:MaD:3 | | test.rs:251:25:251:33 | ...: String | test.rs:252:22:252:22 | a | provenance | | -| test.rs:251:25:251:33 | ...: String | test.rs:252:22:252:22 | a | provenance | | -| test.rs:259:50:259:57 | and_then | test.rs:260:26:260:32 | ...: u64 | provenance | Src:MaD:1 | | test.rs:259:50:259:57 | and_then | test.rs:260:26:260:32 | ...: u64 | provenance | Src:MaD:1 | | test.rs:260:26:260:32 | ...: u64 | test.rs:263:22:263:23 | id | provenance | | -| test.rs:260:26:260:32 | ...: u64 | test.rs:263:22:263:23 | id | provenance | | | test.rs:272:75:272:77 | map | test.rs:273:15:273:23 | ...: String | provenance | Src:MaD:2 | -| test.rs:272:75:272:77 | map | test.rs:273:15:273:23 | ...: String | provenance | Src:MaD:2 | -| test.rs:273:15:273:23 | ...: String | test.rs:275:22:275:22 | a | provenance | | | test.rs:273:15:273:23 | ...: String | test.rs:275:22:275:22 | a | provenance | | nodes | test.rs:11:31:11:31 | a | semmle.label | a | -| test.rs:11:31:11:31 | a | semmle.label | a | | test.rs:13:14:13:14 | a | semmle.label | a | -| test.rs:13:14:13:14 | a | semmle.label | a | -| test.rs:13:14:13:23 | a.as_str() | semmle.label | a.as_str() | | test.rs:13:14:13:23 | a.as_str() | semmle.label | a.as_str() | | test.rs:14:14:14:14 | a | semmle.label | a | -| test.rs:14:14:14:14 | a | semmle.label | a | | test.rs:14:14:14:25 | a.as_bytes() | semmle.label | a.as_bytes() | -| test.rs:14:14:14:25 | a.as_bytes() | semmle.label | a.as_bytes() | -| test.rs:15:14:15:14 | a | semmle.label | a | | test.rs:15:14:15:14 | a | semmle.label | a | | test.rs:68:15:68:15 | a | semmle.label | a | -| test.rs:68:15:68:15 | a | semmle.label | a | -| test.rs:70:14:70:14 | a | semmle.label | a | | test.rs:70:14:70:14 | a | semmle.label | a | | test.rs:98:9:98:31 | ...: ...::Path::<...> | semmle.label | ...: ...::Path::<...> | | test.rs:100:13:100:13 | a | semmle.label | a | @@ -162,39 +138,23 @@ nodes | test.rs:139:41:139:42 | to | semmle.label | to | | test.rs:140:45:140:46 | to | semmle.label | to | | test.rs:242:33:242:35 | map | semmle.label | map | -| test.rs:242:33:242:35 | map | semmle.label | map | | test.rs:242:38:242:46 | ...: String | semmle.label | ...: String | -| test.rs:242:38:242:46 | ...: String | semmle.label | ...: String | -| test.rs:244:18:244:18 | a | semmle.label | a | | test.rs:244:18:244:18 | a | semmle.label | a | | test.rs:250:46:250:49 | then | semmle.label | then | -| test.rs:250:46:250:49 | then | semmle.label | then | | test.rs:251:25:251:33 | ...: String | semmle.label | ...: String | -| test.rs:251:25:251:33 | ...: String | semmle.label | ...: String | -| test.rs:252:22:252:22 | a | semmle.label | a | | test.rs:252:22:252:22 | a | semmle.label | a | | test.rs:259:50:259:57 | and_then | semmle.label | and_then | -| test.rs:259:50:259:57 | and_then | semmle.label | and_then | | test.rs:260:26:260:32 | ...: u64 | semmle.label | ...: u64 | -| test.rs:260:26:260:32 | ...: u64 | semmle.label | ...: u64 | -| test.rs:263:22:263:23 | id | semmle.label | id | | test.rs:263:22:263:23 | id | semmle.label | id | | test.rs:272:75:272:77 | map | semmle.label | map | -| test.rs:272:75:272:77 | map | semmle.label | map | -| test.rs:273:15:273:23 | ...: String | semmle.label | ...: String | | test.rs:273:15:273:23 | ...: String | semmle.label | ...: String | | test.rs:275:22:275:22 | a | semmle.label | a | -| test.rs:275:22:275:22 | a | semmle.label | a | subpaths testFailures #select | test.rs:13:14:13:23 | a.as_str() | test.rs:11:31:11:31 | a | test.rs:13:14:13:23 | a.as_str() | $@ | test.rs:11:31:11:31 | a | a | -| test.rs:13:14:13:23 | a.as_str() | test.rs:11:31:11:31 | a | test.rs:13:14:13:23 | a.as_str() | $@ | test.rs:11:31:11:31 | a | a | -| test.rs:14:14:14:25 | a.as_bytes() | test.rs:11:31:11:31 | a | test.rs:14:14:14:25 | a.as_bytes() | $@ | test.rs:11:31:11:31 | a | a | | test.rs:14:14:14:25 | a.as_bytes() | test.rs:11:31:11:31 | a | test.rs:14:14:14:25 | a.as_bytes() | $@ | test.rs:11:31:11:31 | a | a | | test.rs:15:14:15:14 | a | test.rs:11:31:11:31 | a | test.rs:15:14:15:14 | a | $@ | test.rs:11:31:11:31 | a | a | -| test.rs:15:14:15:14 | a | test.rs:11:31:11:31 | a | test.rs:15:14:15:14 | a | $@ | test.rs:11:31:11:31 | a | a | -| test.rs:70:14:70:14 | a | test.rs:68:15:68:15 | a | test.rs:70:14:70:14 | a | $@ | test.rs:68:15:68:15 | a | a | | test.rs:70:14:70:14 | a | test.rs:68:15:68:15 | a | test.rs:70:14:70:14 | a | $@ | test.rs:68:15:68:15 | a | a | | test.rs:101:14:101:23 | a.as_str() | test.rs:139:41:139:42 | to | test.rs:101:14:101:23 | a.as_str() | $@ | test.rs:139:41:139:42 | to | to | | test.rs:102:14:102:25 | a.as_bytes() | test.rs:139:41:139:42 | to | test.rs:102:14:102:25 | a.as_bytes() | $@ | test.rs:139:41:139:42 | to | to | @@ -203,10 +163,6 @@ testFailures | test.rs:114:14:114:14 | b | test.rs:140:45:140:46 | to | test.rs:114:14:114:14 | b | $@ | test.rs:140:45:140:46 | to | to | | test.rs:132:14:132:14 | a | test.rs:127:5:127:20 | to | test.rs:132:14:132:14 | a | $@ | test.rs:127:5:127:20 | to | to | | test.rs:244:18:244:18 | a | test.rs:242:33:242:35 | map | test.rs:244:18:244:18 | a | $@ | test.rs:242:33:242:35 | map | map | -| test.rs:244:18:244:18 | a | test.rs:242:33:242:35 | map | test.rs:244:18:244:18 | a | $@ | test.rs:242:33:242:35 | map | map | -| test.rs:252:22:252:22 | a | test.rs:250:46:250:49 | then | test.rs:252:22:252:22 | a | $@ | test.rs:250:46:250:49 | then | then | | test.rs:252:22:252:22 | a | test.rs:250:46:250:49 | then | test.rs:252:22:252:22 | a | $@ | test.rs:250:46:250:49 | then | then | | test.rs:263:22:263:23 | id | test.rs:259:50:259:57 | and_then | test.rs:263:22:263:23 | id | $@ | test.rs:259:50:259:57 | and_then | and_then | -| test.rs:263:22:263:23 | id | test.rs:259:50:259:57 | and_then | test.rs:263:22:263:23 | id | $@ | test.rs:259:50:259:57 | and_then | and_then | -| test.rs:275:22:275:22 | a | test.rs:272:75:272:77 | map | test.rs:275:22:275:22 | a | $@ | test.rs:272:75:272:77 | map | map | | test.rs:275:22:275:22 | a | test.rs:272:75:272:77 | map | test.rs:275:22:275:22 | a | $@ | test.rs:272:75:272:77 | map | map | diff --git a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/TaintSources.expected b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/TaintSources.expected index 549f9c4ab762..20a20ce3f9b1 100644 --- a/rust/ql/test/library-tests/dataflow/sources/web_frameworks/TaintSources.expected +++ b/rust/ql/test/library-tests/dataflow/sources/web_frameworks/TaintSources.expected @@ -1,12 +1,7 @@ | test.rs:11:31:11:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:11:31:11:31 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:22:14:22:19 | TuplePat | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:22:14:22:19 | TuplePat | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:48:14:48:30 | MyStruct {...} | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:48:14:48:30 | MyStruct {...} | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:58:14:58:15 | ms | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:58:14:58:15 | ms | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:68:15:68:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:68:15:68:15 | a | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:127:5:127:20 | to | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:127:5:127:20 | to | Flow source 'RemoteSource' of type remote (DEFAULT). | @@ -48,20 +43,6 @@ | test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:242:33:242:35 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | @@ -70,15 +51,6 @@ | test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:250:46:250:49 | then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | @@ -87,15 +59,6 @@ | test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:259:50:259:57 | and_then | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | -| test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | | test.rs:272:75:272:77 | map | Flow source 'RemoteSource' of type remote (DEFAULT). | diff --git a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected index 0b5d376b4d2e..6b5461f37194 100644 --- a/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/path-resolution/CONSISTENCY/PathResolutionConsistency.expected @@ -1,6 +1,6 @@ multipleCallTargets -| main.rs:125:9:125:11 | f(...) | -| main.rs:365:9:367:16 | ...::f(...) | -| main.rs:368:9:370:16 | ...::f(...) | -| main.rs:447:9:451:16 | ...::f(...) | -| main.rs:452:9:456:16 | ...::f(...) | +| main.rs:126:9:126:11 | f(...) | +| main.rs:366:9:368:16 | ...::f(...) | +| main.rs:369:9:371:16 | ...::f(...) | +| main.rs:448:9:452:16 | ...::f(...) | +| main.rs:453:9:457:16 | ...::f(...) | diff --git a/rust/ql/test/library-tests/path-resolution/main.rs b/rust/ql/test/library-tests/path-resolution/main.rs index 037527c71be3..c0f37bcd18eb 100644 --- a/rust/ql/test/library-tests/path-resolution/main.rs +++ b/rust/ql/test/library-tests/path-resolution/main.rs @@ -1,6 +1,7 @@ mod my; // I1 -use my::*; // $ item=I1 +#[rustfmt::skip] +use {{{my::{{self as my_alias, *}}}}}; // $ item=I1 use my::nested::nested1::nested2::*; // $ item=I3 @@ -789,6 +790,49 @@ mod impl_with_attribute_macro { } // impl_with_attribute_macro::test } +mod patterns { + #[rustfmt::skip] + pub fn test() -> Option { // $ item=Option $ item=i32 + let x = Some(42); // $ item=Some + let y : Option = match x { // $ item=Option $ item=i32 + Some(y) => { // $ item=Some + None // $ item=None + } + None => // $ item=None + None // $ item=None + }; + match y { + N0ne => // local variable + N0ne + } + } // patterns::test + + #[rustfmt::skip] + fn test2() -> Option { // $ item=Option $ item=i32 + let test_alias = test; // $ item=patterns::test + let test = test_alias(); + test + } + + #[rustfmt::skip] + const z: i32 // $ item=i32 + = 0; // constz + + #[rustfmt::skip] + fn test3() { + let x = Some(0); // $ item=Some + match x { + Some(x) // $ item=Some + => x, + _ => 0 + }; + match x { + Some(z) => z, // $ item=Some item=constz + _ => 0 + }; + } +} + fn main() { my::nested::nested1::nested2::f(); // $ item=I4 my::f(); // $ item=I38 @@ -816,6 +860,7 @@ fn main() { nested8::f(); // $ item=I119 my3::f(); // $ item=I200 nested_f(); // $ item=I201 + my_alias::nested_f(); // $ item=I201 m18::m19::m20::g(); // $ item=I103 m23::f(); // $ item=I108 m24::f(); // $ item=I121 @@ -824,4 +869,5 @@ fn main() { AStruct::z_on_type(); // $ item=I124 AStruct {}.z_on_instance(); // $ item=I123 item=I125 impl_with_attribute_macro::test(); // $ item=impl_with_attribute_macro::test + patterns::test(); // $ item=patterns::test } diff --git a/rust/ql/test/library-tests/path-resolution/path-resolution.expected b/rust/ql/test/library-tests/path-resolution/path-resolution.expected index bb9a456a42c2..20c7e7799be7 100644 --- a/rust/ql/test/library-tests/path-resolution/path-resolution.expected +++ b/rust/ql/test/library-tests/path-resolution/path-resolution.expected @@ -1,37 +1,38 @@ mod | lib.rs:1:1:1:11 | mod my | | main.rs:1:1:1:7 | mod my | -| main.rs:7:1:7:8 | mod my2 | -| main.rs:19:1:43:1 | mod m1 | -| main.rs:24:5:42:5 | mod m2 | -| main.rs:35:9:41:9 | mod m3 | -| main.rs:45:1:52:1 | mod m4 | -| main.rs:109:1:113:1 | mod m5 | -| main.rs:115:1:127:1 | mod m6 | -| main.rs:129:1:148:1 | mod m7 | -| main.rs:150:1:204:1 | mod m8 | -| main.rs:206:1:214:1 | mod m9 | -| main.rs:216:1:235:1 | mod m10 | -| main.rs:237:1:274:1 | mod m11 | -| main.rs:247:5:247:12 | mod f | -| main.rs:276:1:288:1 | mod m12 | -| main.rs:290:1:303:1 | mod m13 | -| main.rs:294:5:302:5 | mod m14 | -| main.rs:305:1:374:1 | mod m15 | -| main.rs:376:1:468:1 | mod m16 | -| main.rs:470:1:520:1 | mod trait_visibility | -| main.rs:471:5:493:5 | mod m | -| main.rs:522:1:552:1 | mod m17 | -| main.rs:554:1:572:1 | mod m18 | -| main.rs:559:5:571:5 | mod m19 | -| main.rs:564:9:570:9 | mod m20 | -| main.rs:574:1:599:1 | mod m21 | -| main.rs:575:5:581:5 | mod m22 | -| main.rs:583:5:598:5 | mod m33 | -| main.rs:601:1:626:1 | mod m23 | -| main.rs:628:1:696:1 | mod m24 | -| main.rs:713:1:765:1 | mod associated_types | -| main.rs:771:1:790:1 | mod impl_with_attribute_macro | +| main.rs:8:1:8:8 | mod my2 | +| main.rs:20:1:44:1 | mod m1 | +| main.rs:25:5:43:5 | mod m2 | +| main.rs:36:9:42:9 | mod m3 | +| main.rs:46:1:53:1 | mod m4 | +| main.rs:110:1:114:1 | mod m5 | +| main.rs:116:1:128:1 | mod m6 | +| main.rs:130:1:149:1 | mod m7 | +| main.rs:151:1:205:1 | mod m8 | +| main.rs:207:1:215:1 | mod m9 | +| main.rs:217:1:236:1 | mod m10 | +| main.rs:238:1:275:1 | mod m11 | +| main.rs:248:5:248:12 | mod f | +| main.rs:277:1:289:1 | mod m12 | +| main.rs:291:1:304:1 | mod m13 | +| main.rs:295:5:303:5 | mod m14 | +| main.rs:306:1:375:1 | mod m15 | +| main.rs:377:1:469:1 | mod m16 | +| main.rs:471:1:521:1 | mod trait_visibility | +| main.rs:472:5:494:5 | mod m | +| main.rs:523:1:553:1 | mod m17 | +| main.rs:555:1:573:1 | mod m18 | +| main.rs:560:5:572:5 | mod m19 | +| main.rs:565:9:571:9 | mod m20 | +| main.rs:575:1:600:1 | mod m21 | +| main.rs:576:5:582:5 | mod m22 | +| main.rs:584:5:599:5 | mod m33 | +| main.rs:602:1:627:1 | mod m23 | +| main.rs:629:1:697:1 | mod m24 | +| main.rs:714:1:766:1 | mod associated_types | +| main.rs:772:1:791:1 | mod impl_with_attribute_macro | +| main.rs:793:1:834:1 | mod patterns | | my2/mod.rs:1:1:1:16 | mod nested2 | | my2/mod.rs:20:1:20:12 | mod my3 | | my2/mod.rs:22:1:23:10 | mod mymod | @@ -47,424 +48,447 @@ mod | my/nested.rs:1:1:17:1 | mod nested1 | | my/nested.rs:2:5:11:5 | mod nested2 | resolvePath -| main.rs:3:5:3:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:5:5:5:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:5:5:5:14 | ...::nested | my.rs:1:1:1:15 | mod nested | -| main.rs:5:5:5:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | -| main.rs:5:5:5:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | -| main.rs:9:5:9:7 | my2 | main.rs:7:1:7:8 | mod my2 | -| main.rs:12:5:12:7 | my2 | main.rs:7:1:7:8 | mod my2 | -| main.rs:12:5:12:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | -| main.rs:12:5:12:25 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | -| main.rs:12:5:12:34 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | -| main.rs:13:5:13:5 | f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:14:5:14:5 | g | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:17:5:17:7 | my2 | main.rs:7:1:7:8 | mod my2 | -| main.rs:17:5:17:18 | ...::nested8_f | my2/nested2.rs:23:9:25:9 | fn f | -| main.rs:21:9:21:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:26:13:26:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:30:13:30:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:31:13:31:13 | f | main.rs:25:9:27:9 | fn f | -| main.rs:32:13:32:17 | super | main.rs:19:1:43:1 | mod m1 | -| main.rs:32:13:32:20 | ...::f | main.rs:20:5:22:5 | fn f | -| main.rs:36:17:36:21 | super | main.rs:24:5:42:5 | mod m2 | -| main.rs:36:17:36:24 | ...::f | main.rs:25:9:27:9 | fn f | -| main.rs:38:17:38:23 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:39:17:39:17 | f | main.rs:25:9:27:9 | fn f | -| main.rs:46:9:46:13 | super | main.rs:1:1:827:2 | SourceFile | -| main.rs:46:9:46:17 | ...::m1 | main.rs:19:1:43:1 | mod m1 | -| main.rs:46:9:46:21 | ...::m2 | main.rs:24:5:42:5 | mod m2 | -| main.rs:46:9:46:24 | ...::g | main.rs:29:9:33:9 | fn g | -| main.rs:49:9:49:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:50:9:50:9 | g | main.rs:29:9:33:9 | fn g | -| main.rs:57:5:57:11 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:62:13:62:14 | m1 | main.rs:19:1:43:1 | mod m1 | -| main.rs:62:13:62:18 | ...::m2 | main.rs:24:5:42:5 | mod m2 | -| main.rs:62:13:62:21 | ...::g | main.rs:29:9:33:9 | fn g | -| main.rs:63:9:63:9 | g | main.rs:29:9:33:9 | fn g | -| main.rs:66:9:66:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:67:17:67:19 | Foo | main.rs:65:9:65:21 | struct Foo | -| main.rs:70:13:70:15 | Foo | main.rs:59:5:59:17 | struct Foo | -| main.rs:72:5:72:5 | f | main.rs:61:5:68:5 | fn f | -| main.rs:74:5:74:8 | self | main.rs:1:1:827:2 | SourceFile | -| main.rs:74:5:74:11 | ...::i | main.rs:77:1:89:1 | fn i | -| main.rs:78:5:78:11 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:80:13:80:15 | Foo | main.rs:54:1:54:13 | struct Foo | -| main.rs:84:16:84:18 | i32 | {EXTERNAL LOCATION} | struct i32 | -| main.rs:87:17:87:19 | Foo | main.rs:83:9:85:9 | struct Foo | -| main.rs:91:5:91:7 | my2 | main.rs:7:1:7:8 | mod my2 | -| main.rs:91:5:91:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | -| main.rs:93:5:93:21 | my2_nested2_alias | my2/mod.rs:1:1:1:16 | mod nested2 | -| main.rs:93:5:93:30 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | -| main.rs:93:34:93:40 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | -| main.rs:93:34:93:43 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:93:57:93:63 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | -| main.rs:93:57:93:66 | ...::g | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:93:80:93:86 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | -| main.rs:104:5:104:11 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:105:5:105:15 | fn_in_macro | main.rs:95:1:101:1 | MacroRules | -| main.rs:105:18:105:24 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:106:5:106:22 | f_defined_in_macro | main.rs:105:18:105:42 | fn f_defined_in_macro | -| main.rs:111:9:111:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:117:9:117:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:121:9:121:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:124:13:124:17 | super | main.rs:1:1:827:2 | SourceFile | -| main.rs:124:13:124:21 | ...::m5 | main.rs:109:1:113:1 | mod m5 | -| main.rs:125:9:125:9 | f | main.rs:110:5:112:5 | fn f | -| main.rs:125:9:125:9 | f | main.rs:116:5:118:5 | fn f | -| main.rs:132:13:132:15 | i32 | {EXTERNAL LOCATION} | struct i32 | -| main.rs:135:16:135:18 | i32 | {EXTERNAL LOCATION} | struct i32 | -| main.rs:141:19:141:24 | MyEnum | main.rs:130:5:138:5 | enum MyEnum | -| main.rs:143:9:143:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:144:17:144:22 | MyEnum | main.rs:130:5:138:5 | enum MyEnum | -| main.rs:144:17:144:25 | ...::A | main.rs:131:9:133:9 | A | -| main.rs:145:17:145:22 | MyEnum | main.rs:130:5:138:5 | enum MyEnum | -| main.rs:145:17:145:25 | ...::B | main.rs:133:12:136:9 | B | -| main.rs:146:9:146:14 | MyEnum | main.rs:130:5:138:5 | enum MyEnum | -| main.rs:146:9:146:17 | ...::C | main.rs:136:12:137:9 | C | -| main.rs:155:13:155:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:156:13:156:13 | f | main.rs:163:5:165:5 | fn f | -| main.rs:157:13:157:16 | Self | main.rs:151:5:159:5 | trait MyTrait | -| main.rs:157:13:157:19 | ...::f | main.rs:152:9:152:20 | fn f | -| main.rs:164:9:164:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:168:10:168:16 | MyTrait | main.rs:151:5:159:5 | trait MyTrait | -| main.rs:168:22:168:29 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:170:13:170:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:171:13:171:13 | f | main.rs:163:5:165:5 | fn f | -| main.rs:172:13:172:16 | Self | main.rs:167:5:178:5 | impl MyTrait for MyStruct { ... } | -| main.rs:172:13:172:19 | ...::g | main.rs:175:9:177:9 | fn g | -| main.rs:176:13:176:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:181:10:181:17 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:183:13:183:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:184:13:184:13 | f | main.rs:163:5:165:5 | fn f | -| main.rs:190:17:190:24 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:191:9:191:15 | MyTrait | main.rs:151:5:159:5 | trait MyTrait | -| main.rs:191:9:191:18 | ...::f | main.rs:152:9:152:20 | fn f | -| main.rs:192:9:192:16 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:192:9:192:19 | ...::f | main.rs:168:33:173:9 | fn f | -| main.rs:193:10:193:17 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:194:10:194:16 | MyTrait | main.rs:151:5:159:5 | trait MyTrait | -| main.rs:197:17:197:24 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:199:17:199:24 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:201:9:201:16 | MyStruct | main.rs:161:5:161:22 | struct MyStruct | -| main.rs:201:9:201:19 | ...::h | main.rs:181:21:185:9 | fn h | -| main.rs:210:19:210:22 | self | main.rs:206:1:214:1 | mod m9 | -| main.rs:210:19:210:32 | ...::MyStruct | main.rs:207:5:207:26 | struct MyStruct | -| main.rs:211:9:211:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:212:9:212:12 | self | main.rs:206:1:214:1 | mod m9 | -| main.rs:212:9:212:22 | ...::MyStruct | main.rs:207:5:207:26 | struct MyStruct | -| main.rs:222:12:222:12 | T | main.rs:219:7:219:7 | T | -| main.rs:227:12:227:12 | T | main.rs:226:14:226:14 | T | -| main.rs:229:7:231:7 | MyStruct::<...> | main.rs:217:5:223:5 | struct MyStruct | -| main.rs:230:9:230:9 | T | main.rs:226:14:226:14 | T | -| main.rs:233:9:233:16 | MyStruct | main.rs:217:5:223:5 | struct MyStruct | -| main.rs:243:17:243:19 | Foo | main.rs:238:5:238:21 | struct Foo | -| main.rs:244:9:244:11 | Foo | main.rs:240:5:240:15 | fn Foo | -| main.rs:253:9:253:11 | Bar | main.rs:249:5:251:5 | enum Bar | -| main.rs:253:9:253:19 | ...::FooBar | main.rs:250:9:250:17 | FooBar | -| main.rs:258:13:258:15 | Foo | main.rs:238:5:238:21 | struct Foo | -| main.rs:259:17:259:22 | FooBar | main.rs:250:9:250:17 | FooBar | -| main.rs:260:17:260:22 | FooBar | main.rs:255:5:255:18 | fn FooBar | -| main.rs:268:9:268:9 | E | main.rs:263:15:266:5 | enum E | -| main.rs:268:9:268:12 | ...::C | main.rs:265:9:265:9 | C | -| main.rs:271:17:271:17 | S | main.rs:263:5:263:13 | struct S | -| main.rs:272:17:272:17 | C | main.rs:265:9:265:9 | C | -| main.rs:285:16:285:16 | T | main.rs:279:7:279:7 | T | -| main.rs:286:14:286:17 | Self | main.rs:277:5:287:5 | trait MyParamTrait | -| main.rs:286:14:286:33 | ...::AssociatedType | main.rs:281:9:281:28 | type AssociatedType | -| main.rs:295:13:295:16 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | -| main.rs:295:13:295:21 | ...::m13 | main.rs:290:1:303:1 | mod m13 | -| main.rs:295:13:295:24 | ...::f | main.rs:291:5:291:17 | fn f | -| main.rs:295:13:295:24 | ...::f | main.rs:291:19:292:19 | struct f | -| main.rs:298:17:298:17 | f | main.rs:291:19:292:19 | struct f | -| main.rs:299:21:299:21 | f | main.rs:291:19:292:19 | struct f | -| main.rs:300:13:300:13 | f | main.rs:291:5:291:17 | fn f | -| main.rs:314:9:314:14 | Trait1 | main.rs:306:5:310:5 | trait Trait1 | -| main.rs:316:13:316:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:317:13:317:16 | Self | main.rs:312:5:320:5 | trait Trait2 | -| main.rs:317:13:317:19 | ...::g | main.rs:309:9:309:20 | fn g | -| main.rs:327:9:327:12 | Self | main.rs:322:5:335:5 | trait Trait3 | -| main.rs:327:15:327:20 | Trait1 | main.rs:306:5:310:5 | trait Trait1 | -| main.rs:328:9:328:10 | TT | main.rs:324:9:324:10 | TT | -| main.rs:328:13:328:18 | Trait1 | main.rs:306:5:310:5 | trait Trait1 | -| main.rs:330:25:330:26 | TT | main.rs:324:9:324:10 | TT | -| main.rs:331:13:331:16 | Self | main.rs:322:5:335:5 | trait Trait3 | -| main.rs:331:13:331:19 | ...::g | main.rs:309:9:309:20 | fn g | -| main.rs:332:13:332:14 | TT | main.rs:324:9:324:10 | TT | -| main.rs:332:13:332:17 | ...::g | main.rs:309:9:309:20 | fn g | -| main.rs:340:10:340:15 | Trait1 | main.rs:306:5:310:5 | trait Trait1 | -| main.rs:341:11:341:11 | S | main.rs:337:5:337:13 | struct S | -| main.rs:343:13:343:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:344:13:344:16 | Self | main.rs:339:5:351:5 | impl Trait1 for S { ... } | -| main.rs:344:13:344:19 | ...::g | main.rs:348:9:350:9 | fn g | -| main.rs:349:13:349:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:354:10:354:15 | Trait2 | main.rs:312:5:320:5 | trait Trait2 | -| main.rs:355:11:355:11 | S | main.rs:337:5:337:13 | struct S | -| main.rs:357:13:357:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:363:9:363:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:364:17:364:17 | S | main.rs:337:5:337:13 | struct S | -| main.rs:365:10:365:10 | S | main.rs:337:5:337:13 | struct S | -| main.rs:366:14:366:19 | Trait1 | main.rs:306:5:310:5 | trait Trait1 | -| main.rs:368:10:368:10 | S | main.rs:337:5:337:13 | struct S | -| main.rs:369:14:369:19 | Trait2 | main.rs:312:5:320:5 | trait Trait2 | -| main.rs:371:9:371:9 | S | main.rs:337:5:337:13 | struct S | -| main.rs:371:9:371:12 | ...::g | main.rs:348:9:350:9 | fn g | -| main.rs:381:24:381:24 | T | main.rs:379:7:379:7 | T | -| main.rs:383:24:383:24 | T | main.rs:379:7:379:7 | T | -| main.rs:386:24:386:24 | T | main.rs:379:7:379:7 | T | -| main.rs:387:13:387:16 | Self | main.rs:377:5:393:5 | trait Trait1 | -| main.rs:387:13:387:19 | ...::g | main.rs:383:9:384:9 | fn g | -| main.rs:391:18:391:18 | T | main.rs:379:7:379:7 | T | -| main.rs:399:9:401:9 | Trait1::<...> | main.rs:377:5:393:5 | trait Trait1 | -| main.rs:400:11:400:11 | T | main.rs:397:7:397:7 | T | -| main.rs:402:24:402:24 | T | main.rs:397:7:397:7 | T | -| main.rs:403:13:403:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:404:13:404:16 | Self | main.rs:395:5:408:5 | trait Trait2 | -| main.rs:404:13:404:19 | ...::g | main.rs:383:9:384:9 | fn g | -| main.rs:406:13:406:16 | Self | main.rs:395:5:408:5 | trait Trait2 | -| main.rs:406:13:406:19 | ...::c | main.rs:391:9:392:9 | Const | -| main.rs:413:10:415:5 | Trait1::<...> | main.rs:377:5:393:5 | trait Trait1 | -| main.rs:414:7:414:7 | S | main.rs:410:5:410:13 | struct S | -| main.rs:416:11:416:11 | S | main.rs:410:5:410:13 | struct S | -| main.rs:417:24:417:24 | S | main.rs:410:5:410:13 | struct S | -| main.rs:418:13:418:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:419:13:419:16 | Self | main.rs:412:5:430:5 | impl Trait1::<...> for S { ... } | -| main.rs:419:13:419:19 | ...::g | main.rs:423:9:426:9 | fn g | -| main.rs:423:24:423:24 | S | main.rs:410:5:410:13 | struct S | -| main.rs:424:13:424:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:425:13:425:16 | Self | main.rs:412:5:430:5 | impl Trait1::<...> for S { ... } | -| main.rs:425:13:425:19 | ...::c | main.rs:428:9:429:9 | Const | -| main.rs:428:18:428:18 | S | main.rs:410:5:410:13 | struct S | -| main.rs:428:22:428:22 | S | main.rs:410:5:410:13 | struct S | -| main.rs:433:10:435:5 | Trait2::<...> | main.rs:395:5:408:5 | trait Trait2 | -| main.rs:434:7:434:7 | S | main.rs:410:5:410:13 | struct S | -| main.rs:436:11:436:11 | S | main.rs:410:5:410:13 | struct S | -| main.rs:437:24:437:24 | S | main.rs:410:5:410:13 | struct S | -| main.rs:438:13:438:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:439:13:439:16 | Self | main.rs:432:5:441:5 | impl Trait2::<...> for S { ... } | -| main.rs:445:9:445:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:446:17:446:17 | S | main.rs:410:5:410:13 | struct S | -| main.rs:447:10:447:10 | S | main.rs:410:5:410:13 | struct S | -| main.rs:448:14:450:11 | Trait1::<...> | main.rs:377:5:393:5 | trait Trait1 | -| main.rs:449:13:449:13 | S | main.rs:410:5:410:13 | struct S | -| main.rs:452:10:452:10 | S | main.rs:410:5:410:13 | struct S | -| main.rs:453:14:455:11 | Trait2::<...> | main.rs:395:5:408:5 | trait Trait2 | -| main.rs:454:13:454:13 | S | main.rs:410:5:410:13 | struct S | -| main.rs:457:9:457:9 | S | main.rs:410:5:410:13 | struct S | -| main.rs:457:9:457:12 | ...::g | main.rs:423:9:426:9 | fn g | -| main.rs:459:9:459:9 | S | main.rs:410:5:410:13 | struct S | -| main.rs:459:9:459:12 | ...::h | main.rs:386:9:389:9 | fn h | -| main.rs:461:9:461:9 | S | main.rs:410:5:410:13 | struct S | -| main.rs:461:9:461:12 | ...::c | main.rs:428:9:429:9 | Const | -| main.rs:462:10:462:10 | S | main.rs:410:5:410:13 | struct S | -| main.rs:463:14:465:11 | Trait1::<...> | main.rs:377:5:393:5 | trait Trait1 | -| main.rs:464:13:464:13 | S | main.rs:410:5:410:13 | struct S | -| main.rs:482:14:482:16 | Foo | main.rs:472:9:474:9 | trait Foo | -| main.rs:482:22:482:22 | X | main.rs:480:9:480:21 | struct X | -| main.rs:484:17:484:23 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:488:14:488:16 | Bar | main.rs:476:9:478:9 | trait Bar | -| main.rs:488:22:488:22 | X | main.rs:480:9:480:21 | struct X | -| main.rs:490:17:490:23 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:495:9:495:9 | m | main.rs:471:5:493:5 | mod m | -| main.rs:495:9:495:12 | ...::X | main.rs:480:9:480:21 | struct X | -| main.rs:498:17:498:17 | X | main.rs:480:9:480:21 | struct X | -| main.rs:501:17:501:17 | m | main.rs:471:5:493:5 | mod m | -| main.rs:501:17:501:22 | ...::Foo | main.rs:472:9:474:9 | trait Foo | -| main.rs:502:13:502:13 | X | main.rs:480:9:480:21 | struct X | -| main.rs:502:13:502:23 | ...::a_method | main.rs:482:26:485:13 | fn a_method | -| main.rs:506:17:506:17 | m | main.rs:471:5:493:5 | mod m | -| main.rs:506:17:506:22 | ...::Bar | main.rs:476:9:478:9 | trait Bar | -| main.rs:507:13:507:13 | X | main.rs:480:9:480:21 | struct X | -| main.rs:507:13:507:23 | ...::a_method | main.rs:488:26:491:13 | fn a_method | -| main.rs:511:17:511:17 | m | main.rs:471:5:493:5 | mod m | -| main.rs:511:17:511:22 | ...::Bar | main.rs:476:9:478:9 | trait Bar | -| main.rs:512:13:512:13 | X | main.rs:480:9:480:21 | struct X | -| main.rs:512:13:512:23 | ...::a_method | main.rs:488:26:491:13 | fn a_method | -| main.rs:517:13:517:13 | m | main.rs:471:5:493:5 | mod m | -| main.rs:517:13:517:18 | ...::Bar | main.rs:476:9:478:9 | trait Bar | -| main.rs:517:13:517:28 | ...::a_method | main.rs:477:13:477:31 | fn a_method | -| main.rs:530:10:530:16 | MyTrait | main.rs:523:5:525:5 | trait MyTrait | -| main.rs:531:9:531:9 | S | main.rs:527:5:527:13 | struct S | -| main.rs:533:13:533:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:539:7:539:13 | MyTrait | main.rs:523:5:525:5 | trait MyTrait | -| main.rs:540:10:540:10 | T | main.rs:538:10:538:10 | T | -| main.rs:542:9:542:9 | T | main.rs:538:10:538:10 | T | -| main.rs:542:9:542:12 | ...::f | main.rs:524:9:524:20 | fn f | -| main.rs:543:9:543:15 | MyTrait | main.rs:523:5:525:5 | trait MyTrait | -| main.rs:543:9:543:18 | ...::f | main.rs:524:9:524:20 | fn f | -| main.rs:548:9:548:9 | g | main.rs:537:5:544:5 | fn g | -| main.rs:549:11:549:11 | S | main.rs:527:5:527:13 | struct S | -| main.rs:556:9:556:15 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:561:13:561:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:566:17:566:23 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:567:17:567:21 | super | main.rs:559:5:571:5 | mod m19 | -| main.rs:567:17:567:24 | ...::f | main.rs:560:9:562:9 | fn f | -| main.rs:568:17:568:21 | super | main.rs:559:5:571:5 | mod m19 | -| main.rs:568:17:568:28 | ...::super | main.rs:554:1:572:1 | mod m18 | -| main.rs:568:17:568:31 | ...::f | main.rs:555:5:557:5 | fn f | -| main.rs:585:13:585:17 | super | main.rs:574:1:599:1 | mod m21 | -| main.rs:585:13:585:22 | ...::m22 | main.rs:575:5:581:5 | mod m22 | -| main.rs:585:13:585:30 | ...::MyEnum | main.rs:576:9:578:9 | enum MyEnum | -| main.rs:586:13:586:16 | self | main.rs:576:9:578:9 | enum MyEnum | -| main.rs:590:13:590:17 | super | main.rs:574:1:599:1 | mod m21 | -| main.rs:590:13:590:22 | ...::m22 | main.rs:575:5:581:5 | mod m22 | -| main.rs:590:13:590:32 | ...::MyStruct | main.rs:580:9:580:28 | struct MyStruct | -| main.rs:591:13:591:16 | self | main.rs:580:9:580:28 | struct MyStruct | -| main.rs:595:21:595:26 | MyEnum | main.rs:576:9:578:9 | enum MyEnum | -| main.rs:595:21:595:29 | ...::A | main.rs:577:13:577:13 | A | -| main.rs:596:21:596:28 | MyStruct | main.rs:580:9:580:28 | struct MyStruct | -| main.rs:612:10:614:5 | Trait1::<...> | main.rs:602:5:607:5 | trait Trait1 | -| main.rs:613:7:613:10 | Self | main.rs:609:5:609:13 | struct S | -| main.rs:615:11:615:11 | S | main.rs:609:5:609:13 | struct S | -| main.rs:617:13:617:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:623:17:623:17 | S | main.rs:609:5:609:13 | struct S | -| main.rs:639:15:639:15 | T | main.rs:638:26:638:26 | T | -| main.rs:644:9:644:24 | GenericStruct::<...> | main.rs:637:5:640:5 | struct GenericStruct | -| main.rs:644:23:644:23 | T | main.rs:643:10:643:10 | T | -| main.rs:646:9:646:9 | T | main.rs:643:10:643:10 | T | -| main.rs:646:12:646:17 | TraitA | main.rs:629:5:631:5 | trait TraitA | -| main.rs:655:9:655:24 | GenericStruct::<...> | main.rs:637:5:640:5 | struct GenericStruct | -| main.rs:655:23:655:23 | T | main.rs:654:10:654:10 | T | -| main.rs:657:9:657:9 | T | main.rs:654:10:654:10 | T | -| main.rs:657:12:657:17 | TraitB | main.rs:633:5:635:5 | trait TraitB | -| main.rs:658:9:658:9 | T | main.rs:654:10:654:10 | T | -| main.rs:658:12:658:17 | TraitA | main.rs:629:5:631:5 | trait TraitA | -| main.rs:669:10:669:15 | TraitA | main.rs:629:5:631:5 | trait TraitA | -| main.rs:669:21:669:31 | Implementor | main.rs:666:5:666:23 | struct Implementor | -| main.rs:671:13:671:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:676:10:676:15 | TraitB | main.rs:633:5:635:5 | trait TraitB | -| main.rs:676:21:676:31 | Implementor | main.rs:666:5:666:23 | struct Implementor | -| main.rs:678:13:678:19 | println | {EXTERNAL LOCATION} | MacroRules | -| main.rs:684:24:684:34 | Implementor | main.rs:666:5:666:23 | struct Implementor | -| main.rs:685:23:685:35 | GenericStruct | main.rs:637:5:640:5 | struct GenericStruct | -| main.rs:691:9:691:36 | GenericStruct::<...> | main.rs:637:5:640:5 | struct GenericStruct | -| main.rs:691:9:691:50 | ...::call_trait_a | main.rs:648:9:650:9 | fn call_trait_a | -| main.rs:691:25:691:35 | Implementor | main.rs:666:5:666:23 | struct Implementor | -| main.rs:694:9:694:36 | GenericStruct::<...> | main.rs:637:5:640:5 | struct GenericStruct | -| main.rs:694:9:694:47 | ...::call_both | main.rs:660:9:663:9 | fn call_both | -| main.rs:694:25:694:35 | Implementor | main.rs:666:5:666:23 | struct Implementor | -| main.rs:700:3:700:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:700:3:700:24 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | -| main.rs:704:6:704:12 | AStruct | main.rs:703:1:703:17 | struct AStruct | -| main.rs:706:7:706:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:706:7:706:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | -| main.rs:709:7:709:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:709:7:709:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | -| main.rs:714:9:714:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:714:9:714:19 | ...::marker | {EXTERNAL LOCATION} | mod marker | -| main.rs:714:9:714:32 | ...::PhantomData | {EXTERNAL LOCATION} | struct PhantomData | +| main.rs:4:8:4:9 | my | main.rs:1:1:1:7 | mod my | +| main.rs:4:14:4:17 | self | main.rs:1:1:1:7 | mod my | +| main.rs:6:5:6:6 | my | main.rs:1:1:1:7 | mod my | +| main.rs:6:5:6:14 | ...::nested | my.rs:1:1:1:15 | mod nested | +| main.rs:6:5:6:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | +| main.rs:6:5:6:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | +| main.rs:10:5:10:7 | my2 | main.rs:8:1:8:8 | mod my2 | +| main.rs:13:5:13:7 | my2 | main.rs:8:1:8:8 | mod my2 | +| main.rs:13:5:13:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | +| main.rs:13:5:13:25 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | +| main.rs:13:5:13:34 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | +| main.rs:14:5:14:5 | f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:15:5:15:5 | g | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:18:5:18:7 | my2 | main.rs:8:1:8:8 | mod my2 | +| main.rs:18:5:18:18 | ...::nested8_f | my2/nested2.rs:23:9:25:9 | fn f | +| main.rs:22:9:22:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:27:13:27:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:31:13:31:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:32:13:32:13 | f | main.rs:26:9:28:9 | fn f | +| main.rs:33:13:33:17 | super | main.rs:20:1:44:1 | mod m1 | +| main.rs:33:13:33:20 | ...::f | main.rs:21:5:23:5 | fn f | +| main.rs:37:17:37:21 | super | main.rs:25:5:43:5 | mod m2 | +| main.rs:37:17:37:24 | ...::f | main.rs:26:9:28:9 | fn f | +| main.rs:39:17:39:23 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:40:17:40:17 | f | main.rs:26:9:28:9 | fn f | +| main.rs:47:9:47:13 | super | main.rs:1:1:873:2 | SourceFile | +| main.rs:47:9:47:17 | ...::m1 | main.rs:20:1:44:1 | mod m1 | +| main.rs:47:9:47:21 | ...::m2 | main.rs:25:5:43:5 | mod m2 | +| main.rs:47:9:47:24 | ...::g | main.rs:30:9:34:9 | fn g | +| main.rs:50:9:50:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:51:9:51:9 | g | main.rs:30:9:34:9 | fn g | +| main.rs:58:5:58:11 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:63:13:63:14 | m1 | main.rs:20:1:44:1 | mod m1 | +| main.rs:63:13:63:18 | ...::m2 | main.rs:25:5:43:5 | mod m2 | +| main.rs:63:13:63:21 | ...::g | main.rs:30:9:34:9 | fn g | +| main.rs:64:9:64:9 | g | main.rs:30:9:34:9 | fn g | +| main.rs:67:9:67:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:68:17:68:19 | Foo | main.rs:66:9:66:21 | struct Foo | +| main.rs:71:13:71:15 | Foo | main.rs:60:5:60:17 | struct Foo | +| main.rs:73:5:73:5 | f | main.rs:62:5:69:5 | fn f | +| main.rs:75:5:75:8 | self | main.rs:1:1:873:2 | SourceFile | +| main.rs:75:5:75:11 | ...::i | main.rs:78:1:90:1 | fn i | +| main.rs:79:5:79:11 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:81:13:81:15 | Foo | main.rs:55:1:55:13 | struct Foo | +| main.rs:85:16:85:18 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:88:17:88:19 | Foo | main.rs:84:9:86:9 | struct Foo | +| main.rs:92:5:92:7 | my2 | main.rs:8:1:8:8 | mod my2 | +| main.rs:92:5:92:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | +| main.rs:94:5:94:21 | my2_nested2_alias | my2/mod.rs:1:1:1:16 | mod nested2 | +| main.rs:94:5:94:30 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | +| main.rs:94:34:94:40 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | +| main.rs:94:34:94:43 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:94:57:94:63 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | +| main.rs:94:57:94:66 | ...::g | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:94:80:94:86 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | +| main.rs:105:5:105:11 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:106:5:106:15 | fn_in_macro | main.rs:96:1:102:1 | MacroRules | +| main.rs:106:18:106:24 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:107:5:107:22 | f_defined_in_macro | main.rs:106:18:106:42 | fn f_defined_in_macro | +| main.rs:112:9:112:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:118:9:118:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:122:9:122:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:125:13:125:17 | super | main.rs:1:1:873:2 | SourceFile | +| main.rs:125:13:125:21 | ...::m5 | main.rs:110:1:114:1 | mod m5 | +| main.rs:126:9:126:9 | f | main.rs:111:5:113:5 | fn f | +| main.rs:126:9:126:9 | f | main.rs:117:5:119:5 | fn f | +| main.rs:133:13:133:15 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:136:16:136:18 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:142:19:142:24 | MyEnum | main.rs:131:5:139:5 | enum MyEnum | +| main.rs:144:9:144:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:145:17:145:22 | MyEnum | main.rs:131:5:139:5 | enum MyEnum | +| main.rs:145:17:145:25 | ...::A | main.rs:132:9:134:9 | A | +| main.rs:146:17:146:22 | MyEnum | main.rs:131:5:139:5 | enum MyEnum | +| main.rs:146:17:146:25 | ...::B | main.rs:134:12:137:9 | B | +| main.rs:147:9:147:14 | MyEnum | main.rs:131:5:139:5 | enum MyEnum | +| main.rs:147:9:147:17 | ...::C | main.rs:137:12:138:9 | C | +| main.rs:156:13:156:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:157:13:157:13 | f | main.rs:164:5:166:5 | fn f | +| main.rs:158:13:158:16 | Self | main.rs:152:5:160:5 | trait MyTrait | +| main.rs:158:13:158:19 | ...::f | main.rs:153:9:153:20 | fn f | +| main.rs:165:9:165:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:169:10:169:16 | MyTrait | main.rs:152:5:160:5 | trait MyTrait | +| main.rs:169:22:169:29 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:171:13:171:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:172:13:172:13 | f | main.rs:164:5:166:5 | fn f | +| main.rs:173:13:173:16 | Self | main.rs:168:5:179:5 | impl MyTrait for MyStruct { ... } | +| main.rs:173:13:173:19 | ...::g | main.rs:176:9:178:9 | fn g | +| main.rs:177:13:177:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:182:10:182:17 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:184:13:184:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:185:13:185:13 | f | main.rs:164:5:166:5 | fn f | +| main.rs:191:17:191:24 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:192:9:192:15 | MyTrait | main.rs:152:5:160:5 | trait MyTrait | +| main.rs:192:9:192:18 | ...::f | main.rs:153:9:153:20 | fn f | +| main.rs:193:9:193:16 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:193:9:193:19 | ...::f | main.rs:169:33:174:9 | fn f | +| main.rs:194:10:194:17 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:195:10:195:16 | MyTrait | main.rs:152:5:160:5 | trait MyTrait | +| main.rs:198:17:198:24 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:200:17:200:24 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:202:9:202:16 | MyStruct | main.rs:162:5:162:22 | struct MyStruct | +| main.rs:202:9:202:19 | ...::h | main.rs:182:21:186:9 | fn h | +| main.rs:211:19:211:22 | self | main.rs:207:1:215:1 | mod m9 | +| main.rs:211:19:211:32 | ...::MyStruct | main.rs:208:5:208:26 | struct MyStruct | +| main.rs:212:9:212:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:213:9:213:12 | self | main.rs:207:1:215:1 | mod m9 | +| main.rs:213:9:213:22 | ...::MyStruct | main.rs:208:5:208:26 | struct MyStruct | +| main.rs:223:12:223:12 | T | main.rs:220:7:220:7 | T | +| main.rs:228:12:228:12 | T | main.rs:227:14:227:14 | T | +| main.rs:230:7:232:7 | MyStruct::<...> | main.rs:218:5:224:5 | struct MyStruct | +| main.rs:231:9:231:9 | T | main.rs:227:14:227:14 | T | +| main.rs:234:9:234:16 | MyStruct | main.rs:218:5:224:5 | struct MyStruct | +| main.rs:244:17:244:19 | Foo | main.rs:239:5:239:21 | struct Foo | +| main.rs:245:9:245:11 | Foo | main.rs:241:5:241:15 | fn Foo | +| main.rs:254:9:254:11 | Bar | main.rs:250:5:252:5 | enum Bar | +| main.rs:254:9:254:19 | ...::FooBar | main.rs:251:9:251:17 | FooBar | +| main.rs:259:13:259:15 | Foo | main.rs:239:5:239:21 | struct Foo | +| main.rs:260:17:260:22 | FooBar | main.rs:251:9:251:17 | FooBar | +| main.rs:261:17:261:22 | FooBar | main.rs:256:5:256:18 | fn FooBar | +| main.rs:269:9:269:9 | E | main.rs:264:15:267:5 | enum E | +| main.rs:269:9:269:12 | ...::C | main.rs:266:9:266:9 | C | +| main.rs:272:17:272:17 | S | main.rs:264:5:264:13 | struct S | +| main.rs:273:17:273:17 | C | main.rs:266:9:266:9 | C | +| main.rs:286:16:286:16 | T | main.rs:280:7:280:7 | T | +| main.rs:287:14:287:17 | Self | main.rs:278:5:288:5 | trait MyParamTrait | +| main.rs:287:14:287:33 | ...::AssociatedType | main.rs:282:9:282:28 | type AssociatedType | +| main.rs:296:13:296:16 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | +| main.rs:296:13:296:21 | ...::m13 | main.rs:291:1:304:1 | mod m13 | +| main.rs:296:13:296:24 | ...::f | main.rs:292:5:292:17 | fn f | +| main.rs:296:13:296:24 | ...::f | main.rs:292:19:293:19 | struct f | +| main.rs:299:17:299:17 | f | main.rs:292:19:293:19 | struct f | +| main.rs:300:21:300:21 | f | main.rs:292:19:293:19 | struct f | +| main.rs:301:13:301:13 | f | main.rs:292:5:292:17 | fn f | +| main.rs:315:9:315:14 | Trait1 | main.rs:307:5:311:5 | trait Trait1 | +| main.rs:317:13:317:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:318:13:318:16 | Self | main.rs:313:5:321:5 | trait Trait2 | +| main.rs:318:13:318:19 | ...::g | main.rs:310:9:310:20 | fn g | +| main.rs:328:9:328:12 | Self | main.rs:323:5:336:5 | trait Trait3 | +| main.rs:328:15:328:20 | Trait1 | main.rs:307:5:311:5 | trait Trait1 | +| main.rs:329:9:329:10 | TT | main.rs:325:9:325:10 | TT | +| main.rs:329:13:329:18 | Trait1 | main.rs:307:5:311:5 | trait Trait1 | +| main.rs:331:25:331:26 | TT | main.rs:325:9:325:10 | TT | +| main.rs:332:13:332:16 | Self | main.rs:323:5:336:5 | trait Trait3 | +| main.rs:332:13:332:19 | ...::g | main.rs:310:9:310:20 | fn g | +| main.rs:333:13:333:14 | TT | main.rs:325:9:325:10 | TT | +| main.rs:333:13:333:17 | ...::g | main.rs:310:9:310:20 | fn g | +| main.rs:341:10:341:15 | Trait1 | main.rs:307:5:311:5 | trait Trait1 | +| main.rs:342:11:342:11 | S | main.rs:338:5:338:13 | struct S | +| main.rs:344:13:344:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:345:13:345:16 | Self | main.rs:340:5:352:5 | impl Trait1 for S { ... } | +| main.rs:345:13:345:19 | ...::g | main.rs:349:9:351:9 | fn g | +| main.rs:350:13:350:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:355:10:355:15 | Trait2 | main.rs:313:5:321:5 | trait Trait2 | +| main.rs:356:11:356:11 | S | main.rs:338:5:338:13 | struct S | +| main.rs:358:13:358:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:364:9:364:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:365:17:365:17 | S | main.rs:338:5:338:13 | struct S | +| main.rs:366:10:366:10 | S | main.rs:338:5:338:13 | struct S | +| main.rs:367:14:367:19 | Trait1 | main.rs:307:5:311:5 | trait Trait1 | +| main.rs:369:10:369:10 | S | main.rs:338:5:338:13 | struct S | +| main.rs:370:14:370:19 | Trait2 | main.rs:313:5:321:5 | trait Trait2 | +| main.rs:372:9:372:9 | S | main.rs:338:5:338:13 | struct S | +| main.rs:372:9:372:12 | ...::g | main.rs:349:9:351:9 | fn g | +| main.rs:382:24:382:24 | T | main.rs:380:7:380:7 | T | +| main.rs:384:24:384:24 | T | main.rs:380:7:380:7 | T | +| main.rs:387:24:387:24 | T | main.rs:380:7:380:7 | T | +| main.rs:388:13:388:16 | Self | main.rs:378:5:394:5 | trait Trait1 | +| main.rs:388:13:388:19 | ...::g | main.rs:384:9:385:9 | fn g | +| main.rs:392:18:392:18 | T | main.rs:380:7:380:7 | T | +| main.rs:400:9:402:9 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | +| main.rs:401:11:401:11 | T | main.rs:398:7:398:7 | T | +| main.rs:403:24:403:24 | T | main.rs:398:7:398:7 | T | +| main.rs:404:13:404:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:405:13:405:16 | Self | main.rs:396:5:409:5 | trait Trait2 | +| main.rs:405:13:405:19 | ...::g | main.rs:384:9:385:9 | fn g | +| main.rs:407:13:407:16 | Self | main.rs:396:5:409:5 | trait Trait2 | +| main.rs:407:13:407:19 | ...::c | main.rs:392:9:393:9 | Const | +| main.rs:414:10:416:5 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | +| main.rs:415:7:415:7 | S | main.rs:411:5:411:13 | struct S | +| main.rs:417:11:417:11 | S | main.rs:411:5:411:13 | struct S | +| main.rs:418:24:418:24 | S | main.rs:411:5:411:13 | struct S | +| main.rs:419:13:419:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:420:13:420:16 | Self | main.rs:413:5:431:5 | impl Trait1::<...> for S { ... } | +| main.rs:420:13:420:19 | ...::g | main.rs:424:9:427:9 | fn g | +| main.rs:424:24:424:24 | S | main.rs:411:5:411:13 | struct S | +| main.rs:425:13:425:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:426:13:426:16 | Self | main.rs:413:5:431:5 | impl Trait1::<...> for S { ... } | +| main.rs:426:13:426:19 | ...::c | main.rs:429:9:430:9 | Const | +| main.rs:429:18:429:18 | S | main.rs:411:5:411:13 | struct S | +| main.rs:429:22:429:22 | S | main.rs:411:5:411:13 | struct S | +| main.rs:434:10:436:5 | Trait2::<...> | main.rs:396:5:409:5 | trait Trait2 | +| main.rs:435:7:435:7 | S | main.rs:411:5:411:13 | struct S | +| main.rs:437:11:437:11 | S | main.rs:411:5:411:13 | struct S | +| main.rs:438:24:438:24 | S | main.rs:411:5:411:13 | struct S | +| main.rs:439:13:439:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:440:13:440:16 | Self | main.rs:433:5:442:5 | impl Trait2::<...> for S { ... } | +| main.rs:446:9:446:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:447:17:447:17 | S | main.rs:411:5:411:13 | struct S | +| main.rs:448:10:448:10 | S | main.rs:411:5:411:13 | struct S | +| main.rs:449:14:451:11 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | +| main.rs:450:13:450:13 | S | main.rs:411:5:411:13 | struct S | +| main.rs:453:10:453:10 | S | main.rs:411:5:411:13 | struct S | +| main.rs:454:14:456:11 | Trait2::<...> | main.rs:396:5:409:5 | trait Trait2 | +| main.rs:455:13:455:13 | S | main.rs:411:5:411:13 | struct S | +| main.rs:458:9:458:9 | S | main.rs:411:5:411:13 | struct S | +| main.rs:458:9:458:12 | ...::g | main.rs:424:9:427:9 | fn g | +| main.rs:460:9:460:9 | S | main.rs:411:5:411:13 | struct S | +| main.rs:460:9:460:12 | ...::h | main.rs:387:9:390:9 | fn h | +| main.rs:462:9:462:9 | S | main.rs:411:5:411:13 | struct S | +| main.rs:462:9:462:12 | ...::c | main.rs:429:9:430:9 | Const | +| main.rs:463:10:463:10 | S | main.rs:411:5:411:13 | struct S | +| main.rs:464:14:466:11 | Trait1::<...> | main.rs:378:5:394:5 | trait Trait1 | +| main.rs:465:13:465:13 | S | main.rs:411:5:411:13 | struct S | +| main.rs:483:14:483:16 | Foo | main.rs:473:9:475:9 | trait Foo | +| main.rs:483:22:483:22 | X | main.rs:481:9:481:21 | struct X | +| main.rs:485:17:485:23 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:489:14:489:16 | Bar | main.rs:477:9:479:9 | trait Bar | +| main.rs:489:22:489:22 | X | main.rs:481:9:481:21 | struct X | +| main.rs:491:17:491:23 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:496:9:496:9 | m | main.rs:472:5:494:5 | mod m | +| main.rs:496:9:496:12 | ...::X | main.rs:481:9:481:21 | struct X | +| main.rs:499:17:499:17 | X | main.rs:481:9:481:21 | struct X | +| main.rs:502:17:502:17 | m | main.rs:472:5:494:5 | mod m | +| main.rs:502:17:502:22 | ...::Foo | main.rs:473:9:475:9 | trait Foo | +| main.rs:503:13:503:13 | X | main.rs:481:9:481:21 | struct X | +| main.rs:503:13:503:23 | ...::a_method | main.rs:483:26:486:13 | fn a_method | +| main.rs:507:17:507:17 | m | main.rs:472:5:494:5 | mod m | +| main.rs:507:17:507:22 | ...::Bar | main.rs:477:9:479:9 | trait Bar | +| main.rs:508:13:508:13 | X | main.rs:481:9:481:21 | struct X | +| main.rs:508:13:508:23 | ...::a_method | main.rs:489:26:492:13 | fn a_method | +| main.rs:512:17:512:17 | m | main.rs:472:5:494:5 | mod m | +| main.rs:512:17:512:22 | ...::Bar | main.rs:477:9:479:9 | trait Bar | +| main.rs:513:13:513:13 | X | main.rs:481:9:481:21 | struct X | +| main.rs:513:13:513:23 | ...::a_method | main.rs:489:26:492:13 | fn a_method | +| main.rs:518:13:518:13 | m | main.rs:472:5:494:5 | mod m | +| main.rs:518:13:518:18 | ...::Bar | main.rs:477:9:479:9 | trait Bar | +| main.rs:518:13:518:28 | ...::a_method | main.rs:478:13:478:31 | fn a_method | +| main.rs:531:10:531:16 | MyTrait | main.rs:524:5:526:5 | trait MyTrait | +| main.rs:532:9:532:9 | S | main.rs:528:5:528:13 | struct S | +| main.rs:534:13:534:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:540:7:540:13 | MyTrait | main.rs:524:5:526:5 | trait MyTrait | +| main.rs:541:10:541:10 | T | main.rs:539:10:539:10 | T | +| main.rs:543:9:543:9 | T | main.rs:539:10:539:10 | T | +| main.rs:543:9:543:12 | ...::f | main.rs:525:9:525:20 | fn f | +| main.rs:544:9:544:15 | MyTrait | main.rs:524:5:526:5 | trait MyTrait | +| main.rs:544:9:544:18 | ...::f | main.rs:525:9:525:20 | fn f | +| main.rs:549:9:549:9 | g | main.rs:538:5:545:5 | fn g | +| main.rs:550:11:550:11 | S | main.rs:528:5:528:13 | struct S | +| main.rs:557:9:557:15 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:562:13:562:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:567:17:567:23 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:568:17:568:21 | super | main.rs:560:5:572:5 | mod m19 | +| main.rs:568:17:568:24 | ...::f | main.rs:561:9:563:9 | fn f | +| main.rs:569:17:569:21 | super | main.rs:560:5:572:5 | mod m19 | +| main.rs:569:17:569:28 | ...::super | main.rs:555:1:573:1 | mod m18 | +| main.rs:569:17:569:31 | ...::f | main.rs:556:5:558:5 | fn f | +| main.rs:586:13:586:17 | super | main.rs:575:1:600:1 | mod m21 | +| main.rs:586:13:586:22 | ...::m22 | main.rs:576:5:582:5 | mod m22 | +| main.rs:586:13:586:30 | ...::MyEnum | main.rs:577:9:579:9 | enum MyEnum | +| main.rs:587:13:587:16 | self | main.rs:577:9:579:9 | enum MyEnum | +| main.rs:591:13:591:17 | super | main.rs:575:1:600:1 | mod m21 | +| main.rs:591:13:591:22 | ...::m22 | main.rs:576:5:582:5 | mod m22 | +| main.rs:591:13:591:32 | ...::MyStruct | main.rs:581:9:581:28 | struct MyStruct | +| main.rs:592:13:592:16 | self | main.rs:581:9:581:28 | struct MyStruct | +| main.rs:596:21:596:26 | MyEnum | main.rs:577:9:579:9 | enum MyEnum | +| main.rs:596:21:596:29 | ...::A | main.rs:578:13:578:13 | A | +| main.rs:597:21:597:28 | MyStruct | main.rs:581:9:581:28 | struct MyStruct | +| main.rs:613:10:615:5 | Trait1::<...> | main.rs:603:5:608:5 | trait Trait1 | +| main.rs:614:7:614:10 | Self | main.rs:610:5:610:13 | struct S | +| main.rs:616:11:616:11 | S | main.rs:610:5:610:13 | struct S | +| main.rs:618:13:618:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:624:17:624:17 | S | main.rs:610:5:610:13 | struct S | +| main.rs:640:15:640:15 | T | main.rs:639:26:639:26 | T | +| main.rs:645:9:645:24 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | +| main.rs:645:23:645:23 | T | main.rs:644:10:644:10 | T | +| main.rs:647:9:647:9 | T | main.rs:644:10:644:10 | T | +| main.rs:647:12:647:17 | TraitA | main.rs:630:5:632:5 | trait TraitA | +| main.rs:656:9:656:24 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | +| main.rs:656:23:656:23 | T | main.rs:655:10:655:10 | T | +| main.rs:658:9:658:9 | T | main.rs:655:10:655:10 | T | +| main.rs:658:12:658:17 | TraitB | main.rs:634:5:636:5 | trait TraitB | +| main.rs:659:9:659:9 | T | main.rs:655:10:655:10 | T | +| main.rs:659:12:659:17 | TraitA | main.rs:630:5:632:5 | trait TraitA | +| main.rs:670:10:670:15 | TraitA | main.rs:630:5:632:5 | trait TraitA | +| main.rs:670:21:670:31 | Implementor | main.rs:667:5:667:23 | struct Implementor | +| main.rs:672:13:672:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:677:10:677:15 | TraitB | main.rs:634:5:636:5 | trait TraitB | +| main.rs:677:21:677:31 | Implementor | main.rs:667:5:667:23 | struct Implementor | +| main.rs:679:13:679:19 | println | {EXTERNAL LOCATION} | MacroRules | +| main.rs:685:24:685:34 | Implementor | main.rs:667:5:667:23 | struct Implementor | +| main.rs:686:23:686:35 | GenericStruct | main.rs:638:5:641:5 | struct GenericStruct | +| main.rs:692:9:692:36 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | +| main.rs:692:9:692:50 | ...::call_trait_a | main.rs:649:9:651:9 | fn call_trait_a | +| main.rs:692:25:692:35 | Implementor | main.rs:667:5:667:23 | struct Implementor | +| main.rs:695:9:695:36 | GenericStruct::<...> | main.rs:638:5:641:5 | struct GenericStruct | +| main.rs:695:9:695:47 | ...::call_both | main.rs:661:9:664:9 | fn call_both | +| main.rs:695:25:695:35 | Implementor | main.rs:667:5:667:23 | struct Implementor | +| main.rs:701:3:701:12 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:701:3:701:24 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | +| main.rs:705:6:705:12 | AStruct | main.rs:704:1:704:17 | struct AStruct | +| main.rs:707:7:707:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:707:7:707:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | +| main.rs:710:7:710:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:710:7:710:28 | ...::add_suffix | proc_macro.rs:4:1:13:1 | fn add_suffix | | main.rs:715:9:715:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:715:9:715:19 | ...::result | {EXTERNAL LOCATION} | mod result | -| main.rs:715:9:715:27 | ...::Result | {EXTERNAL LOCATION} | enum Result | -| main.rs:723:19:723:22 | Self | main.rs:717:5:725:5 | trait Reduce | -| main.rs:723:19:723:29 | ...::Input | main.rs:718:9:718:19 | type Input | -| main.rs:724:14:724:46 | Result::<...> | {EXTERNAL LOCATION} | enum Result | -| main.rs:724:21:724:24 | Self | main.rs:717:5:725:5 | trait Reduce | -| main.rs:724:21:724:32 | ...::Output | main.rs:719:21:720:20 | type Output | -| main.rs:724:35:724:38 | Self | main.rs:717:5:725:5 | trait Reduce | -| main.rs:724:35:724:45 | ...::Error | main.rs:718:21:719:19 | type Error | -| main.rs:728:17:728:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData | -| main.rs:728:29:728:33 | Input | main.rs:727:19:727:23 | Input | +| main.rs:715:9:715:19 | ...::marker | {EXTERNAL LOCATION} | mod marker | +| main.rs:715:9:715:32 | ...::PhantomData | {EXTERNAL LOCATION} | struct PhantomData | +| main.rs:716:9:716:11 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:716:9:716:19 | ...::result | {EXTERNAL LOCATION} | mod result | +| main.rs:716:9:716:27 | ...::Result | {EXTERNAL LOCATION} | enum Result | +| main.rs:724:19:724:22 | Self | main.rs:718:5:726:5 | trait Reduce | +| main.rs:724:19:724:29 | ...::Input | main.rs:719:9:719:19 | type Input | +| main.rs:725:14:725:46 | Result::<...> | {EXTERNAL LOCATION} | enum Result | +| main.rs:725:21:725:24 | Self | main.rs:718:5:726:5 | trait Reduce | +| main.rs:725:21:725:32 | ...::Output | main.rs:720:21:721:20 | type Output | +| main.rs:725:35:725:38 | Self | main.rs:718:5:726:5 | trait Reduce | +| main.rs:725:35:725:45 | ...::Error | main.rs:719:21:720:19 | type Error | | main.rs:729:17:729:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData | -| main.rs:729:29:729:33 | Error | main.rs:727:26:727:30 | Error | -| main.rs:736:11:736:16 | Reduce | main.rs:717:5:725:5 | trait Reduce | -| main.rs:737:13:740:9 | MyImpl::<...> | main.rs:727:5:730:5 | struct MyImpl | -| main.rs:738:13:738:17 | Input | main.rs:734:13:734:17 | Input | -| main.rs:739:13:739:17 | Error | main.rs:735:13:735:17 | Error | -| main.rs:742:22:745:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | -| main.rs:743:13:743:17 | Input | main.rs:734:13:734:17 | Input | -| main.rs:744:13:744:16 | Self | main.rs:732:5:764:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:744:13:744:23 | ...::Error | main.rs:746:11:750:9 | type Error | -| main.rs:747:22:749:9 | Option::<...> | {EXTERNAL LOCATION} | enum Option | -| main.rs:748:11:748:15 | Error | main.rs:735:13:735:17 | Error | -| main.rs:752:13:752:17 | Input | main.rs:734:13:734:17 | Input | -| main.rs:757:19:757:22 | Self | main.rs:732:5:764:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:757:19:757:29 | ...::Input | main.rs:742:9:746:9 | type Input | -| main.rs:758:14:761:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | -| main.rs:759:13:759:16 | Self | main.rs:732:5:764:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:759:13:759:24 | ...::Output | main.rs:750:11:753:9 | type Output | -| main.rs:760:13:760:16 | Self | main.rs:732:5:764:5 | impl Reduce for MyImpl::<...> { ... } | -| main.rs:760:13:760:23 | ...::Error | main.rs:746:11:750:9 | type Error | -| main.rs:767:5:767:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:767:11:767:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:769:15:769:17 | ztd | {EXTERNAL LOCATION} | Crate(std@0.0.0) | -| main.rs:769:15:769:25 | ...::string | {EXTERNAL LOCATION} | mod string | -| main.rs:769:15:769:33 | ...::String | {EXTERNAL LOCATION} | struct String | -| main.rs:779:7:779:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | -| main.rs:779:7:779:26 | ...::identity | proc_macro.rs:15:1:18:1 | fn identity | -| main.rs:780:10:780:15 | ATrait | main.rs:775:5:777:5 | trait ATrait | -| main.rs:780:21:780:23 | i64 | {EXTERNAL LOCATION} | struct i64 | -| main.rs:782:11:782:13 | i64 | {EXTERNAL LOCATION} | struct i64 | -| main.rs:788:17:788:19 | Foo | main.rs:773:5:773:15 | struct Foo | -| main.rs:793:5:793:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:793:5:793:14 | ...::nested | my.rs:1:1:1:15 | mod nested | -| main.rs:793:5:793:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | -| main.rs:793:5:793:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | -| main.rs:793:5:793:35 | ...::f | my/nested.rs:3:9:5:9 | fn f | -| main.rs:794:5:794:6 | my | main.rs:1:1:1:7 | mod my | -| main.rs:794:5:794:9 | ...::f | my.rs:5:1:7:1 | fn f | -| main.rs:795:5:795:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | -| main.rs:795:5:795:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | -| main.rs:795:5:795:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | -| main.rs:795:5:795:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:796:5:796:5 | f | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:797:5:797:5 | g | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:798:5:798:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) | -| main.rs:798:5:798:12 | ...::h | main.rs:56:1:75:1 | fn h | -| main.rs:799:5:799:6 | m1 | main.rs:19:1:43:1 | mod m1 | -| main.rs:799:5:799:10 | ...::m2 | main.rs:24:5:42:5 | mod m2 | -| main.rs:799:5:799:13 | ...::g | main.rs:29:9:33:9 | fn g | -| main.rs:800:5:800:6 | m1 | main.rs:19:1:43:1 | mod m1 | -| main.rs:800:5:800:10 | ...::m2 | main.rs:24:5:42:5 | mod m2 | -| main.rs:800:5:800:14 | ...::m3 | main.rs:35:9:41:9 | mod m3 | -| main.rs:800:5:800:17 | ...::h | main.rs:36:27:40:13 | fn h | -| main.rs:801:5:801:6 | m4 | main.rs:45:1:52:1 | mod m4 | -| main.rs:801:5:801:9 | ...::i | main.rs:48:5:51:5 | fn i | -| main.rs:802:5:802:5 | h | main.rs:56:1:75:1 | fn h | -| main.rs:803:5:803:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f | -| main.rs:804:5:804:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g | -| main.rs:805:5:805:5 | j | main.rs:103:1:107:1 | fn j | -| main.rs:806:5:806:6 | m6 | main.rs:115:1:127:1 | mod m6 | -| main.rs:806:5:806:9 | ...::g | main.rs:120:5:126:5 | fn g | -| main.rs:807:5:807:6 | m7 | main.rs:129:1:148:1 | mod m7 | -| main.rs:807:5:807:9 | ...::f | main.rs:140:5:147:5 | fn f | -| main.rs:808:5:808:6 | m8 | main.rs:150:1:204:1 | mod m8 | -| main.rs:808:5:808:9 | ...::g | main.rs:188:5:203:5 | fn g | -| main.rs:809:5:809:6 | m9 | main.rs:206:1:214:1 | mod m9 | -| main.rs:809:5:809:9 | ...::f | main.rs:209:5:213:5 | fn f | -| main.rs:810:5:810:7 | m11 | main.rs:237:1:274:1 | mod m11 | -| main.rs:810:5:810:10 | ...::f | main.rs:242:5:245:5 | fn f | -| main.rs:811:5:811:7 | m15 | main.rs:305:1:374:1 | mod m15 | -| main.rs:811:5:811:10 | ...::f | main.rs:361:5:373:5 | fn f | -| main.rs:812:5:812:7 | m16 | main.rs:376:1:468:1 | mod m16 | -| main.rs:812:5:812:10 | ...::f | main.rs:443:5:467:5 | fn f | -| main.rs:813:5:813:20 | trait_visibility | main.rs:470:1:520:1 | mod trait_visibility | -| main.rs:813:5:813:23 | ...::f | main.rs:497:5:519:5 | fn f | -| main.rs:814:5:814:7 | m17 | main.rs:522:1:552:1 | mod m17 | -| main.rs:814:5:814:10 | ...::f | main.rs:546:5:551:5 | fn f | -| main.rs:815:5:815:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 | -| main.rs:815:5:815:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f | -| main.rs:816:5:816:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 | -| main.rs:816:5:816:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f | -| main.rs:817:5:817:7 | my3 | my2/mod.rs:20:1:20:12 | mod my3 | -| main.rs:817:5:817:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f | -| main.rs:818:5:818:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | -| main.rs:819:5:819:7 | m18 | main.rs:554:1:572:1 | mod m18 | -| main.rs:819:5:819:12 | ...::m19 | main.rs:559:5:571:5 | mod m19 | -| main.rs:819:5:819:17 | ...::m20 | main.rs:564:9:570:9 | mod m20 | -| main.rs:819:5:819:20 | ...::g | main.rs:565:13:569:13 | fn g | -| main.rs:820:5:820:7 | m23 | main.rs:601:1:626:1 | mod m23 | -| main.rs:820:5:820:10 | ...::f | main.rs:621:5:625:5 | fn f | -| main.rs:821:5:821:7 | m24 | main.rs:628:1:696:1 | mod m24 | -| main.rs:821:5:821:10 | ...::f | main.rs:682:5:695:5 | fn f | -| main.rs:822:5:822:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | -| main.rs:822:5:822:11 | ...::h | main.rs:56:1:75:1 | fn h | -| main.rs:823:5:823:13 | z_changed | main.rs:701:1:701:9 | fn z_changed | -| main.rs:824:5:824:11 | AStruct | main.rs:703:1:703:17 | struct AStruct | -| main.rs:824:5:824:22 | ...::z_on_type | main.rs:707:5:707:17 | fn z_on_type | -| main.rs:825:5:825:11 | AStruct | main.rs:703:1:703:17 | struct AStruct | -| main.rs:826:5:826:29 | impl_with_attribute_macro | main.rs:771:1:790:1 | mod impl_with_attribute_macro | -| main.rs:826:5:826:35 | ...::test | main.rs:786:5:789:5 | fn test | +| main.rs:729:29:729:33 | Input | main.rs:728:19:728:23 | Input | +| main.rs:730:17:730:34 | PhantomData::<...> | {EXTERNAL LOCATION} | struct PhantomData | +| main.rs:730:29:730:33 | Error | main.rs:728:26:728:30 | Error | +| main.rs:737:11:737:16 | Reduce | main.rs:718:5:726:5 | trait Reduce | +| main.rs:738:13:741:9 | MyImpl::<...> | main.rs:728:5:731:5 | struct MyImpl | +| main.rs:739:13:739:17 | Input | main.rs:735:13:735:17 | Input | +| main.rs:740:13:740:17 | Error | main.rs:736:13:736:17 | Error | +| main.rs:743:22:746:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | +| main.rs:744:13:744:17 | Input | main.rs:735:13:735:17 | Input | +| main.rs:745:13:745:16 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | +| main.rs:745:13:745:23 | ...::Error | main.rs:747:11:751:9 | type Error | +| main.rs:748:22:750:9 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:749:11:749:15 | Error | main.rs:736:13:736:17 | Error | +| main.rs:753:13:753:17 | Input | main.rs:735:13:735:17 | Input | +| main.rs:758:19:758:22 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | +| main.rs:758:19:758:29 | ...::Input | main.rs:743:9:747:9 | type Input | +| main.rs:759:14:762:9 | Result::<...> | {EXTERNAL LOCATION} | enum Result | +| main.rs:760:13:760:16 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | +| main.rs:760:13:760:24 | ...::Output | main.rs:751:11:754:9 | type Output | +| main.rs:761:13:761:16 | Self | main.rs:733:5:765:5 | impl Reduce for MyImpl::<...> { ... } | +| main.rs:761:13:761:23 | ...::Error | main.rs:747:11:751:9 | type Error | +| main.rs:768:5:768:7 | std | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:768:11:768:14 | self | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:770:15:770:17 | ztd | {EXTERNAL LOCATION} | Crate(std@0.0.0) | +| main.rs:770:15:770:25 | ...::string | {EXTERNAL LOCATION} | mod string | +| main.rs:770:15:770:33 | ...::String | {EXTERNAL LOCATION} | struct String | +| main.rs:780:7:780:16 | proc_macro | proc_macro.rs:0:0:0:0 | Crate(proc_macro@0.0.1) | +| main.rs:780:7:780:26 | ...::identity | proc_macro.rs:15:1:18:1 | fn identity | +| main.rs:781:10:781:15 | ATrait | main.rs:776:5:778:5 | trait ATrait | +| main.rs:781:21:781:23 | i64 | {EXTERNAL LOCATION} | struct i64 | +| main.rs:783:11:783:13 | i64 | {EXTERNAL LOCATION} | struct i64 | +| main.rs:789:17:789:19 | Foo | main.rs:774:5:774:15 | struct Foo | +| main.rs:795:22:795:32 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:795:29:795:31 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:796:17:796:20 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:797:17:797:27 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:797:24:797:26 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:798:13:798:16 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:799:17:799:20 | None | {EXTERNAL LOCATION} | None | +| main.rs:801:13:801:16 | None | {EXTERNAL LOCATION} | None | +| main.rs:802:17:802:20 | None | {EXTERNAL LOCATION} | None | +| main.rs:811:19:811:29 | Option::<...> | {EXTERNAL LOCATION} | enum Option | +| main.rs:811:26:811:28 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:812:26:812:29 | test | main.rs:794:5:808:5 | fn test | +| main.rs:818:14:818:16 | i32 | {EXTERNAL LOCATION} | struct i32 | +| main.rs:823:17:823:20 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:825:13:825:16 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:830:13:830:16 | Some | {EXTERNAL LOCATION} | Some | +| main.rs:830:18:830:18 | z | main.rs:817:5:819:12 | Const | +| main.rs:830:24:830:24 | z | main.rs:817:5:819:12 | Const | +| main.rs:837:5:837:6 | my | main.rs:1:1:1:7 | mod my | +| main.rs:837:5:837:14 | ...::nested | my.rs:1:1:1:15 | mod nested | +| main.rs:837:5:837:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 | +| main.rs:837:5:837:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 | +| main.rs:837:5:837:35 | ...::f | my/nested.rs:3:9:5:9 | fn f | +| main.rs:838:5:838:6 | my | main.rs:1:1:1:7 | mod my | +| main.rs:838:5:838:9 | ...::f | my.rs:5:1:7:1 | fn f | +| main.rs:839:5:839:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | +| main.rs:839:5:839:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | +| main.rs:839:5:839:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 | +| main.rs:839:5:839:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:840:5:840:5 | f | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:841:5:841:5 | g | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:842:5:842:9 | crate | main.rs:0:0:0:0 | Crate(main@0.0.1) | +| main.rs:842:5:842:12 | ...::h | main.rs:57:1:76:1 | fn h | +| main.rs:843:5:843:6 | m1 | main.rs:20:1:44:1 | mod m1 | +| main.rs:843:5:843:10 | ...::m2 | main.rs:25:5:43:5 | mod m2 | +| main.rs:843:5:843:13 | ...::g | main.rs:30:9:34:9 | fn g | +| main.rs:844:5:844:6 | m1 | main.rs:20:1:44:1 | mod m1 | +| main.rs:844:5:844:10 | ...::m2 | main.rs:25:5:43:5 | mod m2 | +| main.rs:844:5:844:14 | ...::m3 | main.rs:36:9:42:9 | mod m3 | +| main.rs:844:5:844:17 | ...::h | main.rs:37:27:41:13 | fn h | +| main.rs:845:5:845:6 | m4 | main.rs:46:1:53:1 | mod m4 | +| main.rs:845:5:845:9 | ...::i | main.rs:49:5:52:5 | fn i | +| main.rs:846:5:846:5 | h | main.rs:57:1:76:1 | fn h | +| main.rs:847:5:847:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f | +| main.rs:848:5:848:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g | +| main.rs:849:5:849:5 | j | main.rs:104:1:108:1 | fn j | +| main.rs:850:5:850:6 | m6 | main.rs:116:1:128:1 | mod m6 | +| main.rs:850:5:850:9 | ...::g | main.rs:121:5:127:5 | fn g | +| main.rs:851:5:851:6 | m7 | main.rs:130:1:149:1 | mod m7 | +| main.rs:851:5:851:9 | ...::f | main.rs:141:5:148:5 | fn f | +| main.rs:852:5:852:6 | m8 | main.rs:151:1:205:1 | mod m8 | +| main.rs:852:5:852:9 | ...::g | main.rs:189:5:204:5 | fn g | +| main.rs:853:5:853:6 | m9 | main.rs:207:1:215:1 | mod m9 | +| main.rs:853:5:853:9 | ...::f | main.rs:210:5:214:5 | fn f | +| main.rs:854:5:854:7 | m11 | main.rs:238:1:275:1 | mod m11 | +| main.rs:854:5:854:10 | ...::f | main.rs:243:5:246:5 | fn f | +| main.rs:855:5:855:7 | m15 | main.rs:306:1:375:1 | mod m15 | +| main.rs:855:5:855:10 | ...::f | main.rs:362:5:374:5 | fn f | +| main.rs:856:5:856:7 | m16 | main.rs:377:1:469:1 | mod m16 | +| main.rs:856:5:856:10 | ...::f | main.rs:444:5:468:5 | fn f | +| main.rs:857:5:857:20 | trait_visibility | main.rs:471:1:521:1 | mod trait_visibility | +| main.rs:857:5:857:23 | ...::f | main.rs:498:5:520:5 | fn f | +| main.rs:858:5:858:7 | m17 | main.rs:523:1:553:1 | mod m17 | +| main.rs:858:5:858:10 | ...::f | main.rs:547:5:552:5 | fn f | +| main.rs:859:5:859:11 | nested6 | my2/nested2.rs:14:5:18:5 | mod nested6 | +| main.rs:859:5:859:14 | ...::f | my2/nested2.rs:15:9:17:9 | fn f | +| main.rs:860:5:860:11 | nested8 | my2/nested2.rs:22:5:26:5 | mod nested8 | +| main.rs:860:5:860:14 | ...::f | my2/nested2.rs:23:9:25:9 | fn f | +| main.rs:861:5:861:7 | my3 | my2/mod.rs:20:1:20:12 | mod my3 | +| main.rs:861:5:861:10 | ...::f | my2/my3/mod.rs:1:1:5:1 | fn f | +| main.rs:862:5:862:12 | nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | +| main.rs:863:5:863:12 | my_alias | main.rs:1:1:1:7 | mod my | +| main.rs:863:5:863:22 | ...::nested_f | my/my4/my5/mod.rs:1:1:3:1 | fn f | +| main.rs:864:5:864:7 | m18 | main.rs:555:1:573:1 | mod m18 | +| main.rs:864:5:864:12 | ...::m19 | main.rs:560:5:572:5 | mod m19 | +| main.rs:864:5:864:17 | ...::m20 | main.rs:565:9:571:9 | mod m20 | +| main.rs:864:5:864:20 | ...::g | main.rs:566:13:570:13 | fn g | +| main.rs:865:5:865:7 | m23 | main.rs:602:1:627:1 | mod m23 | +| main.rs:865:5:865:10 | ...::f | main.rs:622:5:626:5 | fn f | +| main.rs:866:5:866:7 | m24 | main.rs:629:1:697:1 | mod m24 | +| main.rs:866:5:866:10 | ...::f | main.rs:683:5:696:5 | fn f | +| main.rs:867:5:867:8 | zelf | main.rs:0:0:0:0 | Crate(main@0.0.1) | +| main.rs:867:5:867:11 | ...::h | main.rs:57:1:76:1 | fn h | +| main.rs:868:5:868:13 | z_changed | main.rs:702:1:702:9 | fn z_changed | +| main.rs:869:5:869:11 | AStruct | main.rs:704:1:704:17 | struct AStruct | +| main.rs:869:5:869:22 | ...::z_on_type | main.rs:708:5:708:17 | fn z_on_type | +| main.rs:870:5:870:11 | AStruct | main.rs:704:1:704:17 | struct AStruct | +| main.rs:871:5:871:29 | impl_with_attribute_macro | main.rs:772:1:791:1 | mod impl_with_attribute_macro | +| main.rs:871:5:871:35 | ...::test | main.rs:787:5:790:5 | fn test | +| main.rs:872:5:872:12 | patterns | main.rs:793:1:834:1 | mod patterns | +| main.rs:872:5:872:18 | ...::test | main.rs:794:5:808:5 | fn test | | my2/mod.rs:4:5:4:11 | println | {EXTERNAL LOCATION} | MacroRules | | my2/mod.rs:5:5:5:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 | | my2/mod.rs:5:5:5:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 | @@ -488,10 +512,10 @@ resolvePath | my2/mod.rs:25:9:25:16 | ...::f | my2/renamed.rs:1:1:1:13 | fn f | | my2/my3/mod.rs:2:5:2:11 | println | {EXTERNAL LOCATION} | MacroRules | | my2/my3/mod.rs:3:5:3:5 | g | my2/mod.rs:3:1:6:1 | fn g | -| my2/my3/mod.rs:4:5:4:5 | h | main.rs:56:1:75:1 | fn h | +| my2/my3/mod.rs:4:5:4:5 | h | main.rs:57:1:76:1 | fn h | | my2/my3/mod.rs:7:5:7:9 | super | my2/mod.rs:1:1:25:34 | SourceFile | -| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:827:2 | SourceFile | -| my2/my3/mod.rs:7:5:7:19 | ...::h | main.rs:56:1:75:1 | fn h | +| my2/my3/mod.rs:7:5:7:16 | ...::super | main.rs:1:1:873:2 | SourceFile | +| my2/my3/mod.rs:7:5:7:19 | ...::h | main.rs:57:1:76:1 | fn h | | my2/my3/mod.rs:8:5:8:9 | super | my2/mod.rs:1:1:25:34 | SourceFile | | my2/my3/mod.rs:8:5:8:12 | ...::g | my2/mod.rs:3:1:6:1 | fn g | | my2/my3/mod.rs:10:5:10:9 | super | my2/mod.rs:1:1:25:34 | SourceFile | diff --git a/rust/ql/test/library-tests/path-resolution/path-resolution.ql b/rust/ql/test/library-tests/path-resolution/path-resolution.ql index 0fe49a8e386b..f7955929b839 100644 --- a/rust/ql/test/library-tests/path-resolution/path-resolution.ql +++ b/rust/ql/test/library-tests/path-resolution/path-resolution.ql @@ -5,7 +5,7 @@ import TestUtils query predicate mod(Module m) { toBeTested(m) } -query predicate resolvePath(Path p, ItemNode i) { +query predicate resolvePath(PathExt p, ItemNode i) { toBeTested(p) and not p.isFromMacroExpansion() and i = resolvePath(p) diff --git a/rust/ql/test/library-tests/variables/Cfg.expected b/rust/ql/test/library-tests/variables/Cfg.expected index 7d8da915bfb5..f93586d373be 100644 --- a/rust/ql/test/library-tests/variables/Cfg.expected +++ b/rust/ql/test/library-tests/variables/Cfg.expected @@ -1798,145 +1798,216 @@ edges | main.rs:753:5:753:16 | print_i64(...) | main.rs:744:18:754:1 | { ... } | | | main.rs:753:5:753:17 | ExprStmt | main.rs:753:5:753:13 | print_i64 | | | main.rs:753:15:753:15 | x | main.rs:753:5:753:16 | print_i64(...) | | -| main.rs:756:1:800:1 | enter fn main | main.rs:757:5:757:25 | ExprStmt | | -| main.rs:756:1:800:1 | exit fn main (normal) | main.rs:756:1:800:1 | exit fn main | | -| main.rs:756:11:800:1 | { ... } | main.rs:756:1:800:1 | exit fn main (normal) | | -| main.rs:757:5:757:22 | immutable_variable | main.rs:757:5:757:24 | immutable_variable(...) | | -| main.rs:757:5:757:24 | immutable_variable(...) | main.rs:758:5:758:23 | ExprStmt | | -| main.rs:757:5:757:25 | ExprStmt | main.rs:757:5:757:22 | immutable_variable | | -| main.rs:758:5:758:20 | mutable_variable | main.rs:758:5:758:22 | mutable_variable(...) | | -| main.rs:758:5:758:22 | mutable_variable(...) | main.rs:759:5:759:40 | ExprStmt | | -| main.rs:758:5:758:23 | ExprStmt | main.rs:758:5:758:20 | mutable_variable | | -| main.rs:759:5:759:37 | mutable_variable_immutable_borrow | main.rs:759:5:759:39 | mutable_variable_immutable_borrow(...) | | -| main.rs:759:5:759:39 | mutable_variable_immutable_borrow(...) | main.rs:760:5:760:23 | ExprStmt | | -| main.rs:759:5:759:40 | ExprStmt | main.rs:759:5:759:37 | mutable_variable_immutable_borrow | | -| main.rs:760:5:760:20 | variable_shadow1 | main.rs:760:5:760:22 | variable_shadow1(...) | | -| main.rs:760:5:760:22 | variable_shadow1(...) | main.rs:761:5:761:23 | ExprStmt | | -| main.rs:760:5:760:23 | ExprStmt | main.rs:760:5:760:20 | variable_shadow1 | | -| main.rs:761:5:761:20 | variable_shadow2 | main.rs:761:5:761:22 | variable_shadow2(...) | | -| main.rs:761:5:761:22 | variable_shadow2(...) | main.rs:762:5:762:19 | ExprStmt | | -| main.rs:761:5:761:23 | ExprStmt | main.rs:761:5:761:20 | variable_shadow2 | | -| main.rs:762:5:762:16 | let_pattern1 | main.rs:762:5:762:18 | let_pattern1(...) | | -| main.rs:762:5:762:18 | let_pattern1(...) | main.rs:763:5:763:19 | ExprStmt | | -| main.rs:762:5:762:19 | ExprStmt | main.rs:762:5:762:16 | let_pattern1 | | -| main.rs:763:5:763:16 | let_pattern2 | main.rs:763:5:763:18 | let_pattern2(...) | | -| main.rs:763:5:763:18 | let_pattern2(...) | main.rs:764:5:764:19 | ExprStmt | | -| main.rs:763:5:763:19 | ExprStmt | main.rs:763:5:763:16 | let_pattern2 | | -| main.rs:764:5:764:16 | let_pattern3 | main.rs:764:5:764:18 | let_pattern3(...) | | -| main.rs:764:5:764:18 | let_pattern3(...) | main.rs:765:5:765:19 | ExprStmt | | -| main.rs:764:5:764:19 | ExprStmt | main.rs:764:5:764:16 | let_pattern3 | | -| main.rs:765:5:765:16 | let_pattern4 | main.rs:765:5:765:18 | let_pattern4(...) | | -| main.rs:765:5:765:18 | let_pattern4(...) | main.rs:766:5:766:21 | ExprStmt | | -| main.rs:765:5:765:19 | ExprStmt | main.rs:765:5:765:16 | let_pattern4 | | -| main.rs:766:5:766:18 | match_pattern1 | main.rs:766:5:766:20 | match_pattern1(...) | | -| main.rs:766:5:766:20 | match_pattern1(...) | main.rs:767:5:767:21 | ExprStmt | | -| main.rs:766:5:766:21 | ExprStmt | main.rs:766:5:766:18 | match_pattern1 | | -| main.rs:767:5:767:18 | match_pattern2 | main.rs:767:5:767:20 | match_pattern2(...) | | -| main.rs:767:5:767:20 | match_pattern2(...) | main.rs:768:5:768:21 | ExprStmt | | -| main.rs:767:5:767:21 | ExprStmt | main.rs:767:5:767:18 | match_pattern2 | | -| main.rs:768:5:768:18 | match_pattern3 | main.rs:768:5:768:20 | match_pattern3(...) | | -| main.rs:768:5:768:20 | match_pattern3(...) | main.rs:769:5:769:21 | ExprStmt | | -| main.rs:768:5:768:21 | ExprStmt | main.rs:768:5:768:18 | match_pattern3 | | -| main.rs:769:5:769:18 | match_pattern4 | main.rs:769:5:769:20 | match_pattern4(...) | | -| main.rs:769:5:769:20 | match_pattern4(...) | main.rs:770:5:770:21 | ExprStmt | | -| main.rs:769:5:769:21 | ExprStmt | main.rs:769:5:769:18 | match_pattern4 | | -| main.rs:770:5:770:18 | match_pattern5 | main.rs:770:5:770:20 | match_pattern5(...) | | -| main.rs:770:5:770:20 | match_pattern5(...) | main.rs:771:5:771:21 | ExprStmt | | -| main.rs:770:5:770:21 | ExprStmt | main.rs:770:5:770:18 | match_pattern5 | | -| main.rs:771:5:771:18 | match_pattern6 | main.rs:771:5:771:20 | match_pattern6(...) | | -| main.rs:771:5:771:20 | match_pattern6(...) | main.rs:772:5:772:21 | ExprStmt | | -| main.rs:771:5:771:21 | ExprStmt | main.rs:771:5:771:18 | match_pattern6 | | -| main.rs:772:5:772:18 | match_pattern7 | main.rs:772:5:772:20 | match_pattern7(...) | | -| main.rs:772:5:772:20 | match_pattern7(...) | main.rs:773:5:773:21 | ExprStmt | | -| main.rs:772:5:772:21 | ExprStmt | main.rs:772:5:772:18 | match_pattern7 | | -| main.rs:773:5:773:18 | match_pattern8 | main.rs:773:5:773:20 | match_pattern8(...) | | -| main.rs:773:5:773:20 | match_pattern8(...) | main.rs:774:5:774:21 | ExprStmt | | -| main.rs:773:5:773:21 | ExprStmt | main.rs:773:5:773:18 | match_pattern8 | | -| main.rs:774:5:774:18 | match_pattern9 | main.rs:774:5:774:20 | match_pattern9(...) | | -| main.rs:774:5:774:20 | match_pattern9(...) | main.rs:775:5:775:22 | ExprStmt | | -| main.rs:774:5:774:21 | ExprStmt | main.rs:774:5:774:18 | match_pattern9 | | -| main.rs:775:5:775:19 | match_pattern10 | main.rs:775:5:775:21 | match_pattern10(...) | | -| main.rs:775:5:775:21 | match_pattern10(...) | main.rs:776:5:776:22 | ExprStmt | | -| main.rs:775:5:775:22 | ExprStmt | main.rs:775:5:775:19 | match_pattern10 | | -| main.rs:776:5:776:19 | match_pattern11 | main.rs:776:5:776:21 | match_pattern11(...) | | -| main.rs:776:5:776:21 | match_pattern11(...) | main.rs:777:5:777:22 | ExprStmt | | -| main.rs:776:5:776:22 | ExprStmt | main.rs:776:5:776:19 | match_pattern11 | | -| main.rs:777:5:777:19 | match_pattern12 | main.rs:777:5:777:21 | match_pattern12(...) | | -| main.rs:777:5:777:21 | match_pattern12(...) | main.rs:778:5:778:22 | ExprStmt | | -| main.rs:777:5:777:22 | ExprStmt | main.rs:777:5:777:19 | match_pattern12 | | -| main.rs:778:5:778:19 | match_pattern13 | main.rs:778:5:778:21 | match_pattern13(...) | | -| main.rs:778:5:778:21 | match_pattern13(...) | main.rs:779:5:779:22 | ExprStmt | | -| main.rs:778:5:778:22 | ExprStmt | main.rs:778:5:778:19 | match_pattern13 | | -| main.rs:779:5:779:19 | match_pattern14 | main.rs:779:5:779:21 | match_pattern14(...) | | -| main.rs:779:5:779:21 | match_pattern14(...) | main.rs:780:5:780:22 | ExprStmt | | -| main.rs:779:5:779:22 | ExprStmt | main.rs:779:5:779:19 | match_pattern14 | | -| main.rs:780:5:780:19 | match_pattern15 | main.rs:780:5:780:21 | match_pattern15(...) | | -| main.rs:780:5:780:21 | match_pattern15(...) | main.rs:781:5:781:22 | ExprStmt | | -| main.rs:780:5:780:22 | ExprStmt | main.rs:780:5:780:19 | match_pattern15 | | -| main.rs:781:5:781:19 | match_pattern16 | main.rs:781:5:781:21 | match_pattern16(...) | | -| main.rs:781:5:781:21 | match_pattern16(...) | main.rs:782:5:782:36 | ExprStmt | | -| main.rs:781:5:781:22 | ExprStmt | main.rs:781:5:781:19 | match_pattern16 | | -| main.rs:782:5:782:18 | param_pattern1 | main.rs:782:20:782:22 | "a" | | -| main.rs:782:5:782:35 | param_pattern1(...) | main.rs:783:5:783:37 | ExprStmt | | -| main.rs:782:5:782:36 | ExprStmt | main.rs:782:5:782:18 | param_pattern1 | | -| main.rs:782:20:782:22 | "a" | main.rs:782:26:782:28 | "b" | | -| main.rs:782:25:782:34 | TupleExpr | main.rs:782:5:782:35 | param_pattern1(...) | | -| main.rs:782:26:782:28 | "b" | main.rs:782:31:782:33 | "c" | | -| main.rs:782:31:782:33 | "c" | main.rs:782:25:782:34 | TupleExpr | | -| main.rs:783:5:783:18 | param_pattern2 | main.rs:783:20:783:31 | ...::Left | | -| main.rs:783:5:783:36 | param_pattern2(...) | main.rs:784:5:784:26 | ExprStmt | | -| main.rs:783:5:783:37 | ExprStmt | main.rs:783:5:783:18 | param_pattern2 | | -| main.rs:783:20:783:31 | ...::Left | main.rs:783:33:783:34 | 45 | | -| main.rs:783:20:783:35 | ...::Left(...) | main.rs:783:5:783:36 | param_pattern2(...) | | -| main.rs:783:33:783:34 | 45 | main.rs:783:20:783:35 | ...::Left(...) | | -| main.rs:784:5:784:23 | destruct_assignment | main.rs:784:5:784:25 | destruct_assignment(...) | | -| main.rs:784:5:784:25 | destruct_assignment(...) | main.rs:785:5:785:23 | ExprStmt | | -| main.rs:784:5:784:26 | ExprStmt | main.rs:784:5:784:23 | destruct_assignment | | -| main.rs:785:5:785:20 | closure_variable | main.rs:785:5:785:22 | closure_variable(...) | | -| main.rs:785:5:785:22 | closure_variable(...) | main.rs:786:5:786:22 | ExprStmt | | -| main.rs:785:5:785:23 | ExprStmt | main.rs:785:5:785:20 | closure_variable | | -| main.rs:786:5:786:19 | nested_function | main.rs:786:5:786:21 | nested_function(...) | | -| main.rs:786:5:786:21 | nested_function(...) | main.rs:787:5:787:19 | ExprStmt | | -| main.rs:786:5:786:22 | ExprStmt | main.rs:786:5:786:19 | nested_function | | -| main.rs:787:5:787:16 | for_variable | main.rs:787:5:787:18 | for_variable(...) | | -| main.rs:787:5:787:18 | for_variable(...) | main.rs:788:5:788:17 | ExprStmt | | -| main.rs:787:5:787:19 | ExprStmt | main.rs:787:5:787:16 | for_variable | | -| main.rs:788:5:788:14 | add_assign | main.rs:788:5:788:16 | add_assign(...) | | -| main.rs:788:5:788:16 | add_assign(...) | main.rs:789:5:789:13 | ExprStmt | | -| main.rs:788:5:788:17 | ExprStmt | main.rs:788:5:788:14 | add_assign | | -| main.rs:789:5:789:10 | mutate | main.rs:789:5:789:12 | mutate(...) | | -| main.rs:789:5:789:12 | mutate(...) | main.rs:790:5:790:17 | ExprStmt | | -| main.rs:789:5:789:13 | ExprStmt | main.rs:789:5:789:10 | mutate | | -| main.rs:790:5:790:14 | mutate_arg | main.rs:790:5:790:16 | mutate_arg(...) | | -| main.rs:790:5:790:16 | mutate_arg(...) | main.rs:791:5:791:12 | ExprStmt | | -| main.rs:790:5:790:17 | ExprStmt | main.rs:790:5:790:14 | mutate_arg | | -| main.rs:791:5:791:9 | alias | main.rs:791:5:791:11 | alias(...) | | -| main.rs:791:5:791:11 | alias(...) | main.rs:792:5:792:18 | ExprStmt | | -| main.rs:791:5:791:12 | ExprStmt | main.rs:791:5:791:9 | alias | | -| main.rs:792:5:792:15 | capture_mut | main.rs:792:5:792:17 | capture_mut(...) | | -| main.rs:792:5:792:17 | capture_mut(...) | main.rs:793:5:793:20 | ExprStmt | | -| main.rs:792:5:792:18 | ExprStmt | main.rs:792:5:792:15 | capture_mut | | -| main.rs:793:5:793:17 | capture_immut | main.rs:793:5:793:19 | capture_immut(...) | | -| main.rs:793:5:793:19 | capture_immut(...) | main.rs:794:5:794:26 | ExprStmt | | -| main.rs:793:5:793:20 | ExprStmt | main.rs:793:5:793:17 | capture_immut | | -| main.rs:794:5:794:23 | async_block_capture | main.rs:794:5:794:25 | async_block_capture(...) | | -| main.rs:794:5:794:25 | async_block_capture(...) | main.rs:795:5:795:14 | ExprStmt | | -| main.rs:794:5:794:26 | ExprStmt | main.rs:794:5:794:23 | async_block_capture | | -| main.rs:795:5:795:11 | structs | main.rs:795:5:795:13 | structs(...) | | -| main.rs:795:5:795:13 | structs(...) | main.rs:796:5:796:14 | ExprStmt | | -| main.rs:795:5:795:14 | ExprStmt | main.rs:795:5:795:11 | structs | | -| main.rs:796:5:796:11 | ref_arg | main.rs:796:5:796:13 | ref_arg(...) | | -| main.rs:796:5:796:13 | ref_arg(...) | main.rs:797:5:797:30 | ExprStmt | | -| main.rs:796:5:796:14 | ExprStmt | main.rs:796:5:796:11 | ref_arg | | -| main.rs:797:5:797:27 | ref_methodcall_receiver | main.rs:797:5:797:29 | ref_methodcall_receiver(...) | | -| main.rs:797:5:797:29 | ref_methodcall_receiver(...) | main.rs:798:5:798:23 | ExprStmt | | -| main.rs:797:5:797:30 | ExprStmt | main.rs:797:5:797:27 | ref_methodcall_receiver | | -| main.rs:798:5:798:20 | macro_invocation | main.rs:798:5:798:22 | macro_invocation(...) | | -| main.rs:798:5:798:22 | macro_invocation(...) | main.rs:799:5:799:18 | ExprStmt | | -| main.rs:798:5:798:23 | ExprStmt | main.rs:798:5:798:20 | macro_invocation | | -| main.rs:799:5:799:15 | capture_phi | main.rs:799:5:799:17 | capture_phi(...) | | -| main.rs:799:5:799:17 | capture_phi(...) | main.rs:756:11:800:1 | { ... } | | -| main.rs:799:5:799:18 | ExprStmt | main.rs:799:5:799:15 | capture_phi | | +| main.rs:757:5:772:5 | enter fn test | main.rs:759:9:759:25 | let ... = ... | | +| main.rs:757:5:772:5 | exit fn test (normal) | main.rs:757:5:772:5 | exit fn test | | +| main.rs:758:34:772:5 | { ... } | main.rs:757:5:772:5 | exit fn test (normal) | | +| main.rs:759:9:759:25 | let ... = ... | main.rs:759:17:759:20 | Some | | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | | +| main.rs:759:13:759:13 | x | main.rs:760:9:767:10 | let ... = ... | match | +| main.rs:759:17:759:20 | Some | main.rs:759:22:759:23 | 42 | | +| main.rs:759:17:759:24 | Some(...) | main.rs:759:13:759:13 | x | | +| main.rs:759:22:759:23 | 42 | main.rs:759:17:759:24 | Some(...) | | +| main.rs:760:9:767:10 | let ... = ... | main.rs:761:19:761:19 | x | | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | | +| main.rs:760:13:760:13 | y | main.rs:768:15:768:15 | y | match | +| main.rs:761:13:767:9 | match x { ... } | main.rs:760:13:760:13 | y | | +| main.rs:761:19:761:19 | x | main.rs:762:13:762:19 | Some(...) | | +| main.rs:762:13:762:19 | Some(...) | main.rs:762:18:762:18 | y | match | +| main.rs:762:13:762:19 | Some(...) | main.rs:765:13:765:16 | None | no-match | +| main.rs:762:18:762:18 | y | main.rs:762:18:762:18 | y | | +| main.rs:762:18:762:18 | y | main.rs:763:17:763:20 | None | match | +| main.rs:762:24:764:13 | { ... } | main.rs:761:13:767:9 | match x { ... } | | +| main.rs:763:17:763:20 | None | main.rs:762:24:764:13 | { ... } | | +| main.rs:765:13:765:16 | None | main.rs:765:13:765:16 | None | | +| main.rs:765:13:765:16 | None | main.rs:766:17:766:20 | None | match | +| main.rs:766:17:766:20 | None | main.rs:761:13:767:9 | match x { ... } | | +| main.rs:768:9:771:9 | match y { ... } | main.rs:758:34:772:5 | { ... } | | +| main.rs:768:15:768:15 | y | main.rs:769:13:769:16 | N0ne | | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | | +| main.rs:769:13:769:16 | N0ne | main.rs:770:17:770:20 | N0ne | match | +| main.rs:770:17:770:20 | N0ne | main.rs:768:9:771:9 | match y { ... } | | +| main.rs:774:5:781:5 | enter fn test2 | main.rs:776:9:777:17 | let ... = test | | +| main.rs:774:5:781:5 | exit fn test2 (normal) | main.rs:774:5:781:5 | exit fn test2 | | +| main.rs:775:31:781:5 | { ... } | main.rs:774:5:781:5 | exit fn test2 (normal) | | +| main.rs:776:9:777:17 | let ... = test | main.rs:777:13:777:16 | test | | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | | +| main.rs:776:13:776:22 | test_alias | main.rs:778:9:779:25 | let ... = ... | match | +| main.rs:777:13:777:16 | test | main.rs:776:13:776:22 | test_alias | | +| main.rs:778:9:779:25 | let ... = ... | main.rs:779:13:779:22 | test_alias | | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | | +| main.rs:778:13:778:16 | test | main.rs:780:9:780:12 | test | match | +| main.rs:779:13:779:22 | test_alias | main.rs:779:13:779:24 | test_alias(...) | | +| main.rs:779:13:779:24 | test_alias(...) | main.rs:778:13:778:16 | test | | +| main.rs:780:9:780:12 | test | main.rs:775:31:781:5 | { ... } | | +| main.rs:785:5:798:5 | enter fn test3 | main.rs:787:9:787:24 | let ... = ... | | +| main.rs:785:5:798:5 | exit fn test3 (normal) | main.rs:785:5:798:5 | exit fn test3 | | +| main.rs:786:16:798:5 | { ... } | main.rs:785:5:798:5 | exit fn test3 (normal) | | +| main.rs:787:9:787:24 | let ... = ... | main.rs:787:17:787:20 | Some | | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | | +| main.rs:787:13:787:13 | x | main.rs:788:9:792:10 | ExprStmt | match | +| main.rs:787:17:787:20 | Some | main.rs:787:22:787:22 | 0 | | +| main.rs:787:17:787:23 | Some(...) | main.rs:787:13:787:13 | x | | +| main.rs:787:22:787:22 | 0 | main.rs:787:17:787:23 | Some(...) | | +| main.rs:788:9:792:9 | match x { ... } | main.rs:793:9:797:10 | ExprStmt | | +| main.rs:788:9:792:10 | ExprStmt | main.rs:788:15:788:15 | x | | +| main.rs:788:15:788:15 | x | main.rs:789:13:789:19 | Some(...) | | +| main.rs:789:13:789:19 | Some(...) | main.rs:789:18:789:18 | x | match | +| main.rs:789:13:789:19 | Some(...) | main.rs:791:13:791:13 | _ | no-match | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | | +| main.rs:789:18:789:18 | x | main.rs:790:20:790:20 | x | match | +| main.rs:790:20:790:20 | x | main.rs:788:9:792:9 | match x { ... } | | +| main.rs:791:13:791:13 | _ | main.rs:791:18:791:18 | 0 | match | +| main.rs:791:18:791:18 | 0 | main.rs:788:9:792:9 | match x { ... } | | +| main.rs:793:9:797:9 | match x { ... } | main.rs:786:16:798:5 | { ... } | | +| main.rs:793:9:797:10 | ExprStmt | main.rs:793:15:793:15 | x | | +| main.rs:793:15:793:15 | x | main.rs:794:13:794:19 | Some(...) | | +| main.rs:794:13:794:19 | Some(...) | main.rs:794:18:794:18 | z | match | +| main.rs:794:13:794:19 | Some(...) | main.rs:796:13:796:13 | _ | no-match | +| main.rs:794:18:794:18 | z | main.rs:794:18:794:18 | z | | +| main.rs:794:18:794:18 | z | main.rs:795:17:795:17 | z | match | +| main.rs:794:18:794:18 | z | main.rs:796:13:796:13 | _ | no-match | +| main.rs:795:17:795:17 | z | main.rs:793:9:797:9 | match x { ... } | | +| main.rs:796:13:796:13 | _ | main.rs:796:18:796:18 | 0 | match | +| main.rs:796:18:796:18 | 0 | main.rs:793:9:797:9 | match x { ... } | | +| main.rs:801:1:845:1 | enter fn main | main.rs:802:5:802:25 | ExprStmt | | +| main.rs:801:1:845:1 | exit fn main (normal) | main.rs:801:1:845:1 | exit fn main | | +| main.rs:801:11:845:1 | { ... } | main.rs:801:1:845:1 | exit fn main (normal) | | +| main.rs:802:5:802:22 | immutable_variable | main.rs:802:5:802:24 | immutable_variable(...) | | +| main.rs:802:5:802:24 | immutable_variable(...) | main.rs:803:5:803:23 | ExprStmt | | +| main.rs:802:5:802:25 | ExprStmt | main.rs:802:5:802:22 | immutable_variable | | +| main.rs:803:5:803:20 | mutable_variable | main.rs:803:5:803:22 | mutable_variable(...) | | +| main.rs:803:5:803:22 | mutable_variable(...) | main.rs:804:5:804:40 | ExprStmt | | +| main.rs:803:5:803:23 | ExprStmt | main.rs:803:5:803:20 | mutable_variable | | +| main.rs:804:5:804:37 | mutable_variable_immutable_borrow | main.rs:804:5:804:39 | mutable_variable_immutable_borrow(...) | | +| main.rs:804:5:804:39 | mutable_variable_immutable_borrow(...) | main.rs:805:5:805:23 | ExprStmt | | +| main.rs:804:5:804:40 | ExprStmt | main.rs:804:5:804:37 | mutable_variable_immutable_borrow | | +| main.rs:805:5:805:20 | variable_shadow1 | main.rs:805:5:805:22 | variable_shadow1(...) | | +| main.rs:805:5:805:22 | variable_shadow1(...) | main.rs:806:5:806:23 | ExprStmt | | +| main.rs:805:5:805:23 | ExprStmt | main.rs:805:5:805:20 | variable_shadow1 | | +| main.rs:806:5:806:20 | variable_shadow2 | main.rs:806:5:806:22 | variable_shadow2(...) | | +| main.rs:806:5:806:22 | variable_shadow2(...) | main.rs:807:5:807:19 | ExprStmt | | +| main.rs:806:5:806:23 | ExprStmt | main.rs:806:5:806:20 | variable_shadow2 | | +| main.rs:807:5:807:16 | let_pattern1 | main.rs:807:5:807:18 | let_pattern1(...) | | +| main.rs:807:5:807:18 | let_pattern1(...) | main.rs:808:5:808:19 | ExprStmt | | +| main.rs:807:5:807:19 | ExprStmt | main.rs:807:5:807:16 | let_pattern1 | | +| main.rs:808:5:808:16 | let_pattern2 | main.rs:808:5:808:18 | let_pattern2(...) | | +| main.rs:808:5:808:18 | let_pattern2(...) | main.rs:809:5:809:19 | ExprStmt | | +| main.rs:808:5:808:19 | ExprStmt | main.rs:808:5:808:16 | let_pattern2 | | +| main.rs:809:5:809:16 | let_pattern3 | main.rs:809:5:809:18 | let_pattern3(...) | | +| main.rs:809:5:809:18 | let_pattern3(...) | main.rs:810:5:810:19 | ExprStmt | | +| main.rs:809:5:809:19 | ExprStmt | main.rs:809:5:809:16 | let_pattern3 | | +| main.rs:810:5:810:16 | let_pattern4 | main.rs:810:5:810:18 | let_pattern4(...) | | +| main.rs:810:5:810:18 | let_pattern4(...) | main.rs:811:5:811:21 | ExprStmt | | +| main.rs:810:5:810:19 | ExprStmt | main.rs:810:5:810:16 | let_pattern4 | | +| main.rs:811:5:811:18 | match_pattern1 | main.rs:811:5:811:20 | match_pattern1(...) | | +| main.rs:811:5:811:20 | match_pattern1(...) | main.rs:812:5:812:21 | ExprStmt | | +| main.rs:811:5:811:21 | ExprStmt | main.rs:811:5:811:18 | match_pattern1 | | +| main.rs:812:5:812:18 | match_pattern2 | main.rs:812:5:812:20 | match_pattern2(...) | | +| main.rs:812:5:812:20 | match_pattern2(...) | main.rs:813:5:813:21 | ExprStmt | | +| main.rs:812:5:812:21 | ExprStmt | main.rs:812:5:812:18 | match_pattern2 | | +| main.rs:813:5:813:18 | match_pattern3 | main.rs:813:5:813:20 | match_pattern3(...) | | +| main.rs:813:5:813:20 | match_pattern3(...) | main.rs:814:5:814:21 | ExprStmt | | +| main.rs:813:5:813:21 | ExprStmt | main.rs:813:5:813:18 | match_pattern3 | | +| main.rs:814:5:814:18 | match_pattern4 | main.rs:814:5:814:20 | match_pattern4(...) | | +| main.rs:814:5:814:20 | match_pattern4(...) | main.rs:815:5:815:21 | ExprStmt | | +| main.rs:814:5:814:21 | ExprStmt | main.rs:814:5:814:18 | match_pattern4 | | +| main.rs:815:5:815:18 | match_pattern5 | main.rs:815:5:815:20 | match_pattern5(...) | | +| main.rs:815:5:815:20 | match_pattern5(...) | main.rs:816:5:816:21 | ExprStmt | | +| main.rs:815:5:815:21 | ExprStmt | main.rs:815:5:815:18 | match_pattern5 | | +| main.rs:816:5:816:18 | match_pattern6 | main.rs:816:5:816:20 | match_pattern6(...) | | +| main.rs:816:5:816:20 | match_pattern6(...) | main.rs:817:5:817:21 | ExprStmt | | +| main.rs:816:5:816:21 | ExprStmt | main.rs:816:5:816:18 | match_pattern6 | | +| main.rs:817:5:817:18 | match_pattern7 | main.rs:817:5:817:20 | match_pattern7(...) | | +| main.rs:817:5:817:20 | match_pattern7(...) | main.rs:818:5:818:21 | ExprStmt | | +| main.rs:817:5:817:21 | ExprStmt | main.rs:817:5:817:18 | match_pattern7 | | +| main.rs:818:5:818:18 | match_pattern8 | main.rs:818:5:818:20 | match_pattern8(...) | | +| main.rs:818:5:818:20 | match_pattern8(...) | main.rs:819:5:819:21 | ExprStmt | | +| main.rs:818:5:818:21 | ExprStmt | main.rs:818:5:818:18 | match_pattern8 | | +| main.rs:819:5:819:18 | match_pattern9 | main.rs:819:5:819:20 | match_pattern9(...) | | +| main.rs:819:5:819:20 | match_pattern9(...) | main.rs:820:5:820:22 | ExprStmt | | +| main.rs:819:5:819:21 | ExprStmt | main.rs:819:5:819:18 | match_pattern9 | | +| main.rs:820:5:820:19 | match_pattern10 | main.rs:820:5:820:21 | match_pattern10(...) | | +| main.rs:820:5:820:21 | match_pattern10(...) | main.rs:821:5:821:22 | ExprStmt | | +| main.rs:820:5:820:22 | ExprStmt | main.rs:820:5:820:19 | match_pattern10 | | +| main.rs:821:5:821:19 | match_pattern11 | main.rs:821:5:821:21 | match_pattern11(...) | | +| main.rs:821:5:821:21 | match_pattern11(...) | main.rs:822:5:822:22 | ExprStmt | | +| main.rs:821:5:821:22 | ExprStmt | main.rs:821:5:821:19 | match_pattern11 | | +| main.rs:822:5:822:19 | match_pattern12 | main.rs:822:5:822:21 | match_pattern12(...) | | +| main.rs:822:5:822:21 | match_pattern12(...) | main.rs:823:5:823:22 | ExprStmt | | +| main.rs:822:5:822:22 | ExprStmt | main.rs:822:5:822:19 | match_pattern12 | | +| main.rs:823:5:823:19 | match_pattern13 | main.rs:823:5:823:21 | match_pattern13(...) | | +| main.rs:823:5:823:21 | match_pattern13(...) | main.rs:824:5:824:22 | ExprStmt | | +| main.rs:823:5:823:22 | ExprStmt | main.rs:823:5:823:19 | match_pattern13 | | +| main.rs:824:5:824:19 | match_pattern14 | main.rs:824:5:824:21 | match_pattern14(...) | | +| main.rs:824:5:824:21 | match_pattern14(...) | main.rs:825:5:825:22 | ExprStmt | | +| main.rs:824:5:824:22 | ExprStmt | main.rs:824:5:824:19 | match_pattern14 | | +| main.rs:825:5:825:19 | match_pattern15 | main.rs:825:5:825:21 | match_pattern15(...) | | +| main.rs:825:5:825:21 | match_pattern15(...) | main.rs:826:5:826:22 | ExprStmt | | +| main.rs:825:5:825:22 | ExprStmt | main.rs:825:5:825:19 | match_pattern15 | | +| main.rs:826:5:826:19 | match_pattern16 | main.rs:826:5:826:21 | match_pattern16(...) | | +| main.rs:826:5:826:21 | match_pattern16(...) | main.rs:827:5:827:36 | ExprStmt | | +| main.rs:826:5:826:22 | ExprStmt | main.rs:826:5:826:19 | match_pattern16 | | +| main.rs:827:5:827:18 | param_pattern1 | main.rs:827:20:827:22 | "a" | | +| main.rs:827:5:827:35 | param_pattern1(...) | main.rs:828:5:828:37 | ExprStmt | | +| main.rs:827:5:827:36 | ExprStmt | main.rs:827:5:827:18 | param_pattern1 | | +| main.rs:827:20:827:22 | "a" | main.rs:827:26:827:28 | "b" | | +| main.rs:827:25:827:34 | TupleExpr | main.rs:827:5:827:35 | param_pattern1(...) | | +| main.rs:827:26:827:28 | "b" | main.rs:827:31:827:33 | "c" | | +| main.rs:827:31:827:33 | "c" | main.rs:827:25:827:34 | TupleExpr | | +| main.rs:828:5:828:18 | param_pattern2 | main.rs:828:20:828:31 | ...::Left | | +| main.rs:828:5:828:36 | param_pattern2(...) | main.rs:829:5:829:26 | ExprStmt | | +| main.rs:828:5:828:37 | ExprStmt | main.rs:828:5:828:18 | param_pattern2 | | +| main.rs:828:20:828:31 | ...::Left | main.rs:828:33:828:34 | 45 | | +| main.rs:828:20:828:35 | ...::Left(...) | main.rs:828:5:828:36 | param_pattern2(...) | | +| main.rs:828:33:828:34 | 45 | main.rs:828:20:828:35 | ...::Left(...) | | +| main.rs:829:5:829:23 | destruct_assignment | main.rs:829:5:829:25 | destruct_assignment(...) | | +| main.rs:829:5:829:25 | destruct_assignment(...) | main.rs:830:5:830:23 | ExprStmt | | +| main.rs:829:5:829:26 | ExprStmt | main.rs:829:5:829:23 | destruct_assignment | | +| main.rs:830:5:830:20 | closure_variable | main.rs:830:5:830:22 | closure_variable(...) | | +| main.rs:830:5:830:22 | closure_variable(...) | main.rs:831:5:831:22 | ExprStmt | | +| main.rs:830:5:830:23 | ExprStmt | main.rs:830:5:830:20 | closure_variable | | +| main.rs:831:5:831:19 | nested_function | main.rs:831:5:831:21 | nested_function(...) | | +| main.rs:831:5:831:21 | nested_function(...) | main.rs:832:5:832:19 | ExprStmt | | +| main.rs:831:5:831:22 | ExprStmt | main.rs:831:5:831:19 | nested_function | | +| main.rs:832:5:832:16 | for_variable | main.rs:832:5:832:18 | for_variable(...) | | +| main.rs:832:5:832:18 | for_variable(...) | main.rs:833:5:833:17 | ExprStmt | | +| main.rs:832:5:832:19 | ExprStmt | main.rs:832:5:832:16 | for_variable | | +| main.rs:833:5:833:14 | add_assign | main.rs:833:5:833:16 | add_assign(...) | | +| main.rs:833:5:833:16 | add_assign(...) | main.rs:834:5:834:13 | ExprStmt | | +| main.rs:833:5:833:17 | ExprStmt | main.rs:833:5:833:14 | add_assign | | +| main.rs:834:5:834:10 | mutate | main.rs:834:5:834:12 | mutate(...) | | +| main.rs:834:5:834:12 | mutate(...) | main.rs:835:5:835:17 | ExprStmt | | +| main.rs:834:5:834:13 | ExprStmt | main.rs:834:5:834:10 | mutate | | +| main.rs:835:5:835:14 | mutate_arg | main.rs:835:5:835:16 | mutate_arg(...) | | +| main.rs:835:5:835:16 | mutate_arg(...) | main.rs:836:5:836:12 | ExprStmt | | +| main.rs:835:5:835:17 | ExprStmt | main.rs:835:5:835:14 | mutate_arg | | +| main.rs:836:5:836:9 | alias | main.rs:836:5:836:11 | alias(...) | | +| main.rs:836:5:836:11 | alias(...) | main.rs:837:5:837:18 | ExprStmt | | +| main.rs:836:5:836:12 | ExprStmt | main.rs:836:5:836:9 | alias | | +| main.rs:837:5:837:15 | capture_mut | main.rs:837:5:837:17 | capture_mut(...) | | +| main.rs:837:5:837:17 | capture_mut(...) | main.rs:838:5:838:20 | ExprStmt | | +| main.rs:837:5:837:18 | ExprStmt | main.rs:837:5:837:15 | capture_mut | | +| main.rs:838:5:838:17 | capture_immut | main.rs:838:5:838:19 | capture_immut(...) | | +| main.rs:838:5:838:19 | capture_immut(...) | main.rs:839:5:839:26 | ExprStmt | | +| main.rs:838:5:838:20 | ExprStmt | main.rs:838:5:838:17 | capture_immut | | +| main.rs:839:5:839:23 | async_block_capture | main.rs:839:5:839:25 | async_block_capture(...) | | +| main.rs:839:5:839:25 | async_block_capture(...) | main.rs:840:5:840:14 | ExprStmt | | +| main.rs:839:5:839:26 | ExprStmt | main.rs:839:5:839:23 | async_block_capture | | +| main.rs:840:5:840:11 | structs | main.rs:840:5:840:13 | structs(...) | | +| main.rs:840:5:840:13 | structs(...) | main.rs:841:5:841:14 | ExprStmt | | +| main.rs:840:5:840:14 | ExprStmt | main.rs:840:5:840:11 | structs | | +| main.rs:841:5:841:11 | ref_arg | main.rs:841:5:841:13 | ref_arg(...) | | +| main.rs:841:5:841:13 | ref_arg(...) | main.rs:842:5:842:30 | ExprStmt | | +| main.rs:841:5:841:14 | ExprStmt | main.rs:841:5:841:11 | ref_arg | | +| main.rs:842:5:842:27 | ref_methodcall_receiver | main.rs:842:5:842:29 | ref_methodcall_receiver(...) | | +| main.rs:842:5:842:29 | ref_methodcall_receiver(...) | main.rs:843:5:843:23 | ExprStmt | | +| main.rs:842:5:842:30 | ExprStmt | main.rs:842:5:842:27 | ref_methodcall_receiver | | +| main.rs:843:5:843:20 | macro_invocation | main.rs:843:5:843:22 | macro_invocation(...) | | +| main.rs:843:5:843:22 | macro_invocation(...) | main.rs:844:5:844:18 | ExprStmt | | +| main.rs:843:5:843:23 | ExprStmt | main.rs:843:5:843:20 | macro_invocation | | +| main.rs:844:5:844:15 | capture_phi | main.rs:844:5:844:17 | capture_phi(...) | | +| main.rs:844:5:844:17 | capture_phi(...) | main.rs:801:11:845:1 | { ... } | | +| main.rs:844:5:844:18 | ExprStmt | main.rs:844:5:844:15 | capture_phi | | breakTarget | main.rs:326:9:326:13 | break | main.rs:317:5:327:5 | while ... { ... } | continueTarget diff --git a/rust/ql/test/library-tests/variables/Ssa.expected b/rust/ql/test/library-tests/variables/Ssa.expected index 35adac478023..0acf3e94c5b5 100644 --- a/rust/ql/test/library-tests/variables/Ssa.expected +++ b/rust/ql/test/library-tests/variables/Ssa.expected @@ -196,6 +196,13 @@ definition | main.rs:748:17:750:9 | SSA phi(x) | main.rs:745:13:745:13 | x | | main.rs:749:13:749:13 | x | main.rs:745:13:745:13 | x | | main.rs:752:5:752:13 | x | main.rs:745:13:745:13 | x | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | read | main.rs:5:14:5:14 | s | main.rs:5:14:5:14 | s | main.rs:7:20:7:20 | s | | main.rs:10:14:10:14 | i | main.rs:10:14:10:14 | i | main.rs:12:20:12:20 | i | @@ -404,6 +411,14 @@ read | main.rs:746:13:746:15 | cap | main.rs:746:13:746:15 | cap | main.rs:752:5:752:7 | cap | | main.rs:746:20:746:20 | b | main.rs:746:20:746:20 | b | main.rs:748:20:748:20 | b | | main.rs:752:5:752:13 | x | main.rs:745:13:745:13 | x | main.rs:753:15:753:15 | x | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | main.rs:761:19:761:19 | x | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | main.rs:768:15:768:15 | y | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | main.rs:770:17:770:20 | N0ne | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | main.rs:779:13:779:22 | test_alias | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | main.rs:780:9:780:12 | test | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:788:15:788:15 | x | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:793:15:793:15 | x | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | main.rs:790:20:790:20 | x | firstRead | main.rs:5:14:5:14 | s | main.rs:5:14:5:14 | s | main.rs:7:20:7:20 | s | | main.rs:10:14:10:14 | i | main.rs:10:14:10:14 | i | main.rs:12:20:12:20 | i | @@ -570,6 +585,13 @@ firstRead | main.rs:746:13:746:15 | cap | main.rs:746:13:746:15 | cap | main.rs:752:5:752:7 | cap | | main.rs:746:20:746:20 | b | main.rs:746:20:746:20 | b | main.rs:748:20:748:20 | b | | main.rs:752:5:752:13 | x | main.rs:745:13:745:13 | x | main.rs:753:15:753:15 | x | +| main.rs:759:13:759:13 | x | main.rs:759:13:759:13 | x | main.rs:761:19:761:19 | x | +| main.rs:760:13:760:13 | y | main.rs:760:13:760:13 | y | main.rs:768:15:768:15 | y | +| main.rs:769:13:769:16 | N0ne | main.rs:769:13:769:16 | N0ne | main.rs:770:17:770:20 | N0ne | +| main.rs:776:13:776:22 | test_alias | main.rs:776:13:776:22 | test_alias | main.rs:779:13:779:22 | test_alias | +| main.rs:778:13:778:16 | test | main.rs:778:13:778:16 | test | main.rs:780:9:780:12 | test | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:788:15:788:15 | x | +| main.rs:789:18:789:18 | x | main.rs:789:18:789:18 | x | main.rs:790:20:790:20 | x | adjacentReads | main.rs:27:5:27:6 | x2 | main.rs:25:13:25:14 | x2 | main.rs:28:15:28:16 | x2 | main.rs:29:10:29:11 | x2 | | main.rs:41:9:41:10 | x3 | main.rs:41:9:41:10 | x3 | main.rs:42:15:42:16 | x3 | main.rs:44:9:44:10 | x3 | @@ -616,6 +638,7 @@ adjacentReads | main.rs:676:13:676:13 | a | main.rs:676:13:676:13 | a | main.rs:677:15:677:15 | a | main.rs:678:5:678:5 | a | | main.rs:676:13:676:13 | a | main.rs:676:13:676:13 | a | main.rs:678:5:678:5 | a | main.rs:679:15:679:15 | a | | main.rs:685:9:685:9 | x | main.rs:685:9:685:9 | x | main.rs:686:20:686:20 | x | main.rs:687:15:687:15 | x | +| main.rs:787:13:787:13 | x | main.rs:787:13:787:13 | x | main.rs:788:15:788:15 | x | main.rs:793:15:793:15 | x | phi | main.rs:210:9:210:44 | SSA phi(a3) | main.rs:210:9:210:44 | a3 | main.rs:210:22:210:23 | a3 | | main.rs:210:9:210:44 | SSA phi(a3) | main.rs:210:9:210:44 | a3 | main.rs:210:42:210:43 | a3 | @@ -773,3 +796,8 @@ assigns | main.rs:745:13:745:13 | x | main.rs:745:17:745:19 | 100 | | main.rs:746:13:746:15 | cap | main.rs:746:19:751:5 | \|...\| ... | | main.rs:749:13:749:13 | x | main.rs:749:17:749:19 | 200 | +| main.rs:759:13:759:13 | x | main.rs:759:17:759:24 | Some(...) | +| main.rs:760:13:760:13 | y | main.rs:761:13:767:9 | match x { ... } | +| main.rs:776:13:776:22 | test_alias | main.rs:777:13:777:16 | test | +| main.rs:778:13:778:16 | test | main.rs:779:13:779:24 | test_alias(...) | +| main.rs:787:13:787:13 | x | main.rs:787:17:787:23 | Some(...) | diff --git a/rust/ql/test/library-tests/variables/main.rs b/rust/ql/test/library-tests/variables/main.rs index cdfe1091ee39..fe13f89b1775 100644 --- a/rust/ql/test/library-tests/variables/main.rs +++ b/rust/ql/test/library-tests/variables/main.rs @@ -753,6 +753,51 @@ fn capture_phi() { print_i64(x); // $ read_access=x } +mod patterns { + #[rustfmt::skip] + pub fn test() -> Option { + let x = Some(42); // x + let y : Option = // y1 + match x { // $ read_access=x + Some(y) => { // y2 + None + } + None => + None + }; + match y { // $ read_access=y1 + N0ne => // n0ne + N0ne // $ read_access=n0ne + } + } + + #[rustfmt::skip] + fn test2() -> Option { + let test_alias = // test_alias + test; + let test = // test + test_alias(); // $ read_access=test_alias + test // $ read_access=test + } + + const z: i32 = 0; + + #[rustfmt::skip] + fn test3() { + let x = Some(0); // x1 + match x { // $ read_access=x1 + Some(x) // x2 + => x, // $ read_access=x2 + _ => 0 + }; + match x { // $ read_access=x1 + Some(z) => + z, + _ => 0 + }; + } +} + fn main() { immutable_variable(); mutable_variable(); diff --git a/rust/ql/test/library-tests/variables/variables.expected b/rust/ql/test/library-tests/variables/variables.expected index 64431803e6d0..ea360357d970 100644 --- a/rust/ql/test/library-tests/variables/variables.expected +++ b/rust/ql/test/library-tests/variables/variables.expected @@ -142,6 +142,14 @@ variable | main.rs:745:13:745:13 | x | | main.rs:746:13:746:15 | cap | | main.rs:746:20:746:20 | b | +| main.rs:759:13:759:13 | x | +| main.rs:760:13:760:13 | y | +| main.rs:762:18:762:18 | y | +| main.rs:769:13:769:16 | N0ne | +| main.rs:776:13:776:22 | test_alias | +| main.rs:778:13:778:16 | test | +| main.rs:787:13:787:13 | x | +| main.rs:789:18:789:18 | x | variableAccess | main.rs:7:20:7:20 | s | main.rs:5:14:5:14 | s | | main.rs:12:20:12:20 | i | main.rs:10:14:10:14 | i | @@ -364,6 +372,14 @@ variableAccess | main.rs:749:13:749:13 | x | main.rs:745:13:745:13 | x | | main.rs:752:5:752:7 | cap | main.rs:746:13:746:15 | cap | | main.rs:753:15:753:15 | x | main.rs:745:13:745:13 | x | +| main.rs:761:19:761:19 | x | main.rs:759:13:759:13 | x | +| main.rs:768:15:768:15 | y | main.rs:760:13:760:13 | y | +| main.rs:770:17:770:20 | N0ne | main.rs:769:13:769:16 | N0ne | +| main.rs:779:13:779:22 | test_alias | main.rs:776:13:776:22 | test_alias | +| main.rs:780:9:780:12 | test | main.rs:778:13:778:16 | test | +| main.rs:788:15:788:15 | x | main.rs:787:13:787:13 | x | +| main.rs:790:20:790:20 | x | main.rs:789:18:789:18 | x | +| main.rs:793:15:793:15 | x | main.rs:787:13:787:13 | x | variableWriteAccess | main.rs:27:5:27:6 | x2 | main.rs:25:13:25:14 | x2 | | main.rs:29:5:29:6 | x2 | main.rs:25:13:25:14 | x2 | @@ -576,6 +592,14 @@ variableReadAccess | main.rs:748:20:748:20 | b | main.rs:746:20:746:20 | b | | main.rs:752:5:752:7 | cap | main.rs:746:13:746:15 | cap | | main.rs:753:15:753:15 | x | main.rs:745:13:745:13 | x | +| main.rs:761:19:761:19 | x | main.rs:759:13:759:13 | x | +| main.rs:768:15:768:15 | y | main.rs:760:13:760:13 | y | +| main.rs:770:17:770:20 | N0ne | main.rs:769:13:769:16 | N0ne | +| main.rs:779:13:779:22 | test_alias | main.rs:776:13:776:22 | test_alias | +| main.rs:780:9:780:12 | test | main.rs:778:13:778:16 | test | +| main.rs:788:15:788:15 | x | main.rs:787:13:787:13 | x | +| main.rs:790:20:790:20 | x | main.rs:789:18:789:18 | x | +| main.rs:793:15:793:15 | x | main.rs:787:13:787:13 | x | variableInitializer | main.rs:20:9:20:10 | x1 | main.rs:20:14:20:16 | "a" | | main.rs:25:13:25:14 | x2 | main.rs:25:18:25:18 | 4 | @@ -649,6 +673,11 @@ variableInitializer | main.rs:734:15:734:28 | var_in_macro | main.rs:734:15:734:28 | 0 | | main.rs:745:13:745:13 | x | main.rs:745:17:745:19 | 100 | | main.rs:746:13:746:15 | cap | main.rs:746:19:751:5 | \|...\| ... | +| main.rs:759:13:759:13 | x | main.rs:759:17:759:24 | Some(...) | +| main.rs:760:13:760:13 | y | main.rs:761:13:767:9 | match x { ... } | +| main.rs:776:13:776:22 | test_alias | main.rs:777:13:777:16 | test | +| main.rs:778:13:778:16 | test | main.rs:779:13:779:24 | test_alias(...) | +| main.rs:787:13:787:13 | x | main.rs:787:17:787:23 | Some(...) | capturedVariable | main.rs:557:9:557:9 | x | | main.rs:568:13:568:13 | x | diff --git a/rust/ql/test/library-tests/variables/variables.ql b/rust/ql/test/library-tests/variables/variables.ql index dbde4f56e858..9997b29c7d0e 100644 --- a/rust/ql/test/library-tests/variables/variables.ql +++ b/rust/ql/test/library-tests/variables/variables.ql @@ -35,7 +35,7 @@ module VariableAccessTest implements TestSig { private predicate declAt(Variable v, string filepath, int line, boolean inMacro) { variable(v) and v.getLocation().hasLocationInfo(filepath, _, _, line, _) and - if v.getPat().isInMacroExpansion() then inMacro = true else inMacro = false + if v.getPat().isFromMacroExpansion() then inMacro = true else inMacro = false } private predicate commmentAt(string text, string filepath, int line) { diff --git a/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected index b1c7e787dee5..538ecf9c2e35 100644 --- a/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-696/CONSISTENCY/PathResolutionConsistency.expected @@ -1,3 +1,2 @@ multipleCallTargets | test.rs:117:9:117:21 | ptr.is_null() | -| test.rs:117:9:117:21 | ptr.is_null() | diff --git a/rust/ql/test/query-tests/security/CWE-918/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/query-tests/security/CWE-918/CONSISTENCY/PathResolutionConsistency.expected index 5caae105914c..821f75cee26d 100644 --- a/rust/ql/test/query-tests/security/CWE-918/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/query-tests/security/CWE-918/CONSISTENCY/PathResolutionConsistency.expected @@ -1,3 +1,2 @@ multipleCallTargets | request_forgery_tests.rs:30:36:30:52 | user_url.as_str() | -| request_forgery_tests.rs:30:36:30:52 | user_url.as_str() | diff --git a/rust/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/rust/ql/test/query-tests/security/CWE-918/RequestForgery.expected index aa5003a0e9d3..0f931ed3a0f8 100644 --- a/rust/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/rust/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -1,29 +1,20 @@ #select | request_forgery_tests.rs:8:24:8:35 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:8:24:8:35 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | -| request_forgery_tests.rs:8:24:8:35 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:8:24:8:35 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | | request_forgery_tests.rs:17:25:17:36 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:17:25:17:36 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | | request_forgery_tests.rs:21:25:21:36 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:21:25:21:36 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | | request_forgery_tests.rs:25:25:25:36 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:25:25:25:36 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | | request_forgery_tests.rs:31:29:31:40 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:31:29:31:40 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | -| request_forgery_tests.rs:31:29:31:40 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:31:29:31:40 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | | request_forgery_tests.rs:37:37:37:48 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:37:37:37:48 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | -| request_forgery_tests.rs:37:37:37:48 | ...::get | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:37:37:37:48 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:5:29:5:36 | user_url | user-provided value | -| request_forgery_tests.rs:68:28:68:39 | ...::get | request_forgery_tests.rs:65:33:65:40 | and_then | request_forgery_tests.rs:68:28:68:39 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:65:33:65:40 | and_then | user-provided value | | request_forgery_tests.rs:68:28:68:39 | ...::get | request_forgery_tests.rs:65:33:65:40 | and_then | request_forgery_tests.rs:68:28:68:39 | ...::get | The URL of this request depends on a $@. | request_forgery_tests.rs:65:33:65:40 | and_then | user-provided value | edges | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:8:38:8:45 | user_url | provenance | | -| request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:8:38:8:45 | user_url | provenance | | | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:16:27:16:49 | MacroExpr | provenance | | | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:20:27:20:57 | MacroExpr | provenance | | | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:24:27:24:70 | MacroExpr | provenance | | | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:31:43:31:50 | user_url | provenance | | -| request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:31:43:31:50 | user_url | provenance | | | request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:37:51:37:58 | user_url | provenance | | -| request_forgery_tests.rs:5:29:5:36 | user_url | request_forgery_tests.rs:37:51:37:58 | user_url | provenance | | -| request_forgery_tests.rs:8:37:8:45 | &user_url [&ref] | request_forgery_tests.rs:8:24:8:35 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:8:37:8:45 | &user_url [&ref] | request_forgery_tests.rs:8:24:8:35 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:8:38:8:45 | user_url | request_forgery_tests.rs:8:37:8:45 | &user_url [&ref] | provenance | | -| request_forgery_tests.rs:8:38:8:45 | user_url | request_forgery_tests.rs:8:37:8:45 | &user_url [&ref] | provenance | | | request_forgery_tests.rs:16:13:16:15 | url | request_forgery_tests.rs:17:39:17:41 | url | provenance | | | request_forgery_tests.rs:16:27:16:49 | ...::format(...) | request_forgery_tests.rs:16:27:16:49 | { ... } | provenance | | | request_forgery_tests.rs:16:27:16:49 | ...::must_use(...) | request_forgery_tests.rs:16:13:16:15 | url | provenance | | @@ -46,21 +37,13 @@ edges | request_forgery_tests.rs:25:38:25:41 | &url [&ref] | request_forgery_tests.rs:25:25:25:36 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:25:39:25:41 | url | request_forgery_tests.rs:25:38:25:41 | &url [&ref] | provenance | | | request_forgery_tests.rs:31:42:31:50 | &user_url [&ref] | request_forgery_tests.rs:31:29:31:40 | ...::get | provenance | MaD:1 Sink:MaD:1 | -| request_forgery_tests.rs:31:42:31:50 | &user_url [&ref] | request_forgery_tests.rs:31:29:31:40 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:31:43:31:50 | user_url | request_forgery_tests.rs:31:42:31:50 | &user_url [&ref] | provenance | | -| request_forgery_tests.rs:31:43:31:50 | user_url | request_forgery_tests.rs:31:42:31:50 | &user_url [&ref] | provenance | | -| request_forgery_tests.rs:37:50:37:58 | &user_url [&ref] | request_forgery_tests.rs:37:37:37:48 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:37:50:37:58 | &user_url [&ref] | request_forgery_tests.rs:37:37:37:48 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:37:51:37:58 | user_url | request_forgery_tests.rs:37:50:37:58 | &user_url [&ref] | provenance | | -| request_forgery_tests.rs:37:51:37:58 | user_url | request_forgery_tests.rs:37:50:37:58 | &user_url [&ref] | provenance | | -| request_forgery_tests.rs:65:33:65:40 | and_then | request_forgery_tests.rs:65:49:65:57 | ...: String | provenance | Src:MaD:2 | | request_forgery_tests.rs:65:33:65:40 | and_then | request_forgery_tests.rs:65:49:65:57 | ...: String | provenance | Src:MaD:2 | | request_forgery_tests.rs:65:49:65:57 | ...: String | request_forgery_tests.rs:68:42:68:42 | a | provenance | | -| request_forgery_tests.rs:65:49:65:57 | ...: String | request_forgery_tests.rs:68:42:68:42 | a | provenance | | -| request_forgery_tests.rs:68:41:68:42 | &a [&ref] | request_forgery_tests.rs:68:28:68:39 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:68:41:68:42 | &a [&ref] | request_forgery_tests.rs:68:28:68:39 | ...::get | provenance | MaD:1 Sink:MaD:1 | | request_forgery_tests.rs:68:42:68:42 | a | request_forgery_tests.rs:68:41:68:42 | &a [&ref] | provenance | | -| request_forgery_tests.rs:68:42:68:42 | a | request_forgery_tests.rs:68:41:68:42 | &a [&ref] | provenance | | models | 1 | Sink: reqwest::get; Argument[0]; request-url | | 2 | Source: <_ as warp::filter::Filter>::and_then; Argument[0].Parameter[0..7]; remote | @@ -68,13 +51,9 @@ models | 4 | Summary: core::hint::must_use; Argument[0]; ReturnValue; value | nodes | request_forgery_tests.rs:5:29:5:36 | user_url | semmle.label | user_url | -| request_forgery_tests.rs:5:29:5:36 | user_url | semmle.label | user_url | | request_forgery_tests.rs:8:24:8:35 | ...::get | semmle.label | ...::get | -| request_forgery_tests.rs:8:24:8:35 | ...::get | semmle.label | ...::get | -| request_forgery_tests.rs:8:37:8:45 | &user_url [&ref] | semmle.label | &user_url [&ref] | | request_forgery_tests.rs:8:37:8:45 | &user_url [&ref] | semmle.label | &user_url [&ref] | | request_forgery_tests.rs:8:38:8:45 | user_url | semmle.label | user_url | -| request_forgery_tests.rs:8:38:8:45 | user_url | semmle.label | user_url | | request_forgery_tests.rs:16:13:16:15 | url | semmle.label | url | | request_forgery_tests.rs:16:27:16:49 | ...::format(...) | semmle.label | ...::format(...) | | request_forgery_tests.rs:16:27:16:49 | ...::must_use(...) | semmle.label | ...::must_use(...) | @@ -100,25 +79,14 @@ nodes | request_forgery_tests.rs:25:38:25:41 | &url [&ref] | semmle.label | &url [&ref] | | request_forgery_tests.rs:25:39:25:41 | url | semmle.label | url | | request_forgery_tests.rs:31:29:31:40 | ...::get | semmle.label | ...::get | -| request_forgery_tests.rs:31:29:31:40 | ...::get | semmle.label | ...::get | | request_forgery_tests.rs:31:42:31:50 | &user_url [&ref] | semmle.label | &user_url [&ref] | -| request_forgery_tests.rs:31:42:31:50 | &user_url [&ref] | semmle.label | &user_url [&ref] | -| request_forgery_tests.rs:31:43:31:50 | user_url | semmle.label | user_url | | request_forgery_tests.rs:31:43:31:50 | user_url | semmle.label | user_url | | request_forgery_tests.rs:37:37:37:48 | ...::get | semmle.label | ...::get | -| request_forgery_tests.rs:37:37:37:48 | ...::get | semmle.label | ...::get | -| request_forgery_tests.rs:37:50:37:58 | &user_url [&ref] | semmle.label | &user_url [&ref] | | request_forgery_tests.rs:37:50:37:58 | &user_url [&ref] | semmle.label | &user_url [&ref] | | request_forgery_tests.rs:37:51:37:58 | user_url | semmle.label | user_url | -| request_forgery_tests.rs:37:51:37:58 | user_url | semmle.label | user_url | -| request_forgery_tests.rs:65:33:65:40 | and_then | semmle.label | and_then | | request_forgery_tests.rs:65:33:65:40 | and_then | semmle.label | and_then | | request_forgery_tests.rs:65:49:65:57 | ...: String | semmle.label | ...: String | -| request_forgery_tests.rs:65:49:65:57 | ...: String | semmle.label | ...: String | -| request_forgery_tests.rs:68:28:68:39 | ...::get | semmle.label | ...::get | | request_forgery_tests.rs:68:28:68:39 | ...::get | semmle.label | ...::get | | request_forgery_tests.rs:68:41:68:42 | &a [&ref] | semmle.label | &a [&ref] | -| request_forgery_tests.rs:68:41:68:42 | &a [&ref] | semmle.label | &a [&ref] | -| request_forgery_tests.rs:68:42:68:42 | a | semmle.label | a | | request_forgery_tests.rs:68:42:68:42 | a | semmle.label | a | subpaths diff --git a/rust/ql/test/query-tests/unusedentities/UnusedValue.expected b/rust/ql/test/query-tests/unusedentities/UnusedValue.expected index c5f0f59966cb..c52863616626 100644 --- a/rust/ql/test/query-tests/unusedentities/UnusedValue.expected +++ b/rust/ql/test/query-tests/unusedentities/UnusedValue.expected @@ -15,8 +15,10 @@ | main.rs:322:12:322:12 | j | Variable $@ is assigned a value that is never used. | main.rs:322:12:322:12 | j | j | | main.rs:382:9:382:9 | x | Variable $@ is assigned a value that is never used. | main.rs:382:9:382:9 | x | x | | main.rs:390:17:390:17 | x | Variable $@ is assigned a value that is never used. | main.rs:390:17:390:17 | x | x | -| main.rs:536:9:536:20 | var_in_macro | Variable $@ is assigned a value that is never used. | main.rs:536:9:536:20 | var_in_macro | var_in_macro | -| main.rs:545:9:545:9 | c | Variable $@ is assigned a value that is never used. | main.rs:545:9:545:9 | c | c | +| main.rs:491:16:491:16 | a | Variable $@ is assigned a value that is never used. | main.rs:489:9:489:9 | a | a | +| main.rs:516:41:516:41 | x | Variable $@ is assigned a value that is never used. | main.rs:515:9:515:9 | x | x | +| main.rs:530:9:530:20 | var_in_macro | Variable $@ is assigned a value that is never used. | main.rs:530:9:530:20 | var_in_macro | var_in_macro | +| main.rs:539:9:539:9 | c | Variable $@ is assigned a value that is never used. | main.rs:539:9:539:9 | c | c | | more.rs:44:9:44:14 | a_ptr4 | Variable $@ is assigned a value that is never used. | more.rs:44:9:44:14 | a_ptr4 | a_ptr4 | | more.rs:59:9:59:13 | d_ptr | Variable $@ is assigned a value that is never used. | more.rs:59:9:59:13 | d_ptr | d_ptr | | more.rs:65:13:65:17 | f_ptr | Variable $@ is assigned a value that is never used. | more.rs:65:13:65:17 | f_ptr | f_ptr | diff --git a/rust/ql/test/query-tests/unusedentities/main.rs b/rust/ql/test/query-tests/unusedentities/main.rs index 01b7cc14bc8c..a08a05a83bde 100644 --- a/rust/ql/test/query-tests/unusedentities/main.rs +++ b/rust/ql/test/query-tests/unusedentities/main.rs @@ -488,7 +488,7 @@ macro_rules! use_value { fn macros1() { let a: u16; let b: u16 = 2; - set_value!(a, 1); + set_value!(a, 1); // $ Alert[rust/unused-value] use_value!(b); match std::env::args().nth(1).unwrap().parse::() { @@ -513,13 +513,7 @@ fn macros2() { fn macros3() { let x; - println!( - "The value of x is {}", - ({ - x = 10; // $ MISSING: Alert[rust/unused-value] - 10 - }) - ); + println!("The value of x is {}", ({ x = 10; 10 })); // $ Alert[rust/unused-value] } macro_rules! let_in_macro {