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
Merged

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

merged 2 commits into from
Jul 31, 2019

Conversation

TankhouseAle
Copy link
Contributor

@TankhouseAle TankhouseAle commented Jul 30, 2019

This implements #63084 on nightly.

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.

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.
Specifically the `#[rustc_const_unstable(feature = "const_type_name")]` attribute, as well as marking the actual function as `const`.
@rust-highfive
Copy link
Collaborator

r? @KodrAus

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 30, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Jul 30, 2019

r? @oli-obk

@bors r+ rollup

@bors
Copy link
Contributor

bors 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
@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 Jul 30, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 30, 2019
…, 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.
Centril added a commit to Centril/rust that referenced this pull request Jul 30, 2019
…, 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
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
@bors
Copy link
Contributor

bors commented Jul 31, 2019

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

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants