Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • rust
  • kernel
  • workqueue.rs
Find file BlameHistoryPermalink
  • Miguel Ojeda's avatar
    rust: support `srctree`-relative links · bc2e7d5c
    Miguel Ojeda authored Dec 16, 2023
    
    
    Some of our links use relative paths in order to point to files in the
    source tree, e.g.:
    
        //! C header: [`include/linux/printk.h`](../../../../include/linux/printk.h)
        /// [`struct mutex`]: ../../../../include/linux/mutex.h
    
    These are problematic because they are hard to maintain and do not support
    `O=` builds.
    
    Instead, provide support for `srctree`-relative links, e.g.:
    
        //! C header: [`include/linux/printk.h`](srctree/include/linux/printk.h)
        /// [`struct mutex`]: srctree/include/linux/mutex.h
    
    The links are fixed after `rustdoc` generation to be based on the absolute
    path to the source tree.
    
    Essentially, this is the automatic version of Tomonori's fix [1],
    suggested by Gary [2].
    
    Suggested-by: default avatarGary Guo <gary@garyguo.net>
    Reported-by: default avatarFUJITA Tomonori <fujita.tomonori@gmail.com>
    Closes: https://lore.kernel.org/r/20231026.204058.2167744626131849993.fujita.tomonori@gmail.com [1]
    Fixes: 48fadf44 ("docs: Move rustdoc output, cross-reference it")
    Link: https://lore.kernel.org/rust-for-linux/20231026154525.6d14b495@eugeo/
    
     [2]
    Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
    Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
    Link: https://lore.kernel.org/r/20231215235428.243211-1-ojeda@kernel.org
    
    
    Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
    bc2e7d5c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7