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

chore: Follow rust naming convention #801

Merged
merged 4 commits into from
Feb 12, 2023

Conversation

0xYYY
Copy link
Contributor

@0xYYY 0xYYY commented Feb 10, 2023

Related issue(s)

Related to #780.

Description

Summary of changes

Follow the Rust API Gudeline.

Modified cases:
IRGenerator, SSAFunction following the UUID -> Uuid example.
LValue, LValueRhs, HirLValue following the USize -> Usize example.

Please let me know if any of these seems inappropriate.

Dependency additions / changes

N/A

Test additions / changes

N/A

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.
  • This PR requires documentation updates when merged.

Additional context

@TomAFrench
Copy link
Member

@0xYYY Could you run cargo fmt on this and push again please?

@kevaundray
Copy link
Contributor

kevaundray commented Feb 10, 2023

Strange, is it really Lvalue and not LValue ? Rust codebase seems to use LValue from a dep, maybe they are just not following the convention though. See: https://github.com/rust-lang/rust/blob/2f8d8040166a730d0da7bba0f2864f0ef7ff6364/compiler/rustc_codegen_gcc/src/declare.rs#L1

@0xYYY
Copy link
Contributor Author

0xYYY commented Feb 10, 2023

Strange, is it really Lvalue and not LValue ?

I'm actually not totally sure about this one. So would like your inputs on this.

The guideline states that the usage of Usize instead of USize, but as you pointed out, Rust itself uses LValue. Perhaps we can leave this case out of this PR first if it's not that clear which should be used.

@kevaundray
Copy link
Contributor

Strange, is it really Lvalue and not LValue ?

I'm actually not totally sure about this one. So would like your inputs on this.

The guideline states that the usage of Usize instead of USize, but as you pointed out, Rust itself uses LValue. Perhaps we can leave this case out of this PR first if it's not that clear which should be used.

Yeah , could we leave this one out please

kevaundray
kevaundray previously approved these changes Feb 10, 2023
@kevaundray kevaundray added this pull request to the merge queue Feb 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2023
@kevaundray
Copy link
Contributor

Thanks for resolving the conflicts!

@kevaundray kevaundray added this pull request to the merge queue Feb 12, 2023
Merged via the queue into noir-lang:master with commit 62d02a1 Feb 12, 2023
@0xYYY 0xYYY deleted the chore/naming-refactor branch February 13, 2023 01:28
TomAFrench added a commit that referenced this pull request Feb 14, 2023
* master: (28 commits)
  chore(ci): Add release token to enable runs against release PR (#840)
  feat(ssa): array sort (#754)
  chore: update readme (#811)
  chore: fix clippy (#825)
  chore: remove stale comment on HirFunction.unchecked_from_expr (#827)
  chore: Getter naming refactor (#803)
  chore: updated "HirFunction::unsafe_from_expr" to "HirFunction::unchecked_from_expr" (#823)
  chore: Forbid unsafe code (#824)
  chore: Follow rust naming convention (#801)
  feat(ci): Add concurrency group for rust workflow (#806)
  chore(ssa): rename impl method to follow Rust guideline (#782)
  fix(nargo): `nargo test` now only runs test functions defined in the current module (#805)
  chore(nargo): Remove outdated error message when Prover/Verifier.toml is missing (#807)
  chore(ssa): rename codegen to ssa_gen + reorg of `Value` struct (#797)
  chore(nargo): abstract paths from nargo's working directory (#761)
  chore(ci): Rename workflows (#804)
  feat: Impls with generics (#798)
  chore(ssa): Add doc comments on `Opcode` struct (#778)
  fix: operators issuing type errors when used with matching integer types arising from generic code (#789)
  chore(nargo)!: bump MSRV to 1.66.0 (#799)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants