summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2022-08-08Synthetize a trait ref when none is available.Camille GILLOT-6/+12
2022-08-08Avoid ICE in rustdoc.Camille GILLOT-5/+7
2022-08-08rustdoc: do not mark the contents of a skipped module as inlinedMichael Howell-21/+43
2022-08-04remove Clean trait implementation for hir::TraitRefGuillaume Gomez-8/+6
2022-08-04remove Clean trait implementation for hir::FnRetTyGuillaume Gomez-10/+5
2022-08-04Auto merge of #100120 - matthiaskrgr:rollup-g6ycykq, r=matthiaskrgrbors-1/+4
Rollup of 6 pull requests Successful merges: - #98771 (Add support for link-flavor rust-lld for iOS, tvOS and watchOS) - #98835 (relate `closure_substs.parent_substs()` to parent fn in NLL) - #99746 (Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot`) - #99786 (Recover from C++ style `enum struct`) - #99795 (Delay a bug when failed to normalize trait ref during specialization) - #100029 (Prevent ICE for `doc_alias` on match arm, statement, expression) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-03Rollup merge of #100104 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPCMatthias Krüger-42/+34
Remove more Clean trait implementations Follow-up of https://github.com/rust-lang/rust/pull/99638. r? ``@notriddle``
2022-08-03Rollup merge of #98835 - aliemjay:relate_closure_substs, r=nikomatsakisMatthias Krüger-1/+4
relate `closure_substs.parent_substs()` to parent fn in NLL Fixes #98589 The discrepancy between early- and late-bound lifetimes is because we map early-bound lifetimes into those found in the `closure_substs` while late-bound lifetimes are mapped into liberated free regions: https://github.com/rust-lang/rust/blob/5f98537eb7b5f42c246a52c550813c3cff336069/compiler/rustc_borrowck/src/universal_regions.rs#L255-L261 r? `@rust-lang/types`
2022-08-03remove Clean trait implementation for hir::IsAutoGuillaume Gomez-9/+0
2022-08-03remove Clean trait implementation for ty::RegionGuillaume Gomez-33/+34
2022-08-03Rollup merge of #99738 - notriddle:notriddle/multiple-modules-w-same-name, ↵Dylan DPC-7/+12
r=camelid rustdoc: avoid inlining modules with duplicate names Fixes rust-lang/rust#99734
2022-08-02rustdoc: avoid inlining foreigns with duplicate namesMichael Howell-5/+7
2022-08-02Rollup merge of #100057 - GuillaumeGomez:rm-more-clean-impl, r=Dylan-DPCMatthias Krüger-34/+28
Remove more Clean trait implementations Follow-up of https://github.com/rust-lang/rust/pull/99638. r? ``@notriddle``
2022-08-02Rollup merge of #100005 - GuillaumeGomez:cleanup-ast-attr-clean, r=notriddleMatthias Krüger-17/+13
Remove Clean trait for ast::Attribute and improve Attributes::from_ast I prefer to keep this commit on its own for this PR because I'm changing a bit more things than expected originally: I split `Attributes::from_ast` into two because there is only one location making use of its second parameter. Follow-up of https://github.com/rust-lang/rust/pull/99638. r? `@notriddle`
2022-08-02fix rustdoc regressionAli MJ Al-Nasrawy-1/+4
2022-08-02Remove Clean trait implementation for ast::Attribute and cleanup ↵Guillaume Gomez-17/+13
Attributes::from_ast function by splitting it in two
2022-08-02Remove Clean trait implementation for hir::LifetimeGuillaume Gomez-20/+20
2022-08-02Remove Clean trait implementation for ty::TraitRefGuillaume Gomez-14/+8
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-11/+11
2022-08-01Remove visibility from AssocItem.Camille GILLOT-1/+1
2022-08-01Store associated item defaultness in impl_defaultness.Camille GILLOT-5/+5
2022-08-01Rollup merge of #100003 - nnethercote:improve-size-assertions, r=lqdMatthias Krüger-39/+16
Improve size assertions. - For any file with four or more size assertions, move them into a separate module (as is already done for `hir.rs`). - Add some more for AST nodes and THIR nodes. - Put the `hir.rs` ones in alphabetical order. r? `@lqd`
2022-08-01Improve size assertions.Nicholas Nethercote-39/+16
- For any file with four or more size assertions, move them into a separate module (as is already done for `hir.rs`). - Add some more for AST nodes and THIR nodes. - Put the `hir.rs` ones in alphabetical order.
2022-07-31Remove Clean trait implementation for hir::TypeBindingKindGuillaume Gomez-8/+2
2022-07-31Remove Clean trait implementation for hir::TypeBindingGuillaume Gomez-7/+9
2022-07-31Remove Clean trait implementation for hir::PathGuillaume Gomez-8/+6
2022-07-30Rollup merge of #99950 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPCMatthias Krüger-38/+30
Remove more Clean trait implementations This time it even allowed to remove a function. Follow-up of https://github.com/rust-lang/rust/pull/99638. r? `@notriddle`
2022-07-30Auto merge of #99948 - Dylan-DPC:rollup-ed5136t, r=Dylan-DPCbors-2/+1
Rollup of 5 pull requests Successful merges: - #99311 (change maybe_body_owned_by to take local def id) - #99862 (Improve type mismatch w/ function signatures) - #99895 (don't call type ascription "cast") - #99900 (remove some manual hash stable impls) - #99903 (Add diagnostic when using public instead of pub) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-30Remove Clean trait implementation for hir::VariantDataGuillaume Gomez-19/+13
2022-07-30Remove Clean trait implementation for ty::VariantDefGuillaume Gomez-20/+18
2022-07-30Auto merge of #99887 - nnethercote:rm-TreeAndSpacing, r=petrochenkovbors-3/+3
Remove `TreeAndSpacing`. A `TokenStream` contains a `Lrc<Vec<(TokenTree, Spacing)>>`. But this is not quite right. `Spacing` makes sense for `TokenTree::Token`, but does not make sense for `TokenTree::Delimited`, because a `TokenTree::Delimited` cannot be joined with another `TokenTree`. This commit fixes this problem, by adding `Spacing` to `TokenTree::Token`, changing `TokenStream` to contain a `Lrc<Vec<TokenTree>>`, and removing the `TreeAndSpacing` typedef. The commit removes these two impls: - `impl From<TokenTree> for TokenStream` - `impl From<TokenTree> for TreeAndSpacing` These were useful, but also resulted in code with many `.into()` calls that was hard to read, particularly for anyone not highly familiar with the relevant types. This commit makes some other changes to compensate: - `TokenTree::token()` becomes `TokenTree::token_{alone,joint}()`. - `TokenStream::token_{alone,joint}()` are added. - `TokenStream::delimited` is added. This results in things like this: ```rust TokenTree::token(token::Semi, stmt.span).into() ``` changing to this: ```rust TokenStream::token_alone(token::Semi, stmt.span) ``` This makes the type of the result, and its spacing, clearer. These changes also simplifies `Cursor` and `CursorRef`, because they no longer need to distinguish between `next` and `next_with_spacing`. r? `@petrochenkov`
2022-07-29Change maybe_body_owned_by to take local def idMiguel Guarniz-2/+1
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-07-29Statically ensure the size of ItemKindest31-0/+4
2022-07-29Box FunctionItem, TyMethodItem, MethodItem, ForeignFunctionItemest31-12/+12
This reduces ItemKind size from 160 bytes to 112 bytes
2022-07-29Box TypedefItem, ImplItem, AssocTypeItem variants of ItemKindest31-25/+25
This reduces ItemKind size from 224 bytes to 160 bytes.
2022-07-29Remove box syntax from Box<rustdoc::clean::types::ItemKind> constructionest31-4/+4
The type has 240 bytes according to compiler internal rustdoc.
2022-07-29Rollup merge of #99850 - GuillaumeGomez:clean-more-items, r=notriddleYuki Okushi-32/+28
rustdoc: Remove more Clean trait implementations Follow-up of https://github.com/rust-lang/rust/pull/99638. r? `@notriddle`
2022-07-29Remove `TreeAndSpacing`.Nicholas Nethercote-3/+3
A `TokenStream` contains a `Lrc<Vec<(TokenTree, Spacing)>>`. But this is not quite right. `Spacing` makes sense for `TokenTree::Token`, but does not make sense for `TokenTree::Delimited`, because a `TokenTree::Delimited` cannot be joined with another `TokenTree`. This commit fixes this problem, by adding `Spacing` to `TokenTree::Token`, changing `TokenStream` to contain a `Lrc<Vec<TokenTree>>`, and removing the `TreeAndSpacing` typedef. The commit removes these two impls: - `impl From<TokenTree> for TokenStream` - `impl From<TokenTree> for TreeAndSpacing` These were useful, but also resulted in code with many `.into()` calls that was hard to read, particularly for anyone not highly familiar with the relevant types. This commit makes some other changes to compensate: - `TokenTree::token()` becomes `TokenTree::token_{alone,joint}()`. - `TokenStream::token_{alone,joint}()` are added. - `TokenStream::delimited` is added. This results in things like this: ```rust TokenTree::token(token::Semi, stmt.span).into() ``` changing to this: ```rust TokenStream::token_alone(token::Semi, stmt.span) ``` This makes the type of the result, and its spacing, clearer. These changes also simplifies `Cursor` and `CursorRef`, because they no longer need to distinguish between `next` and `next_with_spacing`.
2022-07-28Remove Clean trait implementation for VariantData fieldsGuillaume Gomez-7/+3
2022-07-28Remove Clean trait implementation for VariantStructGuillaume Gomez-7/+8
2022-07-28Remove Clean trait implementation for ty::VisibilityGuillaume Gomez-18/+17
2022-07-27rustdoc: remove Clean trait impl for ty::GenericParamDefMichael Howell-42/+39
2022-07-27rustdoc: remove Clean trait impl for hir::TermMichael Howell-9/+7
2022-07-27rustdoc: remove Clean trait impl for ty::TermMichael Howell-9/+9
2022-07-27Rollup merge of #99783 - notriddle:notriddle/clean-trait-removal, ↵Yuki Okushi-58/+61
r=GuillaumeGomez rustdoc: remove Clean trait impls for more items Follow up to #99638 and #99672
2022-07-27Rollup merge of #99775 - notriddle:notriddle/as-str, r=camelidYuki Okushi-2/+2
rustdoc: do not allocate String when writing path full name No idea if this makes any perf difference, but it just seems like premature pessimisation to use String when str will do.
2022-07-26rustdoc: remove Clean trait impl for ty::PolyTraitPredicateMichael Howell-16/+19
2022-07-26rustdoc: remove Clean trait impls for ty::OutlivesPredicateMichael Howell-29/+27
2022-07-26rustdoc: remove Clean trait impl for ProjectionPredicateMichael Howell-8/+9
2022-07-26rustdoc: remove Clean trait impl for ProjectionTyMichael Howell-9/+10