Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rust: Rename type inference test inline expectation tag#20037

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

paldepind
Copy link
Contributor

@paldepindpaldepind commentedJul 14, 2025
edited
Loading

#19993 changed the inline expectations in the type inference test such that all function calls (and not just method calls) are annotated by usinggetStaticTarget in the tests. This makes the tag namemethod a bit inaccurate.

This PR changes the tag name totarget.

@github-actionsgithub-actionsbot added the RustPull requests that update Rust code labelJul 14, 2025
@paldepindpaldepind marked this pull request as ready for reviewJuly 14, 2025 09:26
@CopilotCopilotAI review requested due to automatic review settingsJuly 14, 2025 09:26
@paldepindpaldepind requested a review froma team as acode ownerJuly 14, 2025 09:27
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames the inline expectation tag from "method" to "target" in the Rust type inference test to better reflect the change made in#19993, wheregetStaticTarget was introduced to annotate all function calls (not just method calls). The tag name "target" is more accurate since it now covers both method calls and function calls.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
rust/ql/test/library-tests/type-inference/type-inference.qlUpdates the query to use "target" tag instead of "method" in relevant tag definitions
rust/ql/test/library-tests/type-inference/type-inference.expectedUpdates test expectations to reflect the tag name change
rust/ql/test/library-tests/type-inference/pattern_matching.rsUpdates inline comments to use "target" tag instead of "method"
rust/ql/test/library-tests/type-inference/main.rsUpdates inline comments to use "target" tag instead of "method"
rust/ql/test/library-tests/type-inference/loop/main.rsUpdates inline comment to use "target" tag
rust/ql/test/library-tests/type-inference/dereference.rsUpdates inline comments to use "target" tag instead of "method"
rust/ql/lib/utils/test/internal/InlineExpectationsTestImpl.qllAdds constructor check to ExpectationComment class

@paldepindpaldepind added the no-change-note-requiredThis PR does not need a change note labelJul 14, 2025
@@ -4,6 +4,8 @@ private import codeql.util.test.InlineExpectationsTest

module Impl implements InlineExpectationsTestSig {
class ExpectationComment extends R::Comment {
ExpectationComment() { this.fromSource() }
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

There was a comment inside the standard library starting with$target, so I had to limit expectations comments to those inside the source, which seems right in any case.

geoffw0
geoffw0 previously approved these changesJul 14, 2025
Copy link
Contributor

@geoffw0geoffw0 left a comment

Choose a reason for hiding this comment

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

Yep this is better, LGTM.

@paldepind
Copy link
ContributorAuthor

I've mergedmain.

geoffw0 reacted with thumbs up emoji

@paldepindpaldepind merged commit87a8dcc intogithub:mainJul 14, 2025
19 checks passed
@paldepindpaldepind deleted the rust/type-inference-rename-expectations branchJuly 14, 2025 13:54
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@geoffw0geoffw0geoffw0 approved these changes

Assignees
No one assigned
Labels
no-change-note-requiredThis PR does not need a change noteRustPull requests that update Rust code
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@paldepind@geoffw0

[8]ページ先頭

©2009-2025 Movatter.jp