Commit Graph

133070 Commits

Author SHA1 Message Date
Rich Kadel
cdbce10926 fix cross-platform test bugs
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.)
2020-11-05 18:24:19 -08:00
Rich Kadel
a7d956583c Responded to all feedback as of 2020-10-30 2020-11-05 18:24:18 -08:00
Rich Kadel
1973f84ebb Addressed all feedback to date 2020-11-05 18:24:17 -08:00
Rich Kadel
5545c56e9d Added comments on remapping expression IDs, and URL to spanviews 2020-11-05 18:24:16 -08:00
Rich Kadel
198ba3bd1c Injecting expressions in place of counters where helpful
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
2020-11-05 18:24:15 -08:00
Rich Kadel
3291d28e9a Adds coverage graphviz 2020-11-05 18:24:14 -08:00
Rich Kadel
b5020648fe Implemented CoverageGraph of BasicCoverageBlocks 2020-11-05 18:24:13 -08:00
Rich Kadel
c7ae4c2cb6 Splitting transform/instrument_coverage.rs into transform/coverage/... 2020-11-05 18:24:12 -08:00
Rich Kadel
c7747cc772 Rust coverage before splitting instrument_coverage.rs 2020-11-05 18:24:12 -08:00
est31
dfa5e46fd5 The renumber pass is long gone
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.
2020-11-06 03:18:01 +01:00
est31
de2940ff63 rustc_expand: use collect_bang helper instead of manual reimplementation 2020-11-06 03:16:56 +01:00
Peter Jaszkowiak
fe6dfcd28a Intra-doc links for std::io::buffered 2020-11-05 19:09:42 -07:00
Tomasz Miąsko
8a8ee1a3ed inliner: Use substs_for_mir_body
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.
2020-11-06 00:00:00 +00:00
Joshua Nelson
8d2fa72fc8 Get --fix working for everything except rustdoc
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`
```
2020-11-05 18:06:09 -05:00
Joshua Nelson
3863dee159 Infer the default host target from the host toolchain if possible
This fixes ongoing issues where x.py will detect the wrong host triple
between MSVC and GNU.

- Add line to changelog
2020-11-05 17:44:22 -05:00
Nadrieril
107a29a901 Emit lints in the order in which they occur in the file. 2020-11-05 22:17:26 +00:00
Nadrieril
25e272e388 Fix unreachable sub-branch detection
This fixes https://github.com/rust-lang/rust/issues/76836
2020-11-05 22:02:35 +00:00
Nadrieril
03f0ca0cf4 Add test 2020-11-05 22:02:34 +00:00
Vadim Petrochenkov
8def2fc122 rustc_ast: Never clone empty token streams in mutable visitor 2020-11-06 00:59:08 +03:00
Vadim Petrochenkov
63343f6323 More detailed output for the nonterminal marking test 2020-11-06 00:58:36 +03:00
Jacob Pratt
8078474b0a
Correct unsigned equivalent of isize to be usize 2020-11-05 16:52:32 -05:00
Vadim Petrochenkov
1e15606547 rustc_ast: Visit tokens stored in AST nodes in mutable visitor 2020-11-06 00:30:52 +03:00
Guillaume Gomez
99200f760b Fix even more URLs 2020-11-05 20:11:29 +01:00
Joshua Nelson
47b21b84f3 Add PRIVATE_INTRA_DOC_LINKS to rustdoc special-casing
This is really starting to get out of hand. Rustdoc should instead allow
all lints in the rustdoc lint group.
2020-11-05 13:11:50 -05:00
bors
9d78d1d027 Auto merge of #78774 - flip1995:clippyup, r=Manishearth
Update Clippy

Biweekly Clippy update

r? `@Manishearth`
2020-11-05 17:57:31 +00:00
Joshua Nelson
eed0cebea3 Recognize private_intra_doc_links as a lint
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`
```
2020-11-05 12:55:10 -05:00
Joshua Nelson
9d9292cfda deny(invalid_codeblock_attributes) 2020-11-05 12:13:28 -05:00
flip1995
46c714f641
Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyup 2020-11-05 14:29:48 +01:00
bors
b1d9f31e04 Auto merge of #78638 - vn-ki:bindigs-after-at-issue-69971, r=oli-obk
reverse binding order in matches to allow the subbinding of copyable fields in bindings after @

Fixes #69971

### TODO

- [x] Regression tests

