-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
This is an example of a current rustdoc from core:
#[doc(
desc = "
Convert a string to a float
This function accepts strings such as
* '3.14'
* '+3.14', equivalent to '3.14'
* '-3.14'
* '2.5E10', or equivalently, '2.5e10'
* '2.5E-10'
* '', or, equivalently, '.' (understood as 0)
* '5.'
* '.5', or, equivalently, '0.5'
Leading and trailing whitespace are ignored.
",
args(
num = "A string"
),
return = "
none if the string did not represent a valid number. Otherwise, some(n) where
n is the floating-point number represented by [num].
")]
All of the extra attribute stuff is noise. Without much difficulty we could parse markdown like:
#[doc = "
Convert a string to a float
This function accepts strings such as
* '3.14'
* '+3.14', equivalent to '3.14'
* '-3.14'
* '2.5E10', or equivalently, '2.5e10'
* '2.5E-10'
* '', or, equivalently, '.' (understood as 0)
* '5.'
* '.5', or, equivalently, '0.5'
Leading and trailing whitespace are ignored.
Arguments:
* num - A string
Returns:
none if the string did not represent a valid number. Otherwise, some(n) where
n is the floating-point number represented by [num].
"]
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.