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

Add GenericArgKind::as_{type,const,region} #110545

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

WaffleLapkin
Copy link
Member

This allows to make code nicer in some cases

@rustbot
Copy link
Collaborator

rustbot commented Apr 19, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 19, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 19, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-log-analyzer

This comment has been minimized.

GenericArgKind::Const(ct) => Some(ct),
_ => None,
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should those methods be on GenericArgKind, or directly on GenericArg? Seems like we always unpack first.

Copy link
Member Author

Choose a reason for hiding this comment

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

I implemented them on the kind because it technically supports more use cases, but given that we always unpack first, I can move it to the GenericArg...

@WaffleLapkin WaffleLapkin requested a review from cjgillot April 19, 2023 18:29
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 19, 2023

📌 Commit 25b9263 has been approved by cjgillot

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 Apr 19, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#110240 (Add `indent_style = tab` for `Makefile`s to `.editorconfig`)
 - rust-lang#110545 (Add `GenericArgKind::as_{type,const,region}`)
 - rust-lang#110574 ( fix out-of-date comment about rpath in bootstrap)
 - rust-lang#110581 (Style fix for loongarch-linux.md)
 - rust-lang#110584 (Allow overwriting the sysroot compile flag in compile tests)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 17f6763 into rust-lang:master Apr 20, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 20, 2023
@WaffleLapkin WaffleLapkin deleted the generic_arg_as_x branch April 20, 2023 16:18
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants