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

Refactored Field Error Function #2341

Merged

Conversation

MahadMuhammad
Copy link
Contributor

Refactored field error function into one function, To make easier error emission.

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-pattern.cc (emit_invalid_field_error): Refactored field error function (TypeCheckPattern::visit): called 'emit_invalid_field_error' function

@MahadMuhammad MahadMuhammad force-pushed the Refactoring-Field-Error-Function branch 2 times, most recently from 032ebe8 to cdd59b8 Compare June 28, 2023 13:36
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

Looks good! The suggestions will make the code a little simpler to use but the logic is great. Thank you :)

gcc/rust/typecheck/rust-hir-type-check-pattern.cc Outdated Show resolved Hide resolved
gcc/rust/typecheck/rust-hir-type-check-pattern.cc Outdated Show resolved Hide resolved
gcc/rust/typecheck/rust-hir-type-check-pattern.cc Outdated Show resolved Hide resolved
gcc/rust/typecheck/rust-hir-type-check-pattern.cc Outdated Show resolved Hide resolved
@MahadMuhammad MahadMuhammad force-pushed the Refactoring-Field-Error-Function branch 2 times, most recently from 87a8284 to 60904c1 Compare June 28, 2023 19:34
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

Great stuff :) thank you!

@CohenArthur
Copy link
Member

@MahadMuhammad please fix the conflicts and I will merge this PR

@MahadMuhammad MahadMuhammad force-pushed the Refactoring-Field-Error-Function branch 2 times, most recently from cb120fd to 60904c1 Compare June 29, 2023 14:09
@MahadMuhammad MahadMuhammad force-pushed the Refactoring-Field-Error-Function branch 2 times, most recently from 60904c1 to 2ddf542 Compare June 29, 2023 14:10
@MahadMuhammad MahadMuhammad reopened this Jun 29, 2023
@MahadMuhammad MahadMuhammad force-pushed the Refactoring-Field-Error-Function branch 4 times, most recently from 2153944 to 634b286 Compare June 29, 2023 15:23
Refactored field error function into one funciton
Fixes Rust-GCC#2336

gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-pattern.cc (emit_invalid_field_error): Refactored Field
	Error Function
	(TypeCheckPattern::visit): called emit_invalid_field_error function

Signed-off-by: Muhammad Mahad <[email protected]>
@MahadMuhammad MahadMuhammad force-pushed the Refactoring-Field-Error-Function branch from 634b286 to 41f5344 Compare June 29, 2023 15:47
@MahadMuhammad
Copy link
Contributor Author

@CohenArthur Done. After 5 hours of fighting with git :D

@CohenArthur
Copy link
Member

@CohenArthur Done. After 5 hours of fighting with git :D

aw :) thanks for the work haha. next time if you want we can jump on a call and fix these together

@CohenArthur CohenArthur added this pull request to the merge queue Jun 30, 2023
Merged via the queue into Rust-GCC:master with commit 2e1f190 Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactoring Field Error Function into one Function
2 participants