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

[wgsl-in] Delete reborrow methods in favor of Rust's built-in reborrowing of &mut references. #2572

Merged
merged 4 commits into from
Oct 23, 2023

Conversation

jimblandy
Copy link
Member

  • Remove front::wgsl::lower::ExpressionContext::reborrow and
    front::wgsl::lower::RuntimeExpressionContext::reborrow in favor of
    Rust's automatic reborrowing of &mut references.

  • Remove front::wgsl::lower::StatementContext::reborrow in favor
    of Rust's automatic reborrowing of &mut references.

  • Remove front::wgsl::lower::GlobalContext::reborrow in favor of
    Rust's automatic reborrowing of &mut references.

  • Remove front::wgsl::parse::ExpressionContext::reborrow in favor of
    Rust's automatic reborrowing of &mut references. Use lifetime
    elision in more places.

Remove `ExpressionContext::reborrow` in favor of Rust's automatic
reborrowing of `&mut` references.

Use lifetime elision in more places.
Remove `GlobalContext::reborrow` in favor of Rust's automatic
reborrowing of `&mut` references.
Remove `StatementContext::reborrow` in favor of Rust's automatic
reborrowing of `&mut` references.
Remove `front::wgsl::lower::ExpressionContext::reborrow` and
`front::wgsl::lower::RuntimeExpressionContext::reborrow` in favor of
Rust's automatic reborrowing of `&mut` references.
@jimblandy jimblandy requested a review from a team as a code owner October 20, 2023 00:37
@jimblandy jimblandy added kind: refactor Making existing function faster or nicer lang: WGSL WebGPU shading language area: front-end Input formats for conversion labels Oct 20, 2023
@jimblandy
Copy link
Member Author

It might be interesting to benchmark this...

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Happy to see those being removed!

@teoxoy teoxoy merged commit d038506 into gfx-rs:master Oct 23, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: front-end Input formats for conversion kind: refactor Making existing function faster or nicer lang: WGSL WebGPU shading language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants