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

Expand ItemDecorator extensions in all contexts #12258

Closed

Conversation

sfackler
Copy link
Member

Now that fold_item can return multiple items, this is pretty trivial. It
also recursively expands generated items so ItemDecorators can generate
items that are tagged with ItemDecorators!

Closes #4913

NB: This depends on #12234.

The old method of building up a list of items and threading it through
all of the decorators was unwieldy and not really scalable as
non-deriving ItemDecorators become possible. The API is now that the
decorator gets an immutable reference to the item it's attached to, and
a callback that it can pass new items to. If we want to add syntax
extensions that can modify the item they're attached to, we can add that
later, but I think it'll have to be separate from ItemDecorator to avoid
strange ordering issues.
@huonw
Copy link
Member

huonw commented Feb 14, 2014

Closes #4913.

Now that fold_item can return multiple items, this is pretty trivial. It
also recursively expands generated items so ItemDecorators can generate
items that are tagged with ItemDecorators!

Closes rust-lang#4913
@sfackler sfackler deleted the universal-item-decorator-expansion branch May 15, 2014 05:01
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
…xendoo

[`similar_names`]: don't raise if the first character is different

A lot of cases of the "noise" cases of `similar_names` come from two idents with a different first letter, which is easy enough to differentiate visually but causes this lint to be raised.

Do not raise the lint in these cases, as long as the first character does not have a lookalike.

Helps with rust-lang/rust-clippy#10926 (does not fix)

This is per-commit reviewable, the first commit is just refactoring.

changelog: [`similar_names`]: don't raise if the first character is different
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.

deriving doesn't work inside function
3 participants