-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Improve the function pointer docs #98180
Conversation
Some changes occurred in cc @camelid Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1244cdb
to
75568c8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
75568c8
to
97dd790
Compare
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
This comment was marked as resolved.
This comment was marked as resolved.
The attribute is also renamed `fake_variadic`.
97dd790
to
1713e0e
Compare
That’s unfortunate, and I’m not sure what the right solution is, but it’s needed to signal that the impl:
Both, at the same time. |
It's so weird. I don't think we can do better or at least I don't see how. Would be nice if we could also improve the sidebar items because having the same one multiple times isn't great (but not part of this PR). |
Looks good to me, thanks! I'd just like to have someone from the compiler to confirm the changes on their side before approving it though. I'll let you ping someone from their team. |
r? rust-lang/compiler |
r=me after squashing commits. |
a60af82
to
da9869f
Compare
* Reduce duplicate impls; show only the `fn (T)` and include a sentence saying that there exists up to twelve of them. * Show `Copy` and `Clone`. * Show auto traits like `Send` and `Sync`, and blanket impls like `Any`.
da9869f
to
ddb5a26
Compare
@bors r=petrochenkov,GuillaumeGomez rollup=never |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9a7b7d5): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
The regressions above are all in doc generation, and they are all minor. @rustbot label: +perf-regression-triaged |
…ke-variadic, r=notriddle rustdoc: Remove space from fake-variadic fn ptr impls before: `for fn (T₁, T₂, …, Tₙ) -> Ret` after: `for fn(T₁, T₂, …, Tₙ) -> Ret` I don't think we usually have spaces there, so it looks weird. cc `@notriddle` since you added the space in rust-lang#98180 (or rather, added the feature with a space included).
…-variadic, r=notriddle rustdoc: Remove space from fake-variadic fn ptr impls before: `for fn (T₁, T₂, …, Tₙ) -> Ret` after: `for fn(T₁, T₂, …, Tₙ) -> Ret` I don't think we usually have spaces there, so it looks weird. cc `@notriddle` since you added the space in rust-lang#98180 (or rather, added the feature with a space included).
…, r=notriddle rustdoc: Remove space from fake-variadic fn ptr impls before: `for fn (T₁, T₂, …, Tₙ) -> Ret` after: `for fn(T₁, T₂, …, Tₙ) -> Ret` I don't think we usually have spaces there, so it looks weird. cc `@notriddle` since you added the space in rust-lang/rust#98180 (or rather, added the feature with a space included).
This is #97842 but for function pointers instead of tuples. The concept is basically the same.
fn (T₁, T₂, …, Tₙ)
and include a sentence saying that there exists up to twelve of them.Copy
andClone
.Send
andSync
, and blanket impls likeAny
.https://notriddle.com/notriddle-rustdoc-test/std/primitive.fn.html