Skip to content

Commit

Permalink
riscv-semihosting: fix ambiguous documentation link
Browse files Browse the repository at this point in the history
Fix the following warning when generating the crate documentation:

warning: `syscall` is both a function and a macro
   --> riscv-semihosting/src/lib.rs:212:15
    |
212 | /// Same as [`syscall`].
    |               ^^^^^^^ ambiguous link
    |
    = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
help: to link to the function, add parentheses
    |
212 | /// Same as [`syscall()`].
    |                      ++
help: to link to the macro, add an exclamation mark
    |
212 | /// Same as [`syscall!`].
    |                      +
  • Loading branch information
clopez-oc committed Jul 30, 2024
1 parent 5612138 commit cfbe28e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions riscv-semihosting/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

- Made `cfg` variable selection more robust for custom targets
- Fixed debug::exit() on riscv64 QEMU simulation
- Fixed an ambiguous link in the generated crate documentation.

## [v0.1.0] - 2023-01-18

Expand Down
2 changes: 1 addition & 1 deletion riscv-semihosting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ pub unsafe fn syscall<T>(nr: usize, arg: &T) -> usize {
///
/// # Safety
///
/// Same as [`syscall`].
/// Same as [`syscall()`].
#[inline(always)]
pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
match () {
Expand Down

0 comments on commit cfbe28e

Please sign in to comment.