Skip to content

Comment in supertrait list causes line duplication #2166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CAD97 opened this issue Nov 19, 2017 · 2 comments
Closed

Comment in supertrait list causes line duplication #2166

CAD97 opened this issue Nov 19, 2017 · 2 comments

Comments

@CAD97
Copy link
Contributor

CAD97 commented Nov 19, 2017

playground link

use std::ops;

pub trait Slice
    : ops::Index<ops::Range<usize>, Output = Self>
    + ops::Index<ops::RangeFrom<usize>, Output = Self>
    + ops::Index<ops::RangeFull, Output = Self>
    + ops::Index<ops::RangeTo<usize>, Output = Self>
    // + ops::Index<ops::RangeInclusive<usize>, Output = Self>
    // + ops::Index<ops::RangeToInclusive<usize>, Output = Self>
    + ops::Index<ops::RangeTo<usize>, Output = Self> {
}

when formatted gives

use std::ops;

pub trait Slice
    : ops::Index<ops::Range<usize>, Output = Self>
    + ops::Index<ops::RangeFrom<usize>, Output = Self>
    + ops::Index<ops::RangeFull, Output = Self>
    + ops::Index<ops::RangeTo<usize>, Output = Self>
    + ops::Index<ops::RangeTo<usize>, Output = Self>
// + ops::Index<ops::RangeInclusive<usize>, Output = Self>
    // + ops::Index<ops::RangeToInclusive<usize>, Output = Self>
    + ops::Index<ops::RangeTo<usize>, Output = Self> {
}

Each subsequent format duplicates the line above the comment again.

@topecongiro
Copy link
Contributor

Thank you for filing an issue, I will close this as this is a duplicate of #2055.

@CAD97
Copy link
Contributor Author

CAD97 commented Nov 19, 2017

My search has a long way to improve... I looked but did not find the preexisting report. Sorry for the dupe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants