-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 shims for WithOptConstParam query calls #77550
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me once my question about suffixes is resolved
In my perfect world, we would encode the unknown
variant of WithOptConstArg
as a type-state, so you would go from UnknownConstArg(DefId)
to KnownConstArg(DefId, Option<DefId>)
at some point (maybe with a name change as well). I don't know how ergonomic this would be, however. Adding an Unknown
variant to WithOptConstArg
might be a good middle ground as eddyb mentioned on Zulip.
@@ -440,4 +448,28 @@ impl<'tcx> TyCtxt<'tcx> { | |||
self.promoted_mir(def.did) | |||
} | |||
} | |||
|
|||
#[inline] | |||
pub fn optimized_mir_of_opt_const_arg( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these are suffixed with of_opt_const_arg
while some have opt_const_arg
. Does this denote different semantics? If not, can we use the same suffix for everything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed of
for all of them
I guess @bors r=ecstatic-morse |
📌 Commit 8160bfa has been approved by |
@bors rollup |
…atic-morse add shims for WithOptConstParam query calls r? @ecstatic-morse @eddyb
…atic-morse add shims for WithOptConstParam query calls r? @ecstatic-morse @eddyb
Rollup of 10 pull requests Successful merges: - rust-lang#77550 (add shims for WithOptConstParam query calls) - rust-lang#77699 (Add word wrap for short descriptions) - rust-lang#77724 (Implement `AsRawFd` for `StdinLock` etc. on WASI.) - rust-lang#77746 (Fix `x.py setup` sets `changelog-seen`) - rust-lang#77784 (Fix intra-docs link in core::ffi::VaList) - rust-lang#77811 (rustdoc: Make some functions private that don't need to be public) - rust-lang#77818 (Mono collector: replace pair of ints with Range) - rust-lang#77831 (Use std methods on char instead of open coding them) - rust-lang#77852 (update url in bootstrap README (gcc-rs -> cc-rs)) - rust-lang#77863 (Remove `mark-i-m` from rustc-dev-guide maintainers) Failed merges: r? `@ghost`
r? @ecstatic-morse @eddyb