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 AST-building redundancy in libsyntax/ext #6578

Closed
huonw opened this issue May 18, 2013 · 1 comment
Closed

Remove AST-building redundancy in libsyntax/ext #6578

huonw opened this issue May 18, 2013 · 1 comment

Comments

@huonw
Copy link
Member

huonw commented May 18, 2013

There are currently three ways to create ast elements, build::mk_*, build::ExtCtxtMethods, and pipes::ast_builder::ext_ctxt_ast_builder.

(I'm working on this.)

@huonw
Copy link
Member Author

huonw commented May 26, 2013

Fixed by #6611.

@huonw huonw closed this as completed May 26, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 30, 2021
…-by-byte-size, r=flip1995

size_of_in_element_count: Disable lint on division by byte-size

Fixes rust-lang#6511

It is fairly common to divide some length in bytes by the byte-size of a single element before creating a `from_raw_parts` slice or similar operation. This lint would erroneously disallow such expressions.

Just in case, instead of simply disabling this lint in the RHS of a division, keep track of the inversion and enable it again on recursive division.

---

changelog: Do not trigger size_of_in_element_count when dividing by element size
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

No branches or pull requests

1 participant