Skip to content

pretty printer doesn't know how to print the omitted type _ marker #31073

Closed
@pnkfelix

Description

@pnkfelix

pretty printer doesn't know how to print the omitted type _ marker

example:

fn main() {
    fn f1(x: i32, y: i32) -> i32 { y }
    let f: fn(_, i32) -> i32 = f1;
    //        ~
    //        |
    //        +--- this is pretty-printed badly.
    f(13);
}

pretty prints this way:

% ./x86_64-apple-darwin/stage1/bin/rustc --pretty -Z unstable-options pp-1.rs
fn main() {
    fn f1(x: i32, y: i32) -> i32 { y }
    let f: fn(, i32) -> i32 = f1;
    //        ~
    //        |
    //        +--- this is pretty-printed badly.
    f(13);
}
% 

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions