Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust: introduce Unextracted and Missing "marker" classes #17479

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

redsun82
Copy link
Contributor

This introduces Missing as a superclass of MissingExpr and MissingPat, and Unextracted as a superclass of both Missing and Unimplemented. This should allow us to run more precise metrics about what we consider as properly extracted, by excluding Unextracted.

@redsun82 redsun82 requested a review from geoffw0 September 16, 2024 13:55
@github-actions github-actions bot added the Rust Pull requests that update Rust code label Sep 16, 2024
@geoffw0
Copy link
Contributor

geoffw0 commented Sep 16, 2024

Note that this will probably interact with #17465 (i.e. whichever is merged first, the other may need to be updated).

@redsun82
Copy link
Contributor Author

Note that this will probably interact with #17465 (i.e. whichever is merged first, the other may need to be updated).

Actually, I'm not entirely sure these PRs will really interact: I think #17465 can keep on referencing the specific subclasses (Unimplemented, MissingExpr, MissingPat) even with this in.

@@ -43,6 +43,7 @@
import codeql.rust.elements.MatchArm
import codeql.rust.elements.MatchExpr
import codeql.rust.elements.MethodCallExpr
import codeql.rust.elements.Missing

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.MissingExpr
.
Redundant import, the module is already imported inside
codeql.rust.elements.MissingPat
.
@@ -70,6 +71,7 @@
import codeql.rust.elements.TupleStructPat
import codeql.rust.elements.TypeRef
import codeql.rust.elements.UnderscoreExpr
import codeql.rust.elements.Unextracted

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.Missing
.
Redundant import, the module is already imported inside
codeql.rust.elements.Unimplemented
.
Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@redsun82 redsun82 merged commit f949ca9 into main Sep 16, 2024
14 checks passed
@redsun82 redsun82 deleted the redsun82/rust-unextracted branch September 16, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants