Skip to content

Pretty printer inlines modules #12590

Description

@chris-morgan

a.rs:

// a.rs
mod b;

b.rs:

// b.rs
fn b() { }

Expected output of rustc --pretty normal a.rs:

// a.rs
mod b;

Actual output of rustc --pretty normal a.rs:

// a.rs
mod b {
    fn b() { }
}

Note the two problems here: (a) the module is inlined, and (b) the comment in the module is lost. But by fixing the first, the second becomes irrelevant.

Activity

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

    A-prettyArea: Pretty printing (including `-Z unpretty`)C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions