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

Reuse into tag #5625

Merged
merged 5 commits into from
Jun 29, 2023
Merged

Reuse into tag #5625

merged 5 commits into from
Jun 29, 2023

Conversation

folkertdev
Copy link
Contributor

removes the Reuse expr and instead uses a reuse field on Tag { .. }

@@ -1093,7 +1093,7 @@ fn insert_refcount_operations_binding<'a>(
}
}
}
Expr::Reuse { .. } | Expr::Reset { .. } | Expr::ResetRef { .. } => {
Expr::Reset { .. } | Expr::ResetRef { .. } => {
unreachable!("Reset(ref) and reuse should not exist at this point")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
unreachable!("Reset(ref) and reuse should not exist at this point")
unreachable!("Reset(ref) should not exist at this point")

@@ -7560,7 +7582,7 @@ fn substitute_in_expr<'a>(

NullPointer => None,

Reuse { .. } | Reset { .. } | ResetRef { .. } => {
Reset { .. } | ResetRef { .. } => {
unreachable!("reset/resetref/reuse have not been introduced yet")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
unreachable!("reset/resetref/reuse have not been introduced yet")
unreachable!("reset(ref) has not been introduced yet")

@@ -1098,9 +1102,6 @@ fn expr_contains_symbol(expr: &Expr, needle: Symbol) -> bool {
}),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't forget to update Expr::Tag { arguments, .. } => arguments.contains(&needle), to check if the reuse token contains the symbol.

Copy link
Collaborator

@JTeeuwissen JTeeuwissen left a comment

Choose a reason for hiding this comment

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

Not sure if I'm supposed to approve merges, but here you go 👍

@folkertdev folkertdev merged commit 1bede92 into main Jun 29, 2023
10 checks passed
@folkertdev folkertdev deleted the reuse-into-tag branch June 29, 2023 17:39
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.

2 participants