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

`const fn`-ify `std::any::type_name` as laid out in #63084 #63123

Merged
merged 2 commits into from Jul 31, 2019

Conversation

@TankhouseAle
Copy link
Contributor

commented Jul 30, 2019

A test, based on the one I added when I implemented support for the underlying core::intrinsics::type_name being allowed in const fn contexts, is included.

TankhouseAle added some commits Jul 30, 2019

Add a test for std::any::type_name() as a const fn
This is a modified version of the test I added previously. The difference is this version implements a wrapper around std::any::type_name versus core::intrinsics::type_name, in order to show that it works as desired / intended.
Add the necessary changes to any.rs
Specifically the `#[rustc_const_unstable(feature = "const_type_name")]` attribute, as well as marking the actual function as `const`.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 30, 2019

r? @KodrAus

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

@oli-obk

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2019

r? @oli-obk

@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2019

📌 Commit 4a3d41d has been approved by oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned KodrAus Jul 30, 2019

Centril added a commit to Centril/rust that referenced this pull request Jul 30, 2019

Rollup merge of rust-lang#63123 - TankhouseAle:const-fn-type-name-any…
…, r=oli-obk

`const fn`-ify `std::any::type_name` as laid out in rust-lang#63084

A test, based on the one I added when I implemented support for the underlying `core::intrinsics::type_name` being allowed in `const fn` contexts, is included.

bors added a commit that referenced this pull request Jul 30, 2019

Auto merge of #63134 - Centril:rollup-1qsyqzb, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #62805 (Update RLS and Rustfmt)
 - #63095 (Turn `INCOMPLETE_FEATURES` into lint)
 - #63123 (`const fn`-ify `std::any::type_name` as laid out in #63084)
 - #63129 (Subslice patterns: Test passing static & dynamic semantics.)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jul 30, 2019

Rollup merge of rust-lang#63123 - TankhouseAle:const-fn-type-name-any…
…, r=oli-obk

`const fn`-ify `std::any::type_name` as laid out in rust-lang#63084

A test, based on the one I added when I implemented support for the underlying `core::intrinsics::type_name` being allowed in `const fn` contexts, is included.

bors added a commit that referenced this pull request Jul 30, 2019

Auto merge of #63148 - Centril:rollup-t813bxw, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #62293 (Unsupport the `await!(future)` macro)
 - #62469 (Add doc links to liballoc crate page)
 - #63095 (Turn `INCOMPLETE_FEATURES` into lint)
 - #63117 (Use global variable 'environ' to pass environments to rtpSpawn)
 - #63123 (`const fn`-ify `std::any::type_name` as laid out in #63084)
 - #63129 (Subslice patterns: Test passing static & dynamic semantics.)
 - #63147 (Updated RELEASES.md for 1.37.0)

Failed merges:

r? @ghost

@bors bors merged commit 4a3d41d into rust-lang:master Jul 31, 2019

4 checks passed

pr Build #20190730.4 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

☔️ The latest upstream changes (presumably #63148) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.