about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-24 10:29:29 +0000
committerbors <bors@rust-lang.org>2020-08-24 10:29:29 +0000
commitaa7010df9027c5c346ab32b3a7fefca06365856f (patch)
treee5d20d660f37b5489e9ebfa8cf865bf93738b489 /compiler/rustc_parse/src
parent9d7456243244141808b39ee8ed32767a7a1dc7d7 (diff)
parent25cfd57b49b84fda6cd5b87072bc7e9fe0c582ce (diff)
downloadrust-aa7010df9027c5c346ab32b3a7fefca06365856f.tar.gz
rust-aa7010df9027c5c346ab32b3a7fefca06365856f.zip
Auto merge of #75815 - jyn514:ambiguous-primitives, r=guillaumegomez
Report an ambiguity if both modules and primitives are in scope for intra-doc links

Closes https://github.com/rust-lang/rust/issues/75381

- Add a new `prim@` disambiguator, since both modules and primitives are in the same namespace
- Refactor `report_ambiguity` into a closure

Additionally, I noticed that rustdoc would previously allow `[struct@char]` if `char` resolved to a primitive (not if it had a DefId). I fixed that and added a test case.

I also need to update libstd to use `prim@char` instead of `type@char`. If possible I would also like to refactor `ambiguity_error` to use `Disambiguator` instead of its own hand-rolled match - that ran into issues with `prim@` (I updated one and not the other) and it would be better for them to be in sync.
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions