Skip to content

Show ::{{constructor}} in std::any::type_name(). #85963

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jun 4, 2021

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jun 3, 2021

Fix #84666

Before:

[src/main.rs:6] type_name::<T>() = "playground::Velocity"
[src/main.rs:6] type_name::<T>() = "playground::Velocity"

After:

[src/main.rs:6] type_name::<T>() = "scratchpad::Velocity::{{constructor}}"
[src/main.rs:6] type_name::<T>() = "scratchpad::Velocity"

cc @scottmcm

@rust-highfive
Copy link
Contributor

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

@rust-highfive
Copy link
Contributor

r? @yaahc

(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 Jun 3, 2021
@rust-log-analyzer

This comment has been minimized.

@m-ou-se m-ou-se force-pushed the constructor-type-name branch from 4695396 to 6b15ba9 Compare June 3, 2021 14:00
@rust-log-analyzer

This comment has been minimized.

@m-ou-se m-ou-se force-pushed the constructor-type-name branch from 6b15ba9 to e3b19e5 Compare June 3, 2021 14:14
@yaahc
Copy link
Member

yaahc commented Jun 3, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 3, 2021

📌 Commit e3b19e5 has been approved by yaahc

@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 Jun 3, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jun 3, 2021
Show `::{{constructor}}` in std::any::type_name().

Fix rust-lang#84666

Before:
```
[src/main.rs:6] type_name::<T>() = "playground::Velocity"
[src/main.rs:6] type_name::<T>() = "playground::Velocity"
```

After:
```
[src/main.rs:6] type_name::<T>() = "scratchpad::Velocity::{{constructor}}"
[src/main.rs:6] type_name::<T>() = "scratchpad::Velocity"
```

cc `@scottmcm`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 4, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#85717 (Document `From` impls for cow.rs)
 - rust-lang#85850 (Remove unused feature gates)
 - rust-lang#85888 (Fix typo in internal documentation for `TrustedRandomAccess`)
 - rust-lang#85889 (Restoring the `num_def_ids` function in the CStore API )
 - rust-lang#85899 (jsondocck small cleanup)
 - rust-lang#85937 (Fix bad suggestions for code from proc_macro)
 - rust-lang#85963 (Show `::{{constructor}}` in std::any::type_name().)
 - rust-lang#85977 (Fix linkcheck script from getting out of sync.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0a12431 into rust-lang:master Jun 4, 2021
@rustbot rustbot added this to the 1.54.0 milestone Jun 4, 2021
@m-ou-se m-ou-se deleted the constructor-type-name branch July 29, 2021 11:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The type_name of tuple-structs and their ZST function item are the same
6 participants