about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-11-07Rollup merge of #78514 - jyn514:setup-number, r=Mark-SimulacrumYuki Okushi-6/+9
Allow using 1/2/3/4 for `x.py setup` options This undocumented feature allows you to typo 'a' as '1'. r? ```@Mark-Simulacrum``` cc ```@Lokathor```
2020-11-07Rollup merge of #78167 - Nadrieril:fix-76836_, r=varkorYuki Okushi-39/+111
Fix unreachable sub-branch detection in or-patterns The previous implementation was too eager to avoid unnecessary "unreachable pattern" warnings. I feel more confident about this implementation than I felt about the previous one. Fixes https://github.com/rust-lang/rust/issues/76836. ``@rustbot`` modify labels: +A-exhaustiveness-checking
2020-11-07Rollup merge of #78006 - pitaj:master, r=jyn514Yuki Okushi-3/+5
Use Intra-doc links for std::io::buffered Helps with #75080. I used the implicit link style for intrinsics, as that was what `minnumf32` and others already had. ``@rustbot`` modify labels: T-doc, A-intra-doc-links r? ``@jyn514``
2020-11-07Rollup merge of #74979 - maekawatoshiki:fix, r=Mark-SimulacrumYuki Okushi-0/+2
`#![deny(unsafe_op_in_unsafe_fn)]` in sys/hermit Partial fix of #73904. This encloses ``unsafe`` operations in ``unsafe fn`` in ``sys/hermit``. Some unsafe blocks are not well documented because some system-based functions lack documents.
2020-11-06Auto merge of #77351 - jyn514:clippy-sysroot, r=Mark-Simulacrumbors-19/+76
Fix `x.py clippy` I don't think this ever worked. Fixes https://github.com/rust-lang/rust/issues/77309. `--fix` support is a work in progress, but works for a very small subset of `libtest`. This works by using the host `cargo-clippy` driver; it does not use `stage0.txt` at all. To mitigate confusion from this, it gives an error if you don't have `rustc +nightly` as the default rustc in `$PATH`. Additionally, it means that bootstrap can't set `RUSTC`; this makes it no longer possible for clippy to detect the sysroot itself. Instead, bootstrap passes the sysroot to cargo. r? `@ghost`
2020-11-06Auto merge of #78267 - richkadel:llvm-coverage-counters-2.0.3r1, r=tmandrybors-2119/+14070
Working expression optimization, and some improvements to branch-level source coverage This replaces PR #78040 after reorganizing the original commits (by request) into a more logical sequence of major changes. Most of the work is in the MIR `transform/coverage/` directory (originally, `transform/instrument_coverage.rs`). Note this PR includes some significant additional debugging capabilities, to help myself and any future developer working on coverage improvements or issues. In particular, there's a new Graphviz (.dot file) output for the coverage graph (the `BasicCoverageBlock` control flow graph) that provides ways to get some very good insight into the relationships between the MIR, the coverage graph BCBs, coverage spans, and counters. (There are also some cool debugging options, available via environment variable, to alter how some data in the graph appears.) And the code for this Graphviz view is actually generic... it can be used by any implementation of the Rust `Graph` traits. Finally (for now), I also now output information from `llvm-cov` that shows the actual counters and spans it found in the coverage map, and their counts (from the `--debug` flag). I found this to be enormously helpful in debugging some coverage issues, so I kept it in the test results as well for additional context. `@tmandry` `@wesleywiser` r? `@tmandry` Here's an example of the new coverage graph: * Within each `BasicCoverageBlock` (BCB), you can see each `CoverageSpan` and its contributing statements (MIR `Statement`s and/or `Terminator`s) * Each `CoverageSpan` has a `Counter` or and `Expression`, and `Expression`s show their Add/Subtract operation with nested operations. (This can be changed to show the Counter and Expression IDs instead, or in addition to, the BCB.) * The terminators of all MIR `BasicBlock`s in the BCB, including one final `Terminator` * If an "edge counter" is required (because we need to count an edge between blocks, in some cases) the edge's Counter or Expression is shown next to its label. (Not shown in the example below.) (FYI, Edge Counters are converted into a new MIR `BasicBlock` with `Goto`) <img width="1116" alt="Screen Shot 2020-10-17 at 12 23 29 AM" src="https://user-images.githubusercontent.com/3827298/96331095-616cb480-100f-11eb-8212-60f2d433e2d8.png"> r? `@tmandry` FYI: `@wesleywiser`
2020-11-05Disable the spanview tests on MacOS for nowRich Kadel-0/+20
And even though CI should now pass for MacOS, the llvm-cov show --debug flag does not work when developing outside of CI, so I'm disabling it for MacOS by default.
2020-11-06Auto merge of #77856 - GuillaumeGomez:automatic-links-lint, r=jyn514,ollie27bors-37/+425
Add non_autolinks lint Part of #77501. r? `@jyn514`
2020-11-05document HACKsPeter Jaszkowiak-0/+2
2020-11-05Fix sed command for MacRich Kadel-1/+1
add -e between -i and quoted script I had tested on my mac but forgot I had aliased sed=gsed. My bad.
2020-11-05rename some tests to avoid exceeding windows path limitsRich Kadel-819/+847
And restored missing error message from llvm-cov show And since some CI builds disable LLVM assertions (which disables the --debug option in llvm-cov show), I check to see if LLVM assertions are disabled, and if so, I don't add --debug and don't check the counter file diffs.
2020-11-05fix cross-platform test bugsRich Kadel-40/+17
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-05Responded to all feedback as of 2020-10-30Rich Kadel-208/+367
2020-11-05Addressed all feedback to dateRich Kadel-57/+41
2020-11-05Added comments on remapping expression IDs, and URL to spanviewsRich Kadel-117/+1188
2020-11-05Injecting expressions in place of counters where helpfulRich Kadel-603/+1984
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-05Adds coverage graphvizRich Kadel-10/+657
2020-11-05Implemented CoverageGraph of BasicCoverageBlocksRich Kadel-493/+563
2020-11-05Splitting transform/instrument_coverage.rs into transform/coverage/...Rich Kadel-730/+766
2020-11-05Rust coverage before splitting instrument_coverage.rsRich Kadel-1243/+9821
2020-11-05Intra-doc links for std::io::bufferedPeter Jaszkowiak-3/+3
2020-11-05Get `--fix` working for everything except rustdocJoshua Nelson-7/+17
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-05Emit lints in the order in which they occur in the file.Nadrieril-8/+9
2020-11-05Fix unreachable sub-branch detectionNadrieril-41/+105
This fixes https://github.com/rust-lang/rust/issues/76836
2020-11-05Add testNadrieril-4/+11
2020-11-05Fix even more URLsGuillaume Gomez-25/+25
2020-11-05Auto merge of #78774 - flip1995:clippyup, r=Manishearthbors-675/+2839
Update Clippy Biweekly Clippy update r? `@Manishearth`
2020-11-05Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyupflip1995-675/+2839
2020-11-05Auto merge of #78638 - vn-ki:bindigs-after-at-issue-69971, r=oli-obkbors-595/+568
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-05Auto merge of #6296 - flip1995:rustup, r=flip1995bors-16/+16
Rustup r? `@ghost` changelog: none
2020-11-05Auto merge of #78767 - m-ou-se:rollup-eu5wgxl, r=m-ou-sebors-366/+502
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-05Rollup merge of #78758 - eltociear:patch-1, r=jyn514Mara Bos-1/+1
Fixed typo in comment paramter -> parameter
2020-11-05Rollup merge of #78757 - camelid:crate-link-text, r=jyn514Mara Bos-17/+17
Improve and clean up some intra-doc links
2020-11-05Rollup merge of #78756 - ehuss:update-cargo, r=ehussMara Bos-2/+2
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-05Rollup merge of #78742 - vn-ki:fix-issue-78655, r=oli-obkMara Bos-26/+66
make intern_const_alloc_recursive return error fix #78655 r? ``@oli-obk``
2020-11-05Rollup merge of #78739 - hameerabbasi:issue-78654, r=nikomatsakisMara Bos-0/+55
Fix ICE on type error in async function Fixes #78654
2020-11-05Rollup merge of #78738 - sasurau4:test/move-range-test-to-library-core, r=jyn514Mara Bos-52/+58
Move range in ui test to ops test in library/core Helps with #76268 r? ````@matklad````
2020-11-05Rollup merge of #78735 - danielhenrymantilla:simplify-unsafecell-getmut, ↵Mara Bos-2/+1
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-05Rollup merge of #78733 - matthiaskrgr:cl11ppy, r=jyn514Mara Bos-21/+14
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-05Rollup merge of #78727 - liketechnik:issue-55201, r=GuillaumeGomezMara Bos-6/+6
(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-05Rollup merge of #78716 - est31:array_traits, r=Dylan-DPCMara Bos-8/+6
Array trait impl comment/doc fixes Two small doc/comment fixes regarding trait implementations on arrays.
2020-11-05Rollup merge of #78584 - notriddle:master, r=GuillaumeGomezMara Bos-12/+64
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-05Rollup merge of #78465 - est31:proc_macro_to_string, r=jyn514Mara Bos-1/+1
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-05Rollup merge of #78425 - chansuke:move_nan, r=jyn514Mara Bos-4/+5
Move f64::NAN ui tests into `library` This is a partial fix of #76268. r? ```@matklad```
2020-11-05Rollup merge of #78093 - camelid:as-cleanup, r=jyn514Mara Bos-6/+13
Clean up docs for 'as' keyword
2020-11-05Rollup merge of #76718 - poliorcetics:vec-ui-to-unit-test, r=jyn514Mara Bos-208/+193
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-05Fix more URLsGuillaume Gomez-4/+4
2020-11-05Rename lint to non_autolinksGuillaume Gomez-37/+38
2020-11-05Improve lint even moreGuillaume Gomez-4/+7
2020-11-05Don't check for URLs inside codeblocksGuillaume Gomez-40/+54