-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
make ///
doc comments compatible with naked functions
#128380
make ///
doc comments compatible with naked functions
#128380
Conversation
I am a bit confused by this comment here https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ast/struct.Attribute.html#method.is_doc_comment
So, what is |
432528c
to
2ec2631
Compare
Looks like |
yes but I'm not sure what the difference is between |
https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#at-the-item-level allright, so it's directives for how documentation should be rendered. Seems fine to allow |
@bors r+ |
2ec2631
to
58bfd98
Compare
I added a test for |
@bors r+ |
…mment, r=bjorn3 make `///` doc comments compatible with naked functions tracking issue: rust-lang#90957 reported in rust-lang#127853 (comment) it turns out `/// doc comment` and `#[doc = "doc comment"]` are represented differently, at least at the point where we perform the check for what should be allowed. The `///` style doc comment is now also allowed. r? `@bjorn3` cc `@hsanzg`
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#127543 (More unsafe attr verification) - rust-lang#128357 (Detect non-lifetime binder params shadowing item params) - rust-lang#128367 (CI: rfl: build the generated doctests and documentation) - rust-lang#128376 (Mark `Parser::eat`/`check` methods as `#[must_use]`) - rust-lang#128379 (the output in stderr expects panic-unwind) - rust-lang#128380 (make `///` doc comments compatible with naked functions) - rust-lang#128382 (cargo-miri: better error when we seem to run inside bootstrap but something is wrong) - rust-lang#128398 (tidy: Fix quote in error message) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#128357 (Detect non-lifetime binder params shadowing item params) - rust-lang#128367 (CI: rfl: build the generated doctests and documentation) - rust-lang#128376 (Mark `Parser::eat`/`check` methods as `#[must_use]`) - rust-lang#128379 (the output in stderr expects panic-unwind) - rust-lang#128380 (make `///` doc comments compatible with naked functions) - rust-lang#128382 (cargo-miri: better error when we seem to run inside bootstrap but something is wrong) - rust-lang#128398 (tidy: Fix quote in error message) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128380 - folkertdev:naked-compatible-doc-comment, r=bjorn3 make `///` doc comments compatible with naked functions tracking issue: rust-lang#90957 reported in rust-lang#127853 (comment) it turns out `/// doc comment` and `#[doc = "doc comment"]` are represented differently, at least at the point where we perform the check for what should be allowed. The `///` style doc comment is now also allowed. r? ``@bjorn3`` cc ``@hsanzg``
Thank you for the quick fix! |
@rust-timer build ec3d1dd |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ec3d1dd): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 769.587s -> 770.011s (0.06%) |
tracking issue: #90957
reported in #127853 (comment)
it turns out
/// doc comment
and#[doc = "doc comment"]
are represented differently, at least at the point where we perform the check for what should be allowed. The///
style doc comment is now also allowed.r? @bjorn3
cc @hsanzg