| Age | Commit message (Collapse) | Author | Lines |
|
|
|
uplift `clippy::clone_double_ref` as `suspicious_double_ref_op`
Split from #109842.
r? ``@compiler-errors``
|
|
This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy
the entire hook implementation.
- Switch clippy to the new hook
This also adds a `extra_info` callback so clippy can include its own version number, which differs
from rustc's.
- Call `install_ice_hook` in rustfmt
|
|
rustdoc: catch and don't blow up on impl Trait cycles
Fixes #110629
An odd feature of Rust is that `Foo` is invalid, but `Bar` is okay:
type Foo<'a, 'b> = Box<dyn PartialEq<Foo<'a, 'b>>>;
type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>>;
To get it right, track every time rustdoc descends into a type alias, so if it shows up twice, it can be write the path instead of infinitely expanding it.
|
|
An odd feature of Rust is that `Foo` is invalid, but `Bar` is okay:
type Foo<'a, 'b> = Box<dyn PartialEq<Foo<'a, 'b>>>;
type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>>;
To get it right, track every time rustdoc descends into a type alias,
so if it shows up twice, it can be write the path instead of
infinitely expanding it.
|
|
rustdoc: Get `repr` information through `AdtDef` for foreign items
As suggested by `@notriddle,` this approach works too. The only downside is that the display of the original attribute isn't kept, but I think it's an acceptable downside.
r? `@notriddle`
|
|
|
|
|
|
|
|
rustdoc: fix weird margins between Deref impl items
## Before

## After

