Skip to content

pretty printer adds an extra space in borrowed pointer return type #4161

Description

@thestinger

Simple test case:

struct Foo {
    i: int,
}

impl Foo {
    fn bar(&self) -> &self/int { &self.i }
}

fn main() { }

The pretty printer outputs this:

struct Foo {
    i: int,
}

impl Foo {
    fn bar(&self) -> &self /int { &self.i }
}

fn main() { }

Note the space between &self and /int, which is different than how it's usually printed out.

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`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions