Skip to content

Commit

Permalink
Add more disambiguators to match PR
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Feb 2, 2018
1 parent ee53b90 commit 0b17ddf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions text/1946-intra-rustdoc-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,18 @@ Our proposal is this:
- It is possible that disambiguators for one kind of type-namespace object
will work for the other (i.e. you can use `struct@` to refer to an enum),
but do not rely on this.
- Modules exist in both the type and value namespace and can be disambiguated
with a `mod@` or `module@`, e.g. `[module@foo]`
- In links to macros,
the link label can end with a `!`,
e.g., `Look at the [FOO!] macro`. You can alternatively use a `macro@` prefix,
e.g. `[macro@foo]`
- For disambiguating links to values, we differentiate three cases:
- Links to any kind of value (function, const, static) can be prefixed with `value@`,
e.g., `See [value@foo]`.
- Links to functions can be written with a `()` suffix,
e.g., `Also see the [foo()] function`. You can also use `function@`.
- Links to functions and methods can be written with a `()` suffix,
e.g., `Also see the [foo()] function`. You can also use `function@`, `fn@`,
or `method@`.
- Links to constants are prefixed with `const@`,
e.g., `As defined in [const@FOO].`
- Links to statics are prefixed with `static@`,
Expand Down

0 comments on commit 0b17ddf

Please sign in to comment.