## Description
In the old setup, if the dereffed-to item has multiple impl blocks, each one gets its own `div.impl-items` in the section, but there are no headers separating them. Since the last method in a `div.impl-items` has no bottom margin, and there are no margins between these divs, there is no margin between the last method of one impl and the first method of the following impl.
This patch fixes it by simplifying the HTML. Each Deref block gets exactly one `div.impl-items`, no matter how many impl blocks it actually has.
|
|
|
|
|
|
|
|
In the old setup, if the dereffed-to item has multiple impl blocks,
each one gets its own `div.impl-items` in the section, but there
are no headers separating them. Since the last method in a
`div.impl-items` has no bottom margin, and there are no margins
between these divs, there is no margin between the last method
of one impl and the first method of the following impl.
This patch fixes it by simplifying the HTML. Each Deref block gets
exactly one `div.impl-items`, no matter how many impl blocks it
actually has.
|
|
|
|
This should only affect inherent associated types.
|
|
Rollup of 6 pull requests
Successful merges:
- #110766 (More core::fmt::rt cleanup.)
- #110873 (Migrate trivially translatable `rustc_parse` diagnostics)
- #110904 (rustdoc: rebind bound vars to type-outlives predicates)
- #110913 (Add some missing built-in lints)
- #110918 (`remove_dir_all`: try deleting the directory even if `FILE_LIST_DIRECTORY` access is denied)
- #110920 (Fix unavailable url)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustdoc: rebind bound vars to type-outlives predicates
Fixes #110900.
|
|
|
|
|
|
rustdoc-json: Time serialization.
This lets us know how much time is spent in json specific code, and how much performance we could gain by using a different serialization format.
For aws-sdk-ec2, it takes 0.7s, out of a 43s build (of which 6s is spent in json specific code), and makes a 173M json file
```
$ cargo +rust_stage2 rustdoc -p aws-sdk-ec2 -- -Zunstable-options -w json -Ztime-passes
Documenting aws-sdk-ec2 v0.26.0 (/home/gh-aDotInTheVoid/aws-sdk-rust/sdk/ec2)
time: 5.229; rss: 64MB -> 891MB ( +827MB) expand_crate
time: 5.230; rss: 61MB -> 891MB ( +830MB) macro_expand_crate
time: 0.256; rss: 891MB -> 891MB ( +0MB) AST_validation
time: 0.025; rss: 891MB -> 891MB ( +1MB) finalize_imports
time: 0.093; rss: 891MB -> 891MB ( +0MB) compute_effective_visibilities
time: 0.122; rss: 891MB -> 891MB ( +0MB) finalize_macro_resolutions
time: 2.442; rss: 891MB -> 1188MB ( +297MB) late_resolve_crate
time: 0.120; rss: 1188MB -> 1190MB ( +2MB) resolve_check_unused
time: 0.211; rss: 1190MB -> 1190MB ( +0MB) resolve_postprocess
time: 3.017; rss: 891MB -> 1190MB ( +299MB) resolve_crate
time: 8.520; rss: 61MB -> 1181MB (+1120MB) prepare_outputs
time: 0.152; rss: 1181MB -> 1181MB ( +0MB) complete_gated_feature_checking
time: 0.539; rss: 1633MB -> 1632MB ( -1MB) drop_ast
time: 15.492; rss: 58MB -> 1621MB (+1563MB) type_collecting
time: 1.503; rss: 1621MB -> 1705MB ( +84MB) item_types_checking
time: 1.274; rss: 1705MB -> 1726MB ( +21MB) crate_lints
time: 1.275; rss: 1705MB -> 1726MB ( +21MB) missing_docs
time: 0.281; rss: 1726MB -> 1726MB ( +0MB) check_mod_attrs
time: 0.433; rss: 1744MB -> 1750MB ( +6MB) clean_crate
time: 11.581; rss: 1750MB -> 2107MB ( +357MB) collect_synthetic_impls
time: 0.019; rss: 2107MB -> 2107MB ( +0MB) collect_items_for_trait_impls
time: 12.588; rss: 1750MB -> 2139MB ( +389MB) collect-trait-impls
time: 0.197; rss: 2139MB -> 2139MB ( +0MB) check_doc_test_visibility
time: 0.281; rss: 2139MB -> 2150MB ( +11MB) strip-hidden
time: 0.260; rss: 2150MB -> 2150MB ( +0MB) strip-private
warning: unresolved link to `date`
--> sdk/ec2/src/client/describe_instances.rs:7:11184
|
7 | ...te of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter.<...
| ^^^^ no item named `date` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
time: 0.363; rss: 2150MB -> 2150MB ( +0MB) collect-intra-doc-links
time: 0.946; rss: 2150MB -> 2150MB ( +0MB) propagate-doc-cfg
time: 0.494; rss: 2150MB -> 2152MB ( +2MB) run-lints
time: 0.658; rss: 2152MB -> 2163MB ( +11MB) create_format_cache
time: 34.818; rss: 58MB -> 2163MB (+2105MB) run_global_ctxt
time: 0.016; rss: 2163MB -> 2163MB ( +0MB) create_renderer(json)
time: 0.723; rss: 2780MB -> 2780MB ( +0MB) rustdoc_json_serialization
time: 2.216; rss: 2399MB -> 2599MB ( +199MB) renderer_after_krate(json)
time: 6.639; rss: 2163MB -> 2417MB ( +254MB) render_json
time: 0.312; rss: 2417MB -> 2071MB ( -346MB) free_global_ctxt
warning: `aws-sdk-ec2` (lib doc) generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 43.06s
```
[(Zulip Discussion)](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/JSON.20metadata.20speed/near/352783145)
r? `@GuillaumeGomez`
|
|
Make some region folders a little stricter.
Because certain regions cannot occur in them.
r? ``@compiler-errors``
|
|
pass `unused_extern_crates` in `librustdoc::doctest::make_test`
blocker for https://github.com/rust-lang/rust/pull/106621
|
|
|
|
|
|
Because certain regions cannot occur in them.
|
|
r=compiler-errors
Switch to `EarlyBinder` for `explicit_item_bounds`
Part of the work to finish https://github.com/rust-lang/rust/issues/105779.
This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`.
r? `@compiler-errors` (hope it's okay to request you, since you reviewed #110299 and #110498 :smiley:)
|
|
|
|
Signed-off-by: ozkanonur <work@onurozkan.dev>
|
|
This indexes them as primitives with generics, so `slice<u32>` is
how you search for `[u32]`, and `array<u32>` for `[u32; 1]`.
A future commit will desugar the square bracket syntax to search
both arrays and slices at once.
|
|
|
|
r=b-naber
Remove `find_map_relevant_impl`
Fixes #108895
|
|
r=GuillaumeGomez
rustdoc: clean up settings.css and settings.js
`handleKey` was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser-native checkbox was `display: none`, breaking native keyboard accessibility.
The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more.
[behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics
The other, one line change to settings.css is follow-up to #110205
|
|
Run various queries from other queries instead of explicitly in phases
These are just legacy leftovers from when rustc didn't have a query system. While there are more cleanups of this sort that can be done here, I want to land them in smaller steps.
This phased order of query invocations was already a lie, as any query that looks at types (e.g. the wf checks run before) can invoke e.g. const eval which invokes borrowck, which invokes typeck, ...
|
|
r=GuillaumeGomez
rustdoc: clean up JS
* use `Set` for ignored crates in cross-crate trait impl JS, instead of `indexOf` string manipulation
* lift constant `window.location.split` code out of a loop in source code sidebar builder
* remove redundant history manipulation from search page exit
|
|
rustdoc: migrate `document_type_layout` to askama
|
|
This code was added back when `border-color: currentColor` was used.
Since it was changed in ad9a89eef2857a24ef049b9eee2d1db5bcbf1d11, the
current color is not used any more.
|
|
This code was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097
and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser-
native checkbox was `display: none`, breaking native keyboard
accessibility.
The native checkbox is now merely `appearance: none`, which does
not turn off [behavior semantics], so JavaScript to
reimplement it isn't needed any more.
[behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics
|
|
it eagerly.
Later queries that are run on all body owners will invoke typeck as they need information from its result to perform their own logic
|
|
* There's no need to call `history.replaceState` right before
calling `searchState.hideResults`, which already does it.
* There's no need to implement hiding search results when that
is already implemented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EarlyBinder; use this to simplify some EarlyBinder noise around explicit_item_bounds calls
|
|
bound_explicit_item_bounds usages; remove bound_explicit_item_bounds query
|