• 0 Posts
  • 2 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle
  • pgsuper@lemmy.worldtoRust ProgrammingRust Pro Tips (collection)
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Nice job! I’d add that the target of the Rustdoc link shortcuts can be customized, in case they are not autodetected or point to an undesired location, like so:

    /// Use a [Tool]
    ///
    /// [Tool]: lib::types::Tool
    

    That will make the word Tool point to that type (note that the namespaces there - in lib::types::Tool - are relative to the current module / context, so you can use an imported name directly there too, for example).