Giter VIP home page Giter VIP logo

Comments (9)

pitaj avatar pitaj commented on June 22, 2024 1

rustdoc? do you mean rustfmt?

Woops yes, fixed

from rust.

tmandry avatar tmandry commented on June 22, 2024

It looks like there's no owner driving forward on an implementation, which we need by May 1. If there's no owner of this we should take it out of the style guide for 2024.

@calebcartwright Is this something you can own the implementation of? If not, is there an alternative owner?

from rust.

calebcartwright avatar calebcartwright commented on June 22, 2024

It looks like there's no owner driving forward on an implementation, which we need by May 1

Not objecting to this specific deadline, but also first I'm hearing of a May 1st date. Is there a communication channel I should be monitoring?

@calebcartwright Is this something you can own the implementation of? If not, is there an alternative owner?

Sure put my name down. I'm a little puzzled by the overall approach to tracking these, likely due to my own ignorance. The "implementation" is changing a boolean value, so for my own 0.02 this all feels a bit too detailed and granular 🤷

from rust.

pitaj avatar pitaj commented on June 22, 2024

Just want to bring up a caveat.

I don't know how well tested the rustfmt feature is. There may or may not be some behavior differences between the current implementation in rustfmt and the specified behavior in the style guide.

from rust.

ytmimi avatar ytmimi commented on June 22, 2024

rustdoc? do you mean rustfmt?

from rust.

ytmimi avatar ytmimi commented on June 22, 2024

I don't know how well tested the rustfmt feature is. There may or may not be some behavior differences between the current implementation in rustfmt and the specified behavior in the style guide.

looks like there are some tests in rustfmt. Given that overflow_delimited_expr is still unstable I think it wouldn't hurt to double check that the implementation matches what's described in the style guide and maybe add some extra test cases.

from rust.

ytmimi avatar ytmimi commented on June 22, 2024

@pitaj I believe the formatting issues you brought up in #114764 (comment) and #114764 (comment) are still issues for rustfmt unless this is the correct formatting based on the style guide:

running with overflow_delimited_expr=true

fn main() {
vbuf.write(i * 3, Bar(
    Foo { x: 1, y: 2, z: 3 },
    Foo { x: 1, y: 2, z: 3 },
    Foo { x: 1, y: 2, z: 3 },
));

vbuf.write(i + 3, &[
    [h - 0.1, v],
    [h - 0.1, v],
    [h - 0.1, v],
    [h - 0.1, v],
]);
}

into

fn main() {
    vbuf.write(
        i * 3,
        Bar(Foo { x: 1, y: 2, z: 3 }, Foo { x: 1, y: 2, z: 3 }, Foo {
            x: 1,
            y: 2,
            z: 3,
        }),
    );

    vbuf.write(i + 3, &[[h - 0.1, v], [h - 0.1, v], [h - 0.1, v], [
        h - 0.1,
        v,
    ]]);
}

from rust.

pitaj avatar pitaj commented on June 22, 2024

I consider those cases unfortunate, but they actually do match the behavior as currently specified by the style guide.

I did try my hand at writing up a policy to adjust for those, but it wasn't included in the end.

I think users can use comments to force specific formatting in those cases.

from rust.

ytmimi avatar ytmimi commented on June 22, 2024

How common are those cases? I can image that some users might find this formatting worse than overflow_delimited_expr=false.

@calebcartwright I know that technically the implementation is as simple as flipping a boolean to enable this by default, but I'd also want to stabilize overflow_delimited_expr at the same time so users at least have the option to turn this off.

from rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.