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

refactor: Use &self instead of &mut when possible #1045

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Jun 3, 2023

Description:

This is required for #1042, which requires to recurse into self.

Related issue (if exists):

@kdy1 kdy1 added this to the v0.0.1: Correctness milestone Jun 3, 2023
@kdy1 kdy1 self-assigned this Jun 3, 2023
@github-actions
Copy link

github-actions bot commented Jun 3, 2023

Thank you for the PR!
Commit: 0c0251f

Files to check

These are files which is affected by the current PR, but not reflected. If there's no file below this message, please ignore this message.

You can run ./scripts/auto-unignore.sh from crates/stc_ts_file_analyzer for typescript files, and ./scripts/check.sh from crates/stc_ts_type_checker for *.stats.rust-debug files.

@kdy1 kdy1 changed the title refactor: Use &self instead of &mut where possible refactor: Use &self instead of &mut when possible Jun 3, 2023
@kdy1 kdy1 force-pushed the self-mut branch 4 times, most recently from 1b68fad to 0c0251f Compare June 3, 2023 14:51
@kdy1
Copy link
Member Author

kdy1 commented Jun 3, 2023

Status:

I did lots of work, but I'm stuck. I may need to split all call/new into & and &mut, because of the reevaluation logic. The reevaluation logic uses ValidateWith::validate_with, which takes &mut. I can't use & for ValidateWith::validate_with because of other constraints like interop with Visit.

@kdy1 kdy1 removed their assignment Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant