Skip to content

hir-ty: change struct + enum variant constructor formatting. #18269

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

Conversation

jhgg
Copy link
Contributor

@jhgg jhgg commented Oct 8, 2024

before, when formatting struct constructor for struct S(usize, usize) it would format as:

extern "rust-call" S(usize, usize) -> S

but after this change, we'll format as:

fn S(usize, usize) -> S

likewise the second commit, also makes this uniform for enum variants as well.

fixes #18259

before, when formatting struct constructor for `struct S(usize, usize)` it would format as:

    extern "rust-call" S(usize, usize) -> S

but after this change, we'll format as:

    fn S(usize, usize) -> S
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2024
@jhgg jhgg changed the title hir-ty: change struct constructor formatting. hir-ty: change struct + enum varianat constructor formatting. Oct 8, 2024
@jhgg jhgg changed the title hir-ty: change struct + enum varianat constructor formatting. hir-ty: change struct + enum variant constructor formatting. Oct 8, 2024
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 left a comment

Choose a reason for hiding this comment

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

Looks fine.

@flodiebold
Copy link
Member

@bors r+

I'm wondering though, is rust-call the correct ABI for struct constructors?

@bors
Copy link
Contributor

bors commented Oct 9, 2024

📌 Commit 9434ceb has been approved by flodiebold

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 9, 2024

⌛ Testing commit 9434ceb with merge 9aa4293...

@bors
Copy link
Contributor

bors commented Oct 9, 2024

☀️ Test successful - checks-actions
Approved by: flodiebold
Pushing 9aa4293 to master...

@bors bors merged commit 9aa4293 into rust-lang:master Oct 9, 2024
11 checks passed
@jhgg jhgg deleted the hir-ty/change-struct-constructor-formatting branch October 9, 2024 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird inlay hint for tuple struct
5 participants