declare that "///" is still a doc comment, just not "////+" (fixes #5838)#6680
Closed
ben0x539 wants to merge 1 commit intorust-lang:incomingfrom
Closed
declare that "///" is still a doc comment, just not "////+" (fixes #5838)#6680ben0x539 wants to merge 1 commit intorust-lang:incomingfrom
ben0x539 wants to merge 1 commit intorust-lang:incomingfrom
Conversation
Contributor
Author
|
My backup plan would have been to lex multiple line doc comments with only non- This is (I think) my first non-docs non-examples non-formatting pull request, please bear with me if I'm doing it wrong. Tests still pass and it seems to work out and there's some amount of generated docs that are better formatted/have better summary vs rest of info splits, and no formatting 'regressions' that I could spot. |
Contributor
|
This is good. @brson r? |
bors
added a commit
that referenced
this pull request
May 24, 2013
There's currently a function in the lexer that rejects a line comment that is all slashes from being a doc comment. I think the intention was that you could draw boxes,
/////////////
// like so //
/////////////
Since a line doc comment split up over multiple paragraphs will have a "blank" line that is just /// between the paragraphs, that would get mistaken for a box segment, lexed as a regular comment, and go missing from the sequence of doc comment attributes before they were reassembled by rustdoc into markdown input.
I figure the best plan here is to just declare that a comment that is exactly `///` is a doc comment after all, and to only omit comments with four slashes or more, which is what this commit implements. Can't really draw boxes that narrow, anyway.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Mar 11, 2021
…lip1995 Refactor: arrange transmute lints This PR arranges `transmute` lints so that they can be accessed more easily. Basically, I followed the instruction described in rust-lang#6680 as to how to do the refactoring. - `declare_clippy_lint!` and `impl LintPass` is placed in `transmute/mod.rs` - Uitlity functions is placed in `transmute/utils.rs` - Each lint function about `transmute` is moved into its own module, like `transmute/useless_transmute.rs` For ease of review, I refactored step by step, keeping each commit small. For instance, all I did in 2451781 was to move `useless_transmute` into its own module. --- changelog: Refactor `transmute.rs` file into `transmute` module.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Mar 12, 2021
Refactor: arrange lints in `methods` module This PR arranges methods lints so that they can be accessed more easily. Basically, I refactored them following the instruction described in rust-lang#6680. changelog: Move lints in methods module into their own modules.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Mar 25, 2021
…le, r=phansch Refactor lints in methods module This PR refactors methods lints other than the lints I refactored in rust-lang/rust-clippy#6826 and moves some functions to methods/utils.rs. Basically, I follow the instruction described in rust-lang#6680. **For ease of review, I refactored step by step, keeping each commit small.** closes rust-lang/rust-clippy#6886 cc: `@phansch,` `@flip1995,` `@Y-Nak` changelog: Move lints in methods module to their own modules and some function to methods/utils.rs.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Apr 8, 2021
Organize functions into functions module Ref: rust-lang#6680 Rearrange lints in `functions`. changelog: none
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
May 6, 2021
…llogiq Refactor: arrange lints in misc_early module This PR arranges misc_early lints so that they can be accessed more easily. Basically, I refactored them following the instruction described in rust-lang#6680. cc: `@Y-Nak,` `@flip1995,` `@magurotuna` changelog: Move lints in misc_early module into their own modules.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 10, 2022
Split matches Part of rust-lang#6680 changelog: None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's currently a function in the lexer that rejects a line comment that is all slashes from being a doc comment. I think the intention was that you could draw boxes,
Since a line doc comment split up over multiple paragraphs will have a "blank" line that is just /// between the paragraphs, that would get mistaken for a box segment, lexed as a regular comment, and go missing from the sequence of doc comment attributes before they were reassembled by rustdoc into markdown input.
I figure the best plan here is to just declare that a comment that is exactly
///is a doc comment after all, and to only omit comments with four slashes or more, which is what this commit implements. Can't really draw boxes that narrow, anyway.