-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Paolo Tranquilli
committed
Dec 17, 2024
1 parent
c6ff21c
commit f3aad36
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
rust/ql/lib/codeql/rust/elements/canonical_paths/internal/LangCrateRefImpl.qll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* This module provides a hand-modifiable wrapper around the generated class `LangCrateRef`. | ||
* | ||
* INTERNAL: Do not use. | ||
*/ | ||
|
||
private import codeql.rust.elements.internal.generated.canonical_paths.LangCrateRef | ||
|
||
/** | ||
* INTERNAL: This module contains the customizable definition of `LangCrateRef` and should not | ||
* be referenced directly. | ||
*/ | ||
module Impl { | ||
// the following QLdoc is generated: if you need to edit it, do it in the schema file | ||
/** | ||
* A reference to a crate in the Rust standard libraries. | ||
*/ | ||
class LangCrateRef extends Generated::LangCrateRef { | ||
override string toString() { result = this.getName() } | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
rust/ql/lib/codeql/rust/elements/canonical_paths/internal/RepoCrateRefImpl.qll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* This module provides a hand-modifiable wrapper around the generated class `RepoCrateRef`. | ||
* | ||
* INTERNAL: Do not use. | ||
*/ | ||
|
||
private import codeql.rust.elements.internal.generated.canonical_paths.RepoCrateRef | ||
|
||
/** | ||
* INTERNAL: This module contains the customizable definition of `RepoCrateRef` and should not | ||
* be referenced directly. | ||
*/ | ||
module Impl { | ||
// the following QLdoc is generated: if you need to edit it, do it in the schema file | ||
/** | ||
* A reference to a crate in the repository. | ||
*/ | ||
class RepoCrateRef extends Generated::RepoCrateRef { | ||
override string toString() { | ||
result = this.getName() | ||
or | ||
not this.hasName() and result = "?" | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
rust/ql/lib/codeql/rust/elements/canonical_paths/internal/RustcCrateRefImpl.qll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* This module provides a hand-modifiable wrapper around the generated class `RustcCrateRef`. | ||
* | ||
* INTERNAL: Do not use. | ||
*/ | ||
|
||
private import codeql.rust.elements.internal.generated.canonical_paths.RustcCrateRef | ||
|
||
/** | ||
* INTERNAL: This module contains the customizable definition of `RustcCrateRef` and should not | ||
* be referenced directly. | ||
*/ | ||
module Impl { | ||
// the following QLdoc is generated: if you need to edit it, do it in the schema file | ||
/** | ||
* A reference to a crate provided by rustc. TODO: understand where these come from. | ||
*/ | ||
class RustcCrateRef extends Generated::RustcCrateRef { | ||
override string toString() { result = this.getName() } | ||
} | ||
} |