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

Do not yeet unsafe<> from type when formatting unsafe binder #137769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

Unsafe binders are types like unsafe<'a, 'b> Ty<'a, 'b>. However, users can also specify unsafe binder types with no bound vars, like unsafe<> Ty.

When I added nightly formatting for unsafe binders, I didn't consider this, so on nightly we are stripping the unsafe<> part, which gives us back Ty which is a different type!

This PR fixes that.

r? @ytmimi

@rustbot
Copy link
Collaborator

rustbot commented Feb 28, 2025

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 28, 2025
@compiler-errors
Copy link
Member Author

Cannot remember if you have r+, so

@bors delegate=ymtimi

@bors
Copy link
Contributor

bors commented Feb 28, 2025

✌️ @ymtimi, you can now approve this pull request!

If @compiler-errors told you to "r=me" after making some further change, please make that change, then do @bors r=@compiler-errors

@compiler-errors compiler-errors changed the title Do not yeet unsafe<> from type Do not yeet unsafe<> from type when formatting unsafe binder Feb 28, 2025
@ytmimi
Copy link
Contributor

ytmimi commented Feb 28, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Feb 28, 2025

@ytmimi: 🔑 Insufficient privileges: Not in reviewers

@compiler-errors
Copy link
Member Author

:/// I typoed your name in the delegate. sorry!

@bors r=ytmimi

@bors
Copy link
Contributor

bors commented Feb 28, 2025

📌 Commit 5bf2237 has been approved by ytmimi

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 28, 2025
@ytmimi
Copy link
Contributor

ytmimi commented Feb 28, 2025

All good. This was a nice and simple PR!

@ytmimi
Copy link
Contributor

ytmimi commented Feb 28, 2025

Do you know who I need to reach out to in order to get the right privileges to approve PRs?

@compiler-errors
Copy link
Member Author

cc @calebcartwright

T-rustfmt should definitely have bors permissions in this repo, at least with the understanding that the permissions will only be used for rustfmt subtree syncs and the occasional in-tree rustfmt PR.

You should open a teams PR that adds these lines to rustfmt.toml:

[permissions]
bors.rust.review = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants