Skip to content

Conversation

paldepind
Copy link
Contributor

@paldepind paldepind commented Sep 9, 2025

Improve toString for impl and a few nodes related to it.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Sep 9, 2025
@paldepind paldepind changed the title Rust: [tiny PR] Improve a few toString implementations Rust: Improve toString for impl Sep 9, 2025
@paldepind paldepind marked this pull request as ready for review September 9, 2025 12:06
@paldepind paldepind requested a review from a team as a code owner September 9, 2025 12:06
@Copilot Copilot AI review requested due to automatic review settings September 9, 2025 12:06
Copy link
Contributor

@Copilot Copilot AI 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 improves the toString representation for impl trait types and related AST nodes in the Rust CodeQL library. The changes make the string representation more readable by replacing generic names like "ImplTraitTypeRepr" with user-friendly formats like "impl ...".

  • Adds custom toString implementations for several type-related classes
  • Updates type bound and type bound list string representations
  • Modifies lifetime string representation to use abbreviated format

Reviewed Changes

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

Show a summary per file
File Description
rust/ql/test/library-tests/type-inference/type-inference.expected Test expectations updated to reflect new string representations
rust/ql/lib/codeql/rust/elements/internal/ImplTraitTypeReprImpl.qll Adds toString implementation for impl trait types using "impl ..." format
rust/ql/lib/codeql/rust/elements/internal/TypeBoundListImpl.qll Implements string representation for type bound lists with " + " separator
rust/ql/lib/codeql/rust/elements/internal/TypeBoundImpl.qll Adds abbreviated string representation for type bounds
rust/ql/lib/codeql/rust/elements/internal/LifetimeImpl.qll Updates lifetime string representation to use abbreviated format
rust/ql/.gitattributes Removes linguist-generated markers for customized implementation files
rust/ql/.generated.list Removes entries for files that are no longer auto-generated

@paldepind paldepind merged commit b34fa7a into github:main Sep 9, 2025
18 of 19 checks passed
@paldepind paldepind deleted the rust/impl-to-string branch September 9, 2025 12:48
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