Skip to content

Allow '+' in keywords #5046

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

Merged
merged 2 commits into from
Aug 20, 2022
Merged

Allow '+' in keywords #5046

merged 2 commits into from
Aug 20, 2022

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Aug 3, 2022

Prior art: '+' in feature names — #2510. See that PR for the rationales in favor of that.

Specifically I would be interested in using "c++" as a tag on some of my FFI crates. Alphanumericizing it to "cpp" or "cxx" is not so good because those are each the name of a specific crate for a specific approach to C++ interop, and a crate that's generally suitable for C++ interop wouldn't want its keywords to imply it only works in concert with one of those two other crates.

Cargo has supported '+' in keywords since Rust 1.1.

For example: keywords = ["c++"].
Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

seems reasonable on first glance, though I'd like to get a second opinion on this first.

@jtgeibel @carols10cents any thoughts?

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-backend ⚙️ labels Aug 8, 2022
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

I don't think I could attend the next meeting so going to put +1 here.

Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

I've manually tested the effects of this change on the UI and everything appears to work well :)

@Turbo87 Turbo87 merged commit ed7ace5 into rust-lang:master Aug 20, 2022
@dtolnay dtolnay deleted the keywordplus branch August 20, 2022 17:09
@Turbo87
Copy link
Member

Turbo87 commented Aug 22, 2022

@dtolnay sorry that it took so long. it should be live in production now :)

@dtolnay
Copy link
Member Author

dtolnay commented Aug 22, 2022

Thank you! Seems to work: https://crates.io/keywords/c++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants