Skip to content

Add -Z unpretty flags for the AST and the THIR #408

Closed
@LeSeulArtichaut

Description

@LeSeulArtichaut
Contributor

Proposal

Add a few -Z (perma-unstable) flags to dump a representation of the AST and THIR, akin to -Zunpretty=hir-tree for the HIR:

  • -Zunpretty=ast-tree and -Zunpretty=ast-tree,expanded for the AST
  • -Zunpretty=thir-tree for the THIR

Being able to dump those IRs is always useful when hacking on the compiler. Also, this is something we (the rustc-dev-guide WG) would like to have for rust-lang/rustc-dev-guide#1062, to be able to better teach those IRs.

Mentors or Reviewers

Implemented in rust-lang/rust#82304, looking for a reviewer

Process

The main points of the Major Change Process is as follows:

  • File an issue describing the proposal.
  • A compiler team member or contributor who is knowledgeable in the area can second by writing @rustbot second.
    • Finding a "second" suffices for internal changes. If however you are proposing a new public-facing feature, such as a -C flag, then full team check-off is required.
    • Compiler team members can initiate a check-off via @rfcbot fcp merge on either the MCP or the PR.
  • Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

Activity

added
T-compilerAdd this label so rfcbot knows to poll the compiler team
major-changeA proposal to make a major change to rustc
on Feb 19, 2021
rustbot

rustbot commented on Feb 19, 2021

@rustbot
Collaborator

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/compiler @rust-lang/compiler-contributors

estebank

estebank commented on Feb 19, 2021

@estebank

@rustbot second

added
final-comment-periodThe FCP has started, most (if not all) team members are in agreement
on Feb 19, 2021
added and removed
final-comment-periodThe FCP has started, most (if not all) team members are in agreement
on Mar 3, 2021
added a commit that references this issue on Mar 4, 2021

Rollup merge of rust-lang#82304 - LeSeulArtichaut:unpretty-ast, r=spa…

e0ef270
added a commit that references this issue on Mar 4, 2021

Auto merge of rust-lang#82304 - LeSeulArtichaut:unpretty-ast, r=spast…

added 3 commits that reference this issue on Mar 11, 2021

Rollup merge of rust-lang#82860 - LeSeulArtichaut:unpretty-thir, r=sp…

2515638

Rollup merge of rust-lang#82860 - LeSeulArtichaut:unpretty-thir, r=sp…

26d4393

Rollup merge of rust-lang#82860 - LeSeulArtichaut:unpretty-thir, r=sp…

f183a3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was accepted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @estebank@LeSeulArtichaut@rustbot

        Issue actions

          Add `-Z unpretty` flags for the AST and the THIR · Issue #408 · rust-lang/compiler-team