r? `@oli-obk`
2020-11-05 13:26:08 +00:00
bors
b20d4c155d Auto merge of #6296 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2020-11-05 13:14:26 +00:00
Pietro Albini
874cbb88e0
ci: build docs for aarch64-unknown-linux-gnu 2020-11-05 11:54:32 +01:00
Pietro Albini
1274faed1a
doc/rustc: promote aarch64-unknown-linux-gnu to tier 1
This also adds a note about missing stack probes support, per the
discussion on RFC 2959.
2020-11-05 11:54:30 +01:00
Pietro Albini
54a0a98347
ci: gate on aarch64-gnu passing tests 2020-11-05 11:54:29 +01:00
bors
f7801d6c7c Auto merge of #78767 - m-ou-se:rollup-eu5wgxl, r=m-ou-se
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
2020-11-05 10:22:20 +00:00
Mara Bos
8416e13d88
Rollup merge of #78758 - eltociear:patch-1, r=jyn514
Fixed typo in comment

paramter -> parameter
2020-11-05 10:30:04 +01:00
Mara Bos
f383e4f1d9
Rollup merge of #78757 - camelid:crate-link-text, r=jyn514
Improve and clean up some intra-doc links
2020-11-05 10:30:02 +01:00
Mara Bos
679c4c7015
Rollup merge of #78756 - ehuss:update-cargo, r=ehuss
Update cargo

7 commits in becb4c282b8f37469efb8f5beda45a5501f9d367..d5556aeb8405b1fe696adb6e297ad7a1f2989b62
2020-10-28 16:41:55 +0000 to 2020-11-04 22:20:36 +0000
- Implement weak dependency features. (rust-lang/cargo#8818)
- Avoid some extra downloads with new feature resolver. (rust-lang/cargo#8823)
- fix: remove install command `$`, for copying friendly (rust-lang/cargo#8828)
- Bump `anyhow` dependency to `1.0.34` in `crates-io` crate (rust-lang/cargo#8826)
- Normalize SourceID in `cargo metadata`. (rust-lang/cargo#8824)
- vendor: correct the path to cargo config (rust-lang/cargo#8822)
- Make host_root return host.root(), not host.dest() (rust-lang/cargo#8819)
2020-11-05 10:30:01 +01:00
Mara Bos
5ffccc4dfa
Rollup merge of #78742 - vn-ki:fix-issue-78655, r=oli-obk
make intern_const_alloc_recursive return error

fix #78655

r? ``@oli-obk``
2020-11-05 10:29:59 +01:00
Mara Bos
171d29c9c5
Rollup merge of #78739 - hameerabbasi:issue-78654, r=nikomatsakis
Fix ICE on type error in async function

Fixes #78654
2020-11-05 10:29:57 +01:00
Mara Bos
86e6afafe1
Rollup merge of #78738 - sasurau4:test/move-range-test-to-library-core, r=jyn514
Move range in ui test to ops test in library/core

Helps with #76268

r? ````@matklad````
2020-11-05 10:29:56 +01:00
Mara Bos
29fad213b2
Rollup merge of #78735 - danielhenrymantilla:simplify-unsafecell-getmut, r=RalfJung
Simplify the implementation of `get_mut` (no unsafe)

Quick PR to reduce one use of `unsafe` pointed out in the previous PR

r? ````@RalfJung````
2020-11-05 10:29:54 +01:00
Mara Bos
8640360870
Rollup merge of #78733 - matthiaskrgr:cl11ppy, r=jyn514
fix a couple of clippy warnings:

filter_next
manual_strip
redundant_static_lifetimes
single_char_pattern
unnecessary_cast
unused_unit
op_ref
redundant_closure
useless_conversion
2020-11-05 10:29:53 +01:00
Mara Bos
9bbb052af8
Rollup merge of #78727 - liketechnik:issue-55201, r=GuillaumeGomez
(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
2020-11-05 10:29:50 +01:00
Mara Bos
43e1b58bcc
Rollup merge of #78716 - est31:array_traits, r=Dylan-DPC
Array trait impl comment/doc fixes

Two small doc/comment fixes regarding trait implementations on arrays.
2020-11-05 10:29:46 +01:00
Mara Bos
cbf74bc4ca
Rollup merge of #78584 - notriddle:master, r=GuillaumeGomez
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.
2020-11-05 10:29:45 +01:00
Mara Bos
6d7098f543
Rollup merge of #78465 - est31:proc_macro_to_string, r=jyn514
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.
2020-11-05 10:29:42 +01:00
Mara Bos
99229337a8
Rollup merge of #78425 - chansuke:move_nan, r=jyn514
Move f64::NAN ui tests into `library`

This is a partial fix of #76268.

r? ```@matklad```
2020-11-05 10:29:40 +01:00
Mara Bos
10d2843604
Rollup merge of #78093 - camelid:as-cleanup, r=jyn514
Clean up docs for 'as' keyword
2020-11-05 10:29:38 +01:00
Mara Bos
55f4b802fb
Rollup merge of #76718 - poliorcetics:vec-ui-to-unit-test, r=jyn514
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
2020-11-05 10:29:35 +01:00
Guillaume Gomez
16ed8501ef Fix more URLs 2020-11-05 10:23:39 +01:00