about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-11-08Rollup merge of #78842 - shepmaster:bootstrap-rustfmt, r=Mark-SimulacrumMara Bos-5/+12
Honor the rustfmt setting in config.toml Prior to this, setting the rustfmt configuration was ignored: ``` % mkdir example % cd example % ../configure --set build.rustfmt=/usr/bin/true % ../x.py fmt ./x.py fmt is not supported on this channel failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt Build completed unsuccessfully in 0:00:01 ``` And after: ``` % ../x.py fmt Build completed successfully in 0:00:11 ``` r? `@Mark-Simulacrum`
2020-11-08Rollup merge of #78775 - ghedo:bump-rustfmt-rls, r=Mark-SimulacrumMara Bos-5/+6
Bump Rustfmt and RLS Should hopefully fix #78341 and fix #78340.
2020-11-08Rollup merge of #78706 - bjorn3:fix_run_make_without_llvm, r=Mark-SimulacrumMara Bos-11/+15
Fix run-make tests running when LLVM is disabled The `--cc`, `--cxx`, `--cflags` and `--ar` flags were only passed to compiletest when `builder.config.llvm_enabled()` returned true. This is preventing me from running the tests on cg_clif.
2020-11-08Rollup merge of #78658 - casey:x, r=Mark-SimulacrumMara Bos-0/+107
Add a tool to run `x.py` from any subdirectory This adds a binary called `x` in `src/tools/x`. All it does is check the current directory and its ancestors for a file called `x.py`, and if it finds one, runs it. By installing x, you can easily run `x.py` from any subdirectory, and only need to type `x`. It can be installed with `cargo install --path src/tools/x` This is a copy of a [binary I've been using myself when working on rust](https://github.com/casey/bootstrap), currently published to crates.io as `bootstrap`. It could be changed to avoid indirecting through `x.py`, and instead call the bootstrap module directly. However, this seemed like the simplest thing possible, and won't break if the details of how the bootstrap module is invoked change.
2020-11-08Rollup merge of #78570 - sasurau4:test/check-pass-print-type-size, r=jyn514Mara Bos-12/+12
Remove FIXME comment in print_type_sizes ui test suite ## Overview Helps with #62277 > The type sizes are likely only printed when the actual layout is computed. For generic types, this only happens during codegen. ref: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Codegen.20process.20question/near/215836807 Some tests like `multiple_types.rs` are passed even if using `check-pass`. But tests should be agnostic to when the actual layout is computed. The `build-pass` is intentionally used for them. I remove FIXME comments.
2020-11-07Auto merge of #78784 - Mark-Simulacrum:revert-77421, r=petrochenkovbors-24/+5
Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case"" Specifically, this reverts commit b20bce8ce54ea9d47c2e3eb0b17cbb6baf916ae2 from #77421 to fix #77586. The lang team has decided that for the time being we want to avoid the breakage here (perhaps for a future edition; though almost certainly not the upcoming one), though a future PR may want to add a lint around this case (and perhaps others) which are unlikely to be readable code. r? `@petrochenkov` to confirm this is the right way to fix #77586.
2020-11-07Honor the rustfmt setting in config.tomlJake Goulding-5/+12
Prior to this, setting the rustfmt configuration was ignored: ``` % mkdir example % cd example % ../configure --set build.rustfmt=/usr/bin/true % ../x.py fmt ./x.py fmt is not supported on this channel failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt Build completed unsuccessfully in 0:00:01 ``` And after: ``` % ../x.py fmt Build completed successfully in 0:00:11 ```
2020-11-07Auto merge of #75199 - Mark-Simulacrum:debug-asserts, r=pietroalbinibors-37/+0
Re-enable debug and LLVM assertions Historically we've disabled these assertions on a number of platforms with the goal of speeding up CI. Now, though, having migrated to GitHub actions, CI is already pretty fast, and these debug assertions do bring us some value. This does leave in some debug assertions that are performance-related: macOS currently hovers at just under 2 hours. There are also some other builders which have debug and LLVM assertions disabled: llvm-8, PR builder: In one view, this builder tests our support for older LLVMs. But in reality, a lot of our tests already disable themselves on older LLVMs, and I think our general stance is that we really only support the in-tree LLVM. Plus, we really want CI times on this builder to be really low, as it's run on *every* PR -- that's a lot of CI time. test-various: This disables debug asserts still -- as noted in the Dockerfile, we test code size, and we need debug asserts off for that to work well. Helps with #59637 -- but doesn't close it, macOS still has asserts off. r? `@pietroalbini`
2020-11-07remove FIXME comment of #62277 in print_type_sizez ui testsDaiki Ihara-12/+12
2020-11-07Auto merge of #78817 - RalfJung:miri, r=RalfJungbors-6/+6
update Miri Fixes https://github.com/rust-lang/rust/issues/78741 Cc `@rust-lang/miri` r? `@ghost`
2020-11-06update MiriRalf Jung-6/+6
2020-11-06Add debug asserts to PR builderMark Rousskov-6/+0
This is helpful to catch slightly more bugs before things hit main CI, and doesn't cost too much extra CI time.
2020-11-06Re-enable debug and LLVM assertionsMark Rousskov-31/+0
Historically we've disabled these assertions on a number of platforms with the goal of speeding up CI. Now, though, having migrated to GitHub actions, CI is already pretty fast, and these debug assertions do bring us some value. This does leave in some debug assertions that are performance-related: macOS currently hovers at just under 2 hours. There are also some other builders which have debug and LLVM assertions disabled: llvm-8, PR builder: In one view, this builder tests our support for older LLVMs. But in reality, a lot of our tests already disable themselves on older LLVMs, and I think our general stance is that we really only support the in-tree LLVM. Plus, we really want CI times on this builder to be really low, as it's run on *every* PR -- that's a lot of CI time. test-various: This disables debug asserts still -- as noted in the Dockerfile, we test code size, and we need debug asserts off for that to work well.
2020-11-06Auto merge of #75778 - AndyGauge:75521-rustdoc-book-improvements, r=jyn514bors-31/+283
75521 rustdoc book improvements Added some guidelines about documenting with rustdoc Fixes #75521
2020-11-06Bump Rustfmt and RLSAlessandro Ghedini-5/+6
Should hopefully fix #78341 and #78340.
2020-11-06Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one ↵Mark Rousskov-24/+5
more case"" This reverts commit b20bce8ce54ea9d47c2e3eb0b17cbb6baf916ae2. It retains the test added in that commit as a check-pass test, intended to prevent future (unintentional) regressions.
2020-11-07Rollup merge of #78798 - ankushduacodes:fixing-typo, r=jonas-schievinkYuki Okushi-4/+4
Fixing Spelling Typos Fixing #78787
2020-11-07Rollup merge of #78726 - GuillaumeGomez:back-link-to-main-website, ↵Yuki Okushi-1/+2
r=steveklabnik Add link to rust website Fixes #30838 This doesn't fix the issue as suggested but it at least adds a link to allow to go back to the rust website. r? `@steveklabnik`
2020-11-07Rollup merge of #78705 - Mark-Simulacrum:nicer-failure-compiletest, r=jyn514Yuki Okushi-2/+36
Print a summary of which test suite failed Especially on CI, where cross-compiling is common and single builder may end up with multiple hosts and multiple targets, it can be annoying to scroll back to the nearest start of test marker. This prints out a summary of the test suite being run directly in compiletest. For example, on a mir-opt failure, this would show something like this: ``` failures: [mir-opt] mir-opt/while-storage.rs test result: FAILED. 140 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu ``` Fixes #78517
2020-11-07Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514Yuki Okushi-19/+42
Fix shellcheck error ## Overview Helps with #77290 This pr fix only errors of shellcheck, the result of `git ls-files '*.sh' | xargs shellcheck --severity=error`. Fixing error are following. - https://github.com/koalaman/shellcheck/wiki/SC2148 - https://github.com/koalaman/shellcheck/wiki/SC1008 Disable error following. - https://github.com/koalaman/shellcheck/wiki/SC2068
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-5/+18
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-06ignore shellcheck error SC2068Daiki Ihara-1/+2
2020-11-06fix shellcheck error of SC2068Daiki Ihara-20/+20
2020-11-06fix shellcheck error of SC1008Daiki Ihara-0/+1
2020-11-06fix shellcheck error of SC2148Daiki Ihara-0/+21
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-737/+10006
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-4/+377
Add non_autolinks lint Part of #77501. r? `@jyn514`
2020-11-06Fixing Spelling Typosankushduacodes-4/+4
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-0/+6
2020-11-05Added comments on remapping expression IDs, and URL to spanviewsRich Kadel-116/+1169
2020-11-05Injecting expressions in place of counters where helpfulRich Kadel-547/+529
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-0/+37
2020-11-05Implemented CoverageGraph of BasicCoverageBlocksRich Kadel-294/+216
2020-11-05Rust coverage before splitting instrument_coverage.rsRich Kadel-818/+9062
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-4/+4
2020-11-05Fix unreachable sub-branch detectionNadrieril-6/+12
This fixes https://github.com/rust-lang/rust/issues/76836
2020-11-05Add testNadrieril-4/+11
2020-11-05Fix even more URLsGuillaume Gomez-4/+4
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/+524
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-05Rollup merge of #78756 - ehuss:update-cargo, r=ehussMara Bos-0/+0
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-15/+42
make intern_const_alloc_recursive return error fix #78655 r? ``@oli-obk``