Comments (9)
rustdoc? do you mean rustfmt?
Woops yes, fixed
from rust.
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.
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.
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.
rustdoc? do you mean rustfmt?
from rust.
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.
@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.
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.
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)
- ICE: `expected region for ..` HOT 4
- Crash rustc HOT 2
- Confusing compiler suggestion with type/variable with underscore prefix
- Massive memory usage when type annotations needed HOT 19
- pre-push hook should only look at staged changes
- `No bound vars found for HirId(DefId(` in compiler/rustc_middle/src/ty/context.rs
- assertion `left == right` failed
- rustdoc ignores `cargo` and linker settings when compiling doc tests HOT 1
- Rust 1.78 Does Not Return c_void Pointer Correctly HOT 8
- Incorrect error when polling non-pinned future from future wrapper
- "--json-output" is ignored by tool builds HOT 2
- ICE: `still mutable` HOT 2
- ICE: mir build: scope: `index out of bounds: the len is 0 but the index is 0` HOT 6
- ICE: mir_build: `no entry found for key` HOT 2
- ICE: const: body_owned_by expr `const ..` has no associated body
- Encountered incremental compilation error with find_field(a5f984281f1e0bb0-ee8ea99685b18732) HOT 5
- ICE: `offset of unsized field (type dyn [Binder(Trait(std::fmt::Debug), [])] + '{erased}) cannot be computed statically` HOT 1
- `non_local_definitions` triggers on macro-generated code HOT 13
- `E0277` Emitted Twice HOT 1
- Tracking Issue for `new_range_api` (part of RFC 3550)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.