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: Extend path resolution to cover type parameters #18689

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Feb 5, 2025

No description provided.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Feb 5, 2025
@hvitved hvitved marked this pull request as ready for review February 6, 2025 08:37
@Copilot Copilot bot review requested due to automatic review settings February 6, 2025 08:37

Choose a reason for hiding this comment

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

PR Overview

This pull request extends path resolution to cover type parameters in the Rust test suite. It introduces a new module (m10) with a generic struct (MyStruct) and a function (f) that returns an instance of that struct. These additions aim to test and demonstrate the handling of type parameters in Rust's path resolution.

  • Adds module m10 to illustrate generic type parameter handling.
  • Defines a new generic struct (MyStruct).
  • Defines a new function (f) returning an instance of MyStruct.

Changes

File Description
rust/ql/test/library-tests/path-resolution/main.rs Introduces m10 with MyStruct and the function f for type parameter resolution tests

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

Comments suppressed due to low confidence (3)

rust/ql/test/library-tests/path-resolution/main.rs:195

  • Skipping rustfmt in production or test code may reduce consistency; consider removing the rustfmt::skip attribute unless there is a specific reason to maintain this format.
    #[rustfmt::skip]

rust/ql/test/library-tests/path-resolution/main.rs:196

  • [nitpick] It is recommended to add Rust doc comments for the newly added public struct MyStruct to clarify its usage.
    pub struct MyStruct<

rust/ql/test/library-tests/path-resolution/main.rs:204

  • [nitpick] Adding a doc comment for the public function f would improve code readability and maintain consistent documentation practices.
    pub fn f<T>( // I60

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@hvitved hvitved requested a review from paldepind February 6, 2025 09:53
@hvitved hvitved merged commit 100de73 into github:main Feb 7, 2025
16 checks passed
@hvitved hvitved deleted the rust/path-resolution-type-param branch February 7, 2025 07:55
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