Skip to content

Conversation

paldepind
Copy link
Contributor

@paldepind paldepind commented Aug 26, 2025

Tweaks some examples in QLdoc to be valid Rust.

  • [..] indexing does not work on tuples or structs.
  • Two assignments didn't have an assignee expression on the right-hand side.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Aug 26, 2025
@paldepind paldepind marked this pull request as ready for review August 26, 2025 11:01
@paldepind paldepind requested a review from a team as a code owner August 26, 2025 11:01
@Copilot Copilot AI review requested due to automatic review settings August 26, 2025 11:01
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 fixes invalid Rust code examples in QLdoc comments across multiple files. The changes correct syntax errors where bracket indexing was incorrectly applied to tuples and structs, and where assignments lacked proper assignee expressions.

Key changes:

  • Replace invalid bracket indexing syntax with proper field access and destructuring
  • Add missing variable declarations and proper assignment patterns
  • Update generated file checksums to reflect the documentation changes

Reviewed Changes

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

Show a summary per file
File Description
rust/schema/annotations.py Updates QLdoc examples for struct and tuple expressions with valid Rust syntax
rust/ql/lib/codeql/rust/elements/internal/TupleExprImpl.qll Fixes tuple expression documentation examples
rust/ql/lib/codeql/rust/elements/internal/StructExprImpl.qll Fixes struct expression documentation examples
rust/ql/lib/codeql/rust/elements/TupleExpr.qll Updates tuple expression documentation
rust/ql/lib/codeql/rust/elements/StructExpr.qll Updates struct expression documentation
rust/ql/.generated.list Updates checksums for generated files after documentation changes

@paldepind paldepind added the no-change-note-required This PR does not need a change note label Aug 26, 2025
Copy link
Contributor

@aibaars aibaars left a comment

Choose a reason for hiding this comment

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

Thanks

@paldepind paldepind merged commit 87d1a14 into main Aug 26, 2025
21 of 22 checks passed
@paldepind paldepind deleted the rust/fix-examples branch August 26, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants