Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions rust/ql/lib/codeql/rust/frameworks/stdlib/Stdlib.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Provides classes modeling security-relevant aspects of the standard libraries.
* Provides classes modeling relevant aspects of the standard libraries.
*/

private import rust
Expand Down Expand Up @@ -140,10 +140,7 @@ class FutureTrait extends Trait {

/** Gets the `Output` associated type. */
pragma[nomagic]
TypeAlias getOutputType() {
result = this.getAssocItemList().getAnAssocItem() and
result.getName().getText() = "Output"
}
TypeAlias getOutputType() { result = this.(TraitItemNode).getAssocItem("Output") }
}

/**
Expand All @@ -160,10 +157,7 @@ class FnOnceTrait extends Trait {

/** Gets the `Output` associated type. */
pragma[nomagic]
TypeAlias getOutputType() {
result = this.getAssocItemList().getAnAssocItem() and
result.getName().getText() = "Output"
}
TypeAlias getOutputType() { result = this.(TraitItemNode).getAssocItem("Output") }
}

/**
Expand All @@ -177,10 +171,7 @@ class IteratorTrait extends Trait {

/** Gets the `Item` associated type. */
pragma[nomagic]
TypeAlias getItemType() {
result = this.getAssocItemList().getAnAssocItem() and
result.getName().getText() = "Item"
}
TypeAlias getItemType() { result = this.(TraitItemNode).getAssocItem("Item") }
}

/**
Expand All @@ -194,10 +185,7 @@ class IntoIteratorTrait extends Trait {

/** Gets the `Item` associated type. */
pragma[nomagic]
TypeAlias getItemType() {
result = this.getAssocItemList().getAnAssocItem() and
result.getName().getText() = "Item"
}
TypeAlias getItemType() { result = this.(TraitItemNode).getAssocItem("Item") }
}

/**
Expand All @@ -224,10 +212,7 @@ class DerefTrait extends Trait {

/** Gets the `Target` associated type. */
pragma[nomagic]
TypeAlias getTargetType() {
result = this.getAssocItemList().getAnAssocItem() and
result.getName().getText() = "Target"
}
TypeAlias getTargetType() { result = this.(TraitItemNode).getAssocItem("Target") }
}

/**
Expand All @@ -244,10 +229,7 @@ class IndexTrait extends Trait {

/** Gets the `Output` associated type. */
pragma[nomagic]
TypeAlias getOutputType() {
result = this.getAssocItemList().getAnAssocItem() and
result.getName().getText() = "Output"
}
TypeAlias getOutputType() { result = this.(TraitItemNode).getAssocItem("Output") }
}

/**
Expand Down
Loading