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

Enable layout debugging for impl Trait type aliases #70815

Merged
merged 2 commits into from
Apr 5, 2020

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Apr 5, 2020

I also made it print the actual type name that the alias picks under the hood.

@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(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 Apr 5, 2020
@jonas-schievink
Copy link
Contributor

@bors r+ r? @jonas-schievink

@bors
Copy link
Contributor

bors commented Apr 5, 2020

📌 Commit 8f6c109 has been approved by jonas-schievink

@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 5, 2020
Comment on lines -87 to +88
&format!("layout debugging: {:#?}", *ty_layout),
&format!("layout debugging for type {:?}: {:#?}", ty, *ty_layout),
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if maybe this should be "layout for type" without "debugging".
Or "layout_of({}) = {:#?}" :P.

Copy link
Member

Choose a reason for hiding this comment

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

(but this PR is rolled up so this is for another time)

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to have some backticks if not that.

@eddyb
Copy link
Member

eddyb commented Apr 5, 2020

@RalfJung is there an issue for moving some/all print-type-sizes tests to the new style?

@RalfJung
Copy link
Member Author

RalfJung commented Apr 5, 2020

@eddyb yes: #69852

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#67797 (Query-ify Instance::resolve)
 - rust-lang#70777 (Don't import integer and float modules, use assoc consts)
 - rust-lang#70795 (Keep track of position when deleting from a BTreeMap)
 - rust-lang#70812 (Do not use "nil" to refer to `()`)
 - rust-lang#70815 (Enable layout debugging for `impl Trait` type aliases)

Failed merges:

r? @ghost
@bors bors merged commit 8c081f6 into rust-lang:master Apr 5, 2020
@RalfJung RalfJung deleted the layout-debug branch April 5, 2020 23: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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants