Add new tyalias intra-doc link disambiguator#147027
Conversation
tyalias intra-doc link disambiguator
| "value" => NS(Namespace::ValueNS), | ||
| "macro" => NS(Namespace::MacroNS), | ||
| "prim" | "primitive" => Primitive, | ||
| "tyalias" => Kind(DefKind::TyAlias), |
There was a problem hiding this comment.
I think we should also accept typealias, similar to how constant and primitive are accepted as alternate long forms.
There was a problem hiding this comment.
Sounds good to me.
| /// This function returns [`f32`]. | ||
| //~^ ERROR: `f32` is both a type alias and a primitive type | ||
| //~| HELP: to link to the type alias, prefix with `tyalias@` | ||
| //~| HELP: to link to the primitive type, prefix with `prim@` | ||
| pub fn my_fn() -> f32 {} |
There was a problem hiding this comment.
What happens if we link to type@f32? It would be nice to also check that case.
| #![crate_name = "foo"] | ||
|
|
There was a problem hiding this comment.
| #![crate_name = "foo"] | |
| #![crate_name = "foo"] | |
| #![deny(rustdoc::broken_intra_doc_links)] |
the rustdoc gui suite is not run with -Dwarnings.
5a1b6e4 to
5c710d7
Compare
|
Applied suggestions. |
|
@bors r=lolbinarycat rollup |
…or, r=lolbinarycat Add new `tyalias` intra-doc link disambiguator Fixes rust-lang#146855. Alternative to rust-lang#146866. This adds support for a new disambiguator: `tyalias`. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them. cc `@fmease` r? lolbinarycat
Rollup of 8 pull requests Successful merges: - #146283 (Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.) - #146453 (Add general arm-linux.md platform doc.) - #146991 (const_caller_location to use real Span instead of `DUMMY_SP`) - #146994 (Add `clippy::unconditional_recursion` to `./x clippy ci`) - #147027 (Add new `tyalias` intra-doc link disambiguator) - #147038 (Rename verbosity functions in bootstrap) - #147047 (rustdoc: put the toolbar on the all item index) - #147049 (std: fix warning in VEXos stdio module) r? `@ghost` `@rustbot` modify labels: rollup
5c710d7 to
f675271
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@matthiaskrgr Tested locally and then rebased and re-tested locally, no issue. Not sure it was coming from this PR but maybe a mix with another. @bors r=lolbinarycat rollup |
…or, r=lolbinarycat Add new `tyalias` intra-doc link disambiguator Fixes rust-lang#146855. Alternative to rust-lang#146866. This adds support for a new disambiguator: `tyalias`. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them. cc `@fmease` r? lolbinarycat
Rollup of 7 pull requests Successful merges: - #145113 (resolve: Do not finalize shadowed bindings) - #146523 (Demote both armebv7r-none-* targets.) - #146778 (Use standard attribute logic for allocator shim) - #147016 (fix doc comments to be more standard) - #147027 (Add new `tyalias` intra-doc link disambiguator) - #147031 (mbe: Simplify check_redundant_vis_repetition) - #147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) r? `@ghost` `@rustbot` modify labels: rollup
|
still failing |
|
Ah, I think it's a channel issue. |
f675271 to
62c457b
Compare
|
It was indeed a channel issue. ^^' @bors r=lolbinarycat rollup |
…or, r=lolbinarycat Add new `tyalias` intra-doc link disambiguator Fixes rust-lang#146855. Alternative to rust-lang#146866. This adds support for a new disambiguator: `tyalias`. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them. cc `@fmease` r? lolbinarycat
Rollup of 10 pull requests Successful merges: - #145113 (resolve: Do not finalize shadowed bindings) - #146523 (Demote both armebv7r-none-* targets.) - #146704 (port `#[debugger_visualizer]` to the new attribute system) - #146758 (Stop linking rs{begin,end} objects on x86_64-*-windows-gnu) - #146778 (Use standard attribute logic for allocator shim) - #146849 (Reduce some uses of `LegacyBang`) - #147016 (fix doc comments to be more standard) - #147027 (Add new `tyalias` intra-doc link disambiguator) - #147031 (mbe: Simplify check_redundant_vis_repetition) - #147058 (Ignore more failing ui tests for GCC backend) Failed merges: - #147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - #145113 (resolve: Do not finalize shadowed bindings) - #146523 (Demote both armebv7r-none-* targets.) - #146704 (port `#[debugger_visualizer]` to the new attribute system) - #146758 (Stop linking rs{begin,end} objects on x86_64-*-windows-gnu) - #146778 (Use standard attribute logic for allocator shim) - #146849 (Reduce some uses of `LegacyBang`) - #147016 (fix doc comments to be more standard) - #147027 (Add new `tyalias` intra-doc link disambiguator) - #147031 (mbe: Simplify check_redundant_vis_repetition) - #147058 (Ignore more failing ui tests for GCC backend) Failed merges: - #147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147027 - GuillaumeGomez:tyalias-disambiguator, r=lolbinarycat Add new `tyalias` intra-doc link disambiguator Fixes #146855. Alternative to #146866. This adds support for a new disambiguator: `tyalias`. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them. cc ``@fmease`` r? lolbinarycat
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145113 (resolve: Do not finalize shadowed bindings) - rust-lang/rust#146523 (Demote both armebv7r-none-* targets.) - rust-lang/rust#146704 (port `#[debugger_visualizer]` to the new attribute system) - rust-lang/rust#146758 (Stop linking rs{begin,end} objects on x86_64-*-windows-gnu) - rust-lang/rust#146778 (Use standard attribute logic for allocator shim) - rust-lang/rust#146849 (Reduce some uses of `LegacyBang`) - rust-lang/rust#147016 (fix doc comments to be more standard) - rust-lang/rust#147027 (Add new `tyalias` intra-doc link disambiguator) - rust-lang/rust#147031 (mbe: Simplify check_redundant_vis_repetition) - rust-lang/rust#147058 (Ignore more failing ui tests for GCC backend) Failed merges: - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145113 (resolve: Do not finalize shadowed bindings) - rust-lang/rust#146523 (Demote both armebv7r-none-* targets.) - rust-lang/rust#146704 (port `#[debugger_visualizer]` to the new attribute system) - rust-lang/rust#146758 (Stop linking rs{begin,end} objects on x86_64-*-windows-gnu) - rust-lang/rust#146778 (Use standard attribute logic for allocator shim) - rust-lang/rust#146849 (Reduce some uses of `LegacyBang`) - rust-lang/rust#147016 (fix doc comments to be more standard) - rust-lang/rust#147027 (Add new `tyalias` intra-doc link disambiguator) - rust-lang/rust#147031 (mbe: Simplify check_redundant_vis_repetition) - rust-lang/rust#147058 (Ignore more failing ui tests for GCC backend) Failed merges: - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #146855.
Alternative to #146866.
This adds support for a new disambiguator:
tyalias. I think it's common enough to have type aliases nowaday, so no reason to not be able to have a disambiguator for them.cc @fmease
r? lolbinarycat