-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Do not yeet unsafe<>
from type when formatting unsafe binder
#137769
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
Cannot remember if you have r+, so @bors delegate=ymtimi |
✌️ @ymtimi, you can now approve this pull request! If @compiler-errors told you to " |
unsafe<>
from type when formatting unsafe binder
@bors r+ |
@ytmimi: 🔑 Insufficient privileges: Not in reviewers |
:/// I typoed your name in the delegate. sorry! @bors r=ytmimi |
All good. This was a nice and simple PR! |
Do you know who I need to reach out to in order to get the right privileges to approve PRs? |
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
|
…r=ytmimi Do not yeet `unsafe<>` from type when formatting unsafe binder 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`
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#136503 (Tweak output of const panic diagnostic) - rust-lang#137390 (tests: fix up new test for nocapture -> capture(none) change) - rust-lang#137617 (Introduce `feature(generic_const_parameter_types)`) - rust-lang#137719 (Add missing case explanation for doc inlined re-export of doc hidden item) - rust-lang#137763 (Use `mk_ty_from_kind` a bit less, clean up lifetime handling in borrowck) - rust-lang#137769 (Do not yeet `unsafe<>` from type when formatting unsafe binder) - rust-lang#137776 (Some `rustc_transmute` cleanups) - rust-lang#137800 (Remove `ParamEnv::without_caller_bounds`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#137769 - compiler-errors:empty-unsafe-fmt, r=ytmimi Do not yeet `unsafe<>` from type when formatting unsafe binder 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``
Unsafe binders are types like
unsafe<'a, 'b> Ty<'a, 'b>
. However, users can also specify unsafe binder types with no bound vars, likeunsafe<> 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 backTy
which is a different type!This PR fixes that.
r? @ytmimi