Skip to content
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

comments within parameter list not idempotent #3847

Open
bddap opened this issue Oct 8, 2019 · 2 comments
Open

comments within parameter list not idempotent #3847

bddap opened this issue Oct 8, 2019 · 2 comments
Labels
1x-backport:pending Fixed/resolved in source but not yet backported to a 1x branch and release a-comments bug Panic, non-idempotency, invalid code, etc.

Comments

@bddap
Copy link

bddap commented Oct 8, 2019

"not idempotent". Does does that make it aliumpotent?

Input

type T = Result<
    u32 // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
        // diam ac cursus. Aliquam condimentum in erat quis pretium.
        // accumsan urna. Cras volutpat sit amet quam.
        ,
    bool,
>;

Output (first run)

type T = Result<
    u32, // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
         // diam ac cursus. Aliquam condimentum in erat quis pretium.
         // accumsan urna. Cras volutpat sit amet quam.
    bool,
>;

Output (second run)

type T = Result<
    u32, // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
    // diam ac cursus. Aliquam condimentum in erat quis pretium.
    // accumsan urna. Cras volutpat sit amet quam.
    bool,
>;
@topecongiro topecongiro added a-comments bug Panic, non-idempotency, invalid code, etc. labels Oct 8, 2019
davidBar-On added a commit to davidBar-On/rustfmt that referenced this issue Dec 20, 2020
davidBar-On added a commit to davidBar-On/rustfmt that referenced this issue Dec 20, 2020
calebcartwright pushed a commit that referenced this issue Jan 18, 2021
* Fix for issue #3847 - handle list item one-line multi post-comments

* Fix issue #3847 - indentation of list item several one-line post-comments

* modify comment

* Add handling of first one-line block-comment

* Use some common comments functions

* Add handling of multi-line comment as first comment with debug info

* Some enhancements and remove preserve of empty lines after first multiline comment

* Some refactoring and added comments and test cases

* Fix for the case when the first post-comment is in new line
@ytmimi
Copy link
Contributor

ytmimi commented Jul 21, 2022

Confirming I can still reproduce this with rustfmt 1.5.1-nightly (f2c31ba0 2022-07-19).

Backporting #4606 should hopefully resolve this.

@ytmimi ytmimi added the 1x-backport:pending Fixed/resolved in source but not yet backported to a 1x branch and release label Jul 21, 2022
@ytmimi
Copy link
Contributor

ytmimi commented Jul 26, 2022

When backporting #4606 we should try to add a test case for #5241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1x-backport:pending Fixed/resolved in source but not yet backported to a 1x branch and release a-comments bug Panic, non-idempotency, invalid code, etc.
Projects
None yet
Development

No branches or pull requests

3 participants