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

remove all non-reflection users of type descriptors #12059

Merged
merged 4 commits into from
Feb 8, 2014
Merged

remove all non-reflection users of type descriptors #12059

merged 4 commits into from
Feb 8, 2014

Conversation

thestinger
Copy link
Contributor

A follow-up from the work I started with 383e3fd.

@brson
Copy link
Contributor

brson commented Feb 6, 2014

👍

@thestinger
Copy link
Contributor Author

Sadly, the drop_glue field cannot be removed from the TyDesc at the moment because libarena uses it so I removed that part of the second commit.

bors added a commit that referenced this pull request Feb 7, 2014
A follow-up from the work I started with 383e3fd.
This also drops support for the managed pointer POISON_ON_FREE feature
as it's not worth adding back the support for it. After a snapshot, the
leftovers can be removed.
Reflection is now the only user of type descriptors. Uses of drop glue
no longer cause a type descriptor to be generated.
bors added a commit that referenced this pull request Feb 8, 2014
A follow-up from the work I started with 383e3fd.
@bors bors closed this Feb 8, 2014
@bors bors merged commit 95d897c into rust-lang:master Feb 8, 2014
@thestinger thestinger deleted the glue branch February 8, 2014 04:58
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
Fix issue 11223: add check for identical guards in lint `match_same_arms`

fixes rust-lang#11223

In the current `match_same_arms` implementation, if arms have guards, they are considered different. This commit adds equality checking for guards: arms are now considered equivalent only when they either both have no guards or their guards are identical.

The portion responsible for checking guard equality is refactored to reuse the existing code for checking body equality. This is abstracted into a function called `check_eq_with_pat`. To optimize performance, `check_same_guard` and `check_same_body` here use closures for lazy evaluation, ensuring that the calculation is only performed when `!(backwards_blocking_idxs...)` is true.

changelog: [`match_same_arms`]: Add check for identical guards
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