-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from geo-ant/feature/documenting-generics
Feature/documenting generics
- Loading branch information
Showing
7 changed files
with
216 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
21 changes: 21 additions & 0 deletions
21
tests/expansion/roxygen_with_args_section_and_generics.expanded.rs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use roxygen::*; | ||
/// this is documentation | ||
/// and this is too | ||
/// | ||
/// **Arguments**: | ||
/// | ||
/// * `bar`: this has one line of docs | ||
/// * `baz`: this has | ||
/// two lines of docs | ||
/// | ||
/// **Generics**: | ||
/// | ||
/// * `a`: a lifetime | ||
/// * `T`: documentation for parameter T | ||
/// spans multiple lines | ||
/// * `N`: a const generic | ||
/// | ||
/// this goes after the arguments section | ||
fn foo<'a, S, T, const N: usize>(bar: u32, baz: String, _undocumented: i32) -> bool { | ||
baz.len() > bar as usize | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use roxygen::*; | ||
|
||
#[roxygen] | ||
/// this is documentation | ||
/// and this is too | ||
#[arguments_section] | ||
/// this goes after the arguments section | ||
fn foo< | ||
/// a lifetime | ||
'a, | ||
S, | ||
/// documentation for parameter T | ||
/// spans multiple lines | ||
T, | ||
/// a const generic | ||
const N: usize, | ||
>( | ||
/// this has one line of docs | ||
bar: u32, | ||
/// this has | ||
/// two lines of docs | ||
baz: String, | ||
_undocumented: i32, | ||
) -> bool { | ||
baz.len() > bar as usize | ||
} |
This file contains 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