bors
9aa5c24b7d
Auto merge of #108075 - WaffleLapkin:de-arena-allocates-you-OwO, r=Nilstrieb
...
Remove `arena_cache` modifier from `associated_item` query & copy `ty::AssocItem` instead of passing by ref
r? `@ghost`
2023-02-17 17:42:51 +00:00
Kyle Matsuda
f6c3469aa2
fix new usage of type_of
2023-02-16 17:05:59 -07:00
Kyle Matsuda
c183110cc2
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
2023-02-16 17:05:56 -07:00
Kyle Matsuda
d822b97a27
change usages of type_of to bound_type_of
2023-02-16 17:01:52 -07:00
Matthias Krüger
09ab35b574
Rollup merge of #108076 - GuillaumeGomez:more-let-chain, r=notriddle
...
rustdoc: Use more let chain
Got the idea after yesterday's review.
r? `@notriddle`
2023-02-15 21:30:59 +01:00
Maybe Waffle
dce666b797
Copy ty::AssocItem even in rustdoc
2023-02-15 20:22:45 +00:00
Guillaume Gomez
86fd5a1b44
Use more let chain
2023-02-15 12:00:03 +01:00
Camille GILLOT
03dff82d59
Add of_trait to DefKind::Impl.
2023-02-14 19:55:44 +00:00
bors
e9ab7872fd
Auto merge of #107765 - petrochenkov:nomoclone, r=oli-obk
...
rustc/rustdoc: Perform name resolver cleanups enabled by #94857
Unblocks https://github.com/rust-lang/rust/pull/105462 .
r? `@oli-obk`
2023-02-14 05:59:44 +00:00
Nicholas Nethercote
7a72560154
Reduce direct mk_ty usage.
...
We use more specific `mk_*` functions in most places, might as well use
them as much as possible.
2023-02-13 09:32:48 +11:00
Vadim Petrochenkov
9080b79f2b
rustdoc: Eliminate remaining uses of resolver
2023-02-13 00:10:15 +04:00
bors
00cf19a75a
Auto merge of #107933 - petrochenkov:rmdlc, r=GuillaumeGomez
...
rustdoc: Remove cache for preprocessed markdown links
It's quite possible that it's no longer useful after https://github.com/rust-lang/rust/pull/94857 is merged.
2023-02-12 14:28:43 +00:00
Vadim Petrochenkov
0e61d3ab3f
rustdoc: Remove cache for preprocessed markdown links
2023-02-11 22:27:02 +04:00
Matthias Krüger
c8614a7479
Rollup merge of #107912 - clubby789:doc-bad-enum-field, r=camelid,GuillaumeGomez
...
rustdoc: Don't resolve link to field on different variant
Fix #107903
This also gives a more specific diagnostic when the enum has any fields
2023-02-11 17:18:45 +01:00
clubby789
ef8de38c84
rustdoc: Don't resolve link to field on different variant
2023-02-11 12:28:35 +00:00
Vadim Petrochenkov
b62b82aef4
Resolve documentation links in rustc and store the results in metadata
...
This commit implements MCP https://github.com/rust-lang/compiler-team/issues/584
It also removes code that is no longer used, and that includes code cloning resolver, so issue #83761 is fixed.
2023-02-10 09:34:13 +04:00
bors
6c991b0740
Auto merge of #107000 - GuillaumeGomez:fix-items-in-doc-hidden-block, r=notriddle,petrochenkov
...
Fix handling of items inside a `doc(hidden)` block
Fixes #106373 .
cc `@aDotInTheVoid`
r? `@notriddle`
2023-02-02 21:14:44 +00:00
Guillaume Gomez
ea844187b2
Special-case handling of impl blocks
2023-01-27 20:33:42 +01:00
Camille GILLOT
1974b6b68d
Introduce GeneratorWitnessMIR.
2023-01-27 18:58:44 +00:00
Guillaume Gomez
5b654a7e5e
Fix handling of items inside a doc(hidden) block
2023-01-27 14:50:33 +01:00
bors
6874f4e3fc
Auto merge of #107054 - petrochenkov:effvisdoc3, r=GuillaumeGomez
...
rustdoc: Collect "rustdoc-reachable" items during early doc link resolution
This pass only needs to know about visibilities, attributes and reexports, so it can be run early, similarly to `compute_effective_visibilities` in rustc.
Results of this pass can be used to prune the list of extern impls early thus improving performance of https://github.com/rust-lang/rust/pull/94857 .
2023-01-27 09:01:05 +00:00
Vadim Petrochenkov
347fa7a26f
rustdoc: Stop using HirIds
...
Use `LocalDefId`s instead
2023-01-26 16:45:49 +04:00
Vadim Petrochenkov
398225842c
rustdoc: Don't put non rustdoc-reachable impls into all_trait_impls
2023-01-25 23:39:29 +04:00
Vadim Petrochenkov
ca93310eb7
rustdoc: Use rustdoc-reachable set to prune extern impls
2023-01-25 23:22:00 +04:00
Vadim Petrochenkov
957bc606dd
rustdoc: Collect rustdoc-reachable items during early doc link resolution
2023-01-25 23:14:09 +04:00
Vadim Petrochenkov
68803926e0
rustdoc: Use DefId(Map,Set) instead of FxHash(Map,Set)
...
Not all uses are converted, a few cases iterating through maps/sets and requiring nontrivial changes are kept.
2023-01-22 02:12:05 +04:00
bors
b8f9cb345a
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr
...
Switch to `EarlyBinder` for `const_param_default` and `impl_trait_ref` queries
Part of the work to close #105779 and implement https://github.com/rust-lang/types-team/issues/78 .
Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This PR adds `EarlyBinder` to the return type of `const_param_default` and `impl_trait_ref`, and removes their `bound_X` variants.
r? `@lcnr`
2023-01-14 17:44:30 +00:00
Kyle Matsuda
6e969ea85e
fix various subst_identity vs skip_binder
2023-01-14 00:30:03 -07:00
Kyle Matsuda
f29a334c90
change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14 00:29:56 -07:00
Kyle Matsuda
be130b57d4
change usages of impl_trait_ref to bound_impl_trait_ref
2023-01-14 00:23:32 -07:00
Yuki Okushi
96d4d491d0
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
...
Remove dead code in rustdoc stripper
No changes when this code is removed.
cc `@aDotInTheVoid`
r? `@notriddle`
2023-01-14 12:04:35 +09:00
Matthias Krüger
f7093826a4
Rollup merge of #106813 - oli-obk:sess_cleanup, r=GuillaumeGomez,petrochenkov
...
Remove redundant session field
There was already a session available in the resolver, so we access that session.
2023-01-13 19:16:45 +01:00
Oli Scherer
4aca7beab0
Remove redundant session field
2023-01-13 16:01:27 +00:00
Guillaume Gomez
2633d5f5d0
Fix not displayed re-export of doc(hidden) item
2023-01-12 18:03:03 +01:00
Guillaume Gomez
0482a48dab
Remove dead code in rustdoc stripper
2023-01-12 11:34:26 +01:00
nils
73476554e9
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
...
Improve fluent error messages
These have been really frustrating me while migrating diagnostics.
2023-01-11 17:30:54 +01:00
mejrs
262ff86138
Make translate_message return result and add tests
2023-01-08 23:35:43 +01:00
Nixon Enraght-Moony
ff46d116c1
rustdoc: Strip imports of items which are #[doc(hidden)]
...
Closes #106379
2023-01-06 18:44:37 +00:00
Michael Goulet
6af339dbfa
rename find_parent_node to opt_parent_id
2023-01-04 00:43:13 +00:00
Nixon Enraght-Moony
b7b252a4f4
clean: Always store enum disriminant.
2023-01-01 18:11:53 +00:00
Michael Goulet
61adaf8187
Combine projection and opaque into alias
2022-12-13 17:48:55 +00:00
Guillaume Gomez
680648625e
Prevent to try to retrieve auto and blanket implementations if there were errors before this pass
2022-12-08 13:41:59 +01:00
bors
1195b672fb
Auto merge of #104757 - camelid:consolidate-lints, r=GuillaumeGomez,jyn514,Manishearth
...
Consolidate rustdoc's lint passes into a single pass
This should improve performance and simplify the code.
r? `@GuillaumeGomez`
2022-12-04 02:56:45 +00:00
Guillaume Gomez
5856e40885
Remove Crate::primitives field
2022-11-27 16:31:34 +01:00
Noah Lev
9eb85777fc
Consolidate rustdoc's lint passes into a single pass
...
This should improve performance and simplify the code.
2022-11-22 19:57:55 -08:00
bors
7c75fe4c85
Auto merge of #104170 - cjgillot:hir-def-id, r=fee1-dead
...
Record `LocalDefId` in HIR nodes instead of a side table
This is part of an attempt to remove the `HirId -> LocalDefId` table from HIR.
This attempt is a prerequisite to creation of `LocalDefId` after HIR lowering (https://github.com/rust-lang/rust/pull/96840 ), by controlling how `def_id` information is accessed.
This first part adds the information to HIR nodes themselves instead of a table.
The second part is https://github.com/rust-lang/rust/pull/103902
The third part will be to make `hir::Visitor::visit_fn` take a `LocalDefId` as last parameter.
The fourth part will be to completely remove the side table.
2022-11-17 07:42:27 +00:00
Vadim Petrochenkov
8e81cc262e
rustdoc: Resolve doc links in external traits having local impls
2022-11-13 17:20:24 +03:00
Camille GILLOT
9d20aca983
Store a LocalDefId in hir::Variant & hir::Field.
2022-11-13 14:06:51 +00:00
Takayuki Maeda
6b2257b1b8
return None when def_kind is DefKind::Use
2022-11-07 11:14:13 +09:00
Guillaume Gomez
df326946ed
Remove rustdoc clean::Visibility type
2022-11-03 18:15:24 +01:00