Skip to content

Rollup of 7 pull requests #110481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
28d27fd
Set git info env variables when building tools
duckymirror Apr 5, 2023
d535af3
Add needs-git-hash header to compiletest
duckymirror Apr 6, 2023
135e620
Add regression test for issue 107094
duckymirror Apr 7, 2023
550df4d
Change mode of Makefile of test for issue 107094
duckymirror Apr 7, 2023
bfa8798
Fix error due to renaming of ignore_git
duckymirror Apr 9, 2023
7859a8e
Don't use `serde_json` to serialize a simple JSON object
Noratrieb Apr 16, 2023
4cd0e00
avoid including dry run steps in the build metrics
pietroalbini Apr 17, 2023
a091fd2
Add list of supported disambiguators and suffixes for intra-doc links…
GuillaumeGomez Apr 15, 2023
1531c95
Add code comment to remind contributors to update rustdoc book if the…
GuillaumeGomez Apr 15, 2023
f91d02b
Remove unused RustdocVisitor::visit_item_inner return type
GuillaumeGomez Apr 17, 2023
c3c9f8f
Fix invalid handling of nested items with `--document-private-items`
GuillaumeGomez Apr 17, 2023
0a763c9
Make commit-date pattern more specific in test for issue 107094
duckymirror Apr 17, 2023
9534541
Use `Item::expect_*` and `ImplItem::expect_*` more
WaffleLapkin Apr 17, 2023
880da9f
doc fix
WaffleLapkin Apr 17, 2023
c456e15
Add regression tests for #110422
GuillaumeGomez Apr 17, 2023
c960a04
Assure everyone that `has_type_flags` is fast
WaffleLapkin Apr 17, 2023
06d403d
Rollup merge of #109981 - duckymirror:issue-107094, r=albertlarsan68
matthiaskrgr Apr 18, 2023
afea84f
Rollup merge of #110348 - GuillaumeGomez:disambiguators-suffixes-rust…
matthiaskrgr Apr 18, 2023
41ae7fc
Rollup merge of #110409 - Nilstrieb:some-manual-javascript-object-not…
matthiaskrgr Apr 18, 2023
1e3a384
Rollup merge of #110442 - ferrocene:pa-build-metrics-dry-run, r=ozkan…
matthiaskrgr Apr 18, 2023
d646891
Rollup merge of #110450 - GuillaumeGomez:fix-nested-items-on-private-…
matthiaskrgr Apr 18, 2023
d97b39d
Rollup merge of #110461 - WaffleLapkin:expect_, r=Nilstrieb
matthiaskrgr Apr 18, 2023
5606653
Rollup merge of #110465 - WaffleLapkin:assure_everyone_that_has_type_…
matthiaskrgr Apr 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ fn Foo() {}
```

These prefixes will be stripped when displayed in the documentation, so `[struct@Foo]` will be
rendered as `Foo`.
rendered as `Foo`. The following prefixes are available: `struct`, `enum`, `trait`, `union`,
`mod`, `module`, `const`, `constant`, `fn`, `function`, `method`, `derive`, `type`, `value`,
`macro`, `prim` or `primitive`.

You can also disambiguate for functions by adding `()` after the function name,
or for macros by adding `!` after the macro name:
or for macros by adding `!` after the macro name. The macro `!` can be followed by `()`, `{}`,
or `[]`. Example:

```rust
/// This is different from [`foo!`]
/// This is different from [`foo!()`].
fn foo() {}

/// This is different from [`foo()`]
Expand Down
2 changes: 2 additions & 0 deletions src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,7 @@ impl Disambiguator {
if let Some(idx) = link.find('@') {
let (prefix, rest) = link.split_at(idx);
let d = match prefix {
// If you update this list, please also update the relevant rustdoc book section!
"struct" => Kind(DefKind::Struct),
"enum" => Kind(DefKind::Enum),
"trait" => Kind(DefKind::Trait),
Expand All @@ -1437,6 +1438,7 @@ impl Disambiguator {
Ok(Some((d, &rest[1..], &rest[1..])))
} else {
let suffixes = [
// If you update this list, please also update the relevant rustdoc book section!
("!()", DefKind::Macro(MacroKind::Bang)),
("!{}", DefKind::Macro(MacroKind::Bang)),
("![]", DefKind::Macro(MacroKind::Bang)),
Expand Down