Skip to content

Pretty printer inlines modules #12590

Closed
Closed
@chris-morgan

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.

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