More portable way to make python 2/3 portable.
Strip Args line (with hardcoded paths) from debug counters output.
Ignore diff failures from llvm-cov debug output files ("counters"
files), since generic function instantiations will appear in those files
with mangled names. (Sadly, the demangler is apparently not applied to
the debug output.)
Implementing the Graph traits for the BasicCoverageBlock
graph.
optimized replacement of counters with expressions plus new BCB graphviz
* Avoid adding coverage to unreachable blocks.
* Special case for Goto at the end of the body. Make it non-reportable.
Improved debugging and formatting options (from env)
Don't automatically add counters to BCBs without CoverageSpans. They may
still get counters but only if there are dependencies from
other BCBs that have spans, I think.
Make CodeRegions optional for Counters too. It is
possible to inject counters (`llvm.instrprof.increment` intrinsic calls
without corresponding code regions in the coverage map. An expression
can still uses these counter values.
Refactored instrument_coverage.rs -> instrument_coverage/mod.rs, and
then broke up the mod into multiple files.
Compiling with coverage, with the expression optimization, works on
the json5format crate and its dependencies.
Refactored debug features from mod.rs to debug.rs
Originally, there has been a dedicated pass for renumbering
AST NodeIds to have actual values. This pass had been added by
commit a5ad4c3794.
Then, later, this step was moved to where it resides now,
macro expansion. See commit c86c8d41a2
or PR #36438.
The comment snippet, added by the original commit, has
survived the times without any change, becoming outdated
at removal of the dedicated pass.
Nowadays, grepping for the next_node_id function will show up
multiple places in the compiler that call it, but the main
rewriting that the comment talks about is still done in the
expansion step, inside an innocious looking visit_id function
that's called during macro invocation collection.
Changes from 68965 extended the kind of instances that are being
inlined. For some of those, the `instance_mir` returns a MIR body that
is already expressed in terms of the types found in substitution array,
and doesn't need further substitution.
Use `substs_for_mir_body` to take that into account.
Here's the error for rustdoc:
```
Checking rustdoc artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
error: no library targets found in package `rustdoc-tool`
```
Previously, trying to allow this would give another error!
```
warning: unknown lint: `private_intra_doc_links`
--> private.rs:1:10
|
1 | #![allow(private_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links`
|
= note: `#[warn(unknown_lints)]` on by default
warning: public documentation for `DocMe` links to private item `DontDocMe`
--> private.rs:2:11
|
2 | /// docs [DontDocMe]
| ^^^^^^^^^ this item is private
|
= note: `#[warn(private_intra_doc_links)]` on by default
= note: this link will resolve properly if you pass `--document-private-items`
```
reverse binding order in matches to allow the subbinding of copyable fields in bindings after @
Fixes#69971
### TODO
- [x] Regression tests
r? `@oli-obk`
Rollup of 15 pull requests
Successful merges:
- #76718 (Move Vec UI tests to unit tests when possible)
- #78093 (Clean up docs for 'as' keyword)
- #78425 (Move f64::NAN ui tests into `library`)
- #78465 (Change as_str → to_string in proc_macro::Ident::span() docs)
- #78584 (Add keyboard handling to the theme picker menu)
- #78716 (Array trait impl comment/doc fixes)
- #78727 ((rustdoc) fix test for trait impl display)
- #78733 (fix a couple of clippy warnings:)
- #78735 (Simplify the implementation of `get_mut` (no unsafe))
- #78738 (Move range in ui test to ops test in library/core)
- #78739 (Fix ICE on type error in async function)
- #78742 (make intern_const_alloc_recursive return error)
- #78756 (Update cargo)
- #78757 (Improve and clean up some intra-doc links)
- #78758 (Fixed typo in comment)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
(rustdoc) fix test for trait impl display
The test checks that parameters and return values with `impl Trait` types are correctly generated in rustdoc's output.
In essence, the previous version of the test checked the absence of values that would never be generated by rustdoc, so it could basically never fail. These values were adjusted to the expected output and are now required to exist in rustdoc's output. See https://github.com/rust-lang/rust/issues/55201#issuecomment-716182474 for a detailed explanation of the reasoning behind the changes.
Note that the output of rustdoc for `impl Trait`s in parameters and return values did not change since the inital test creation, so this PR only modifies the test.
Closes#55201
Add keyboard handling to the theme picker menu
This PR is mostly designed to bring the theme picker closer to feature parity with the menu bar from docs.rs. Though the rustdoc theme picker is technically already usable from the keyboard, it's really weird that arrow keys work on some of the menus, but not all of them, in the exact same page.
Change as_str → to_string in proc_macro::Ident::span() docs
There is no `as_str` function on Ident any more.
Also change it to an intra doc link while we're at it.
Move Vec UI tests to unit tests when possible
Helps with #76268.
I'm moving the tests using `Vec` or `VecDeque`.
````@rustbot```` modify labels: A-testsuite C-cleanup T-libs