about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2021-01-01first pass at default values for const genericsJulian Knodt-1/+6
- Adds optional default values to const generic parameters in the AST and HIR - Parses these optional default values - Adds a `const_generics_defaults` feature gate
2021-01-01Auto merge of #80539 - JohnTitor:ui-test-root-cleanup, r=petrochenkovbors-1/+1
Reduce the entry on `src/test/ui` (UI test root) CC #73494, similar to #79776. r? `@petrochenkov`
2020-12-31Merge remote-tracking branch 'origin/master' into frewsxcv-sanCorey Farwell-1182/+3323
2021-01-01Reduce `ROOT_ENTRY_LIMIT` to 1500Yuki Okushi-1/+1
2020-12-31Auto merge of #80435 - pietroalbini:compression-formats, r=Mark-Simulacrumbors-0/+0
Only produce .xz tarballs on CI This PR adds a `./configure` option to choose which tarball compression formats to produce, and changes our CI configuration to only produce `.xz` tarballs. The release process will then recompress everything into `.gz` when producing a release. This will drastically reduce our storage costs for CI artifacts, as we'd stop storing the same data twice. **Stable, beta and nightly releases will not be affected by this at all.** Before landing this we'll need to increase the VM size of our release process, to recompress everything in a reasonable amount of time. r? `@Mark-Simulacrum`
2020-12-30Rollup merge of #80495 - jyn514:rename-empty, r=petrochenkovMara Bos-1/+1
Rename kw::Invalid -> kw::Empty See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Is.20there.20a.20symbol.20for.20the.20empty.20string.3F/near/220054471 for context. r? `@petrochenkov`
2020-12-30Rename kw::Invalid -> kw::EmptyJoshua Nelson-1/+1
See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Is.20there.20a.20symbol.20for.20the.20empty.20string.3F/near/220054471 for context.
2020-12-30Rollup merge of #79812 - Aaron1011:lint-item-trailing-semi, r=oli-obkYuki Okushi-2/+2
Lint on redundant trailing semicolon after item We now lint on code like this: ```rust fn main() { fn foo() {}; struct Bar {}; } ``` Previously, this caused warnings in Cargo, so it was disabled.
2020-12-29Remove unnecessary semicolon from Clippy testAaron Hill-2/+2
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-27/+11
2020-12-28bump rust-installer submodulePietro Albini-0/+0
2020-12-26lint-docs: Warn on missing lint when documenting.Eric Huss-6/+16
2020-12-25Rollup merge of #80280 - pierwill:x-readme, r=Mark-SimulacrumDylan DPC-0/+7
Add installation commands to `x` tool README
2020-12-24Auto merge of #80322 - ehuss:update-cargo, r=ehussbors-0/+2
Update cargo 10 commits in a3c2627fbc2f5391c65ba45ab53b81bf71fa323c..75d5d8cffe3464631f82dcd3c470b78dc1dda8bb 2020-12-14 17:21:26 +0000 to 2020-12-22 18:10:56 +0000 - Update git2 (rust-lang/cargo#9009) - Stabilize RUSTC_WORKSPACE_WRAPPER (rust-lang/cargo#8976) - Make cargo metadata and tree respect target (rust-lang/cargo#8987) - Update git2 (rust-lang/cargo#8998) - Revert rust-lang/cargo#8954 - changing rustdoc's cwd (rust-lang/cargo#8996) - With debug HTTP mode log curl's version (rust-lang/cargo#8991) - Reject ambiguous git dependency declaration. (rust-lang/cargo#8984) - Fix tests not working with a different CARGO_TARGET_DIR. (rust-lang/cargo#8982) - Add version to credential dependencies. (rust-lang/cargo#8983) - Clarify FAQ entry wording about lockfiles (rust-lang/cargo#8978)
2020-12-24Auto merge of #80249 - calebcartwright:update-rustfmt, r=Mark-Simulacrumbors-5/+5
update rustfmt to v1.4.30 Contains fixes for a few reported bugs on current nightly (1.4.29) Notes in: https://github.com/rust-lang/rustfmt/releases/tag/v1.4.30
2020-12-23Add libz-sys to rustc-workspace-hack.Eric Huss-0/+2
https://github.com/alexcrichton/curl-rust/pull/351 changed curl-rust to no longer enable the default features of libz-sys. Because rustfmt includes rustc-workspace-hack with the rustc-workspace-hack/all-static feature (sometimes), it ends up building libz-sys without the default features. This causes a duplicate with other packages (like rls) which enable the default features.
2020-12-23Update cargoEric Huss-0/+0
2020-12-23Auto merge of #80328 - flip1995:clippyup, r=Mark-Simulacrumbors-171/+47
Clippy: Revert change from last sync r? `@Manishearth` cc `@ebroto` Note that the commit e898015 doesn't exist like this in the Clippy repo. I didn't want to do a full sync, because this would've included at least one new lint, which I wanted to avoid a week before beta is branched. This just reverts one commit from the last sync.
2020-12-23Auto merge of #80262 - Mark-Simulacrum:pgo-rustc, r=pietroalbinibors-0/+1
Utilize PGO for rustc linux dist builds This implements support for applying PGO to the rustc compilation step (not standard library or any tooling, including rustdoc). Expanding PGO to more tools is not terribly difficult but will involve more work and greater CI time commitment. For the same reason of avoiding greater implementation time commitment, implementing for platforms outside of x86_64-unknown-linux-gnu is skipped. In practice it should be quite simple to extend over time to more platforms. The initial implementation is intentionally minimal here to avoid too much work investment before we start seeing wins for a subset of Rust users. The choice of workloads to profile here is somewhat arbitrary, but the general rationale was to aim for a small set that largely avoided time regressions on perf.rust-lang.org's full suite of crates. The set chosen is libcore, cargo (and its dependencies), and a few ad-hoc stress tests from perf.rlo. The stress tests are arguably the most controversial, but they benefit those cases (avoiding regressions) and do not really remove wins from other benchmarks. The primary next step after this PR lands is to implement support for PGO in LLVM. It is unclear whether we can afford a full LLVM rebuild in CI, though, so the approach taken there may need to be more staggered. rustc-only PGO seems well affordable on linux at least, giving us up to 20% wall time wins on some crates for 15 minutes of extra CI time (1 hour with this PR, up from 45 minutes). The PGO data is uploaded to allow others to reuse it if attempting to reproduce the CI build or potentially, in the future, on other platforms where an off-by-one strategy is used for dist builds at minimal performance cost. r? `@michaelwoerister` (but tell me if you don't want to / don't feel comfortable approving and we can find others)
2020-12-23Special sync of 'e89801553ddbaccdeb2eac4db08900edb51ac7ff'flip1995-171/+47
2020-12-22Utilize PGO for rustc linux dist buildsMark Rousskov-0/+1
This implements support for applying PGO to the rustc compilation step (not standard library or any tooling, including rustdoc). Expanding PGO to more tools is not terribly difficult but will involve more work and greater CI time commitment. For the same reason of avoiding greater time commitment, this currently avoids implementing for platforms outside of x86_64-unknown-linux-gnu, though in practice it should be quite simple to extend over time to more platforms. The initial implementation is intentionally minimal here to avoid too much work investment before we start seeing wins for a subset of Rust users. The choice of workloads to profile here is somewhat arbitrary, but the general rationale was to aim for a small set that largely avoided time regressions on perf.rust-lang.org's full suite of crates. The set chosen is libcore, cargo (and its dependencies), and a few ad-hoc stress tests from perf.rlo. The stress tests are arguably the most controversial, but they benefit those cases (avoiding regressions) and do not really remove wins from other benchmarks. The primary next step after this PR lands is to implement support for PGO in LLVM. It is unclear whether we can afford a full LLVM rebuild in CI, though, so the approach taken there may need to be more staggered. rustc-only PGO seems well affordable on linux at least, giving us up to 20% wall time wins on some crates for 15 minutes of extra CI time (1 hour up from 45 minutes). The PGO data is uploaded to allow others to reuse it if attempting to reproduce the CI build or potentially, in the future, on other platforms where an off-by-one strategy is used for dist builds at minimal performance cost.
2020-12-21Add installation commands to `x` tool READMEpierwill-0/+7
2020-12-20update rustfmt to v1.4.30Caleb Cartwright-5/+5
2020-12-20Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyupflip1995-1049/+3201
2020-12-19Auto merge of #80106 - jackh726:binder-refactor-part-2, r=lcnrbors-1/+1
A lot of refactoring to remove more `Binder::bind`s Split out from #76814
2020-12-19More rebindsJack Huey-1/+1
2020-12-18Auto merge of #80081 - ehuss:update-cargo, r=Mark-Simulacrumbors-0/+0
Update cargo 4 commits in d274fcf862b89264fa2c6b917b15230705257317..a3c2627fbc2f5391c65ba45ab53b81bf71fa323c 2020-12-07 23:08:44 +0000 to 2020-12-14 17:21:26 +0000 - Check if rerun-if-changed points to a directory. (rust-lang/cargo#8973) - Implement external credential process. (RFC 2730) (rust-lang/cargo#8934) - Revert recent build-std vendoring changes (rust-lang/cargo#8968) - Fix the unit dependency graph with dev-dependency `links` (rust-lang/cargo#8969)
2020-12-18Update cargoEric Huss-0/+0
2020-12-17Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakisbors-2/+2
Move binder for dyn to each list item This essentially changes `ty::Binder<&'tcx List<ExistentialTraitRef>>` to `&'tcx List<ty::Binder<ExistentialTraitRef>>`. This is a first step in moving the `dyn Trait` representation closer to Chalk, which we've talked about in `@rust-lang/wg-traits.` r? `@nikomatsakis`
2020-12-17Rollup merge of #80026 - JohnTitor:separator-insensitive, r=Mark-SimulacrumYuki Okushi-1/+2
expand-yaml-anchors: Make the output directory separator-insensitive Fixes #75709
2020-12-17Rollup merge of #79051 - LeSeulArtichaut:if-let-guard, r=matthewjasperYuki Okushi-1/+25
Implement if-let match guards Implements rust-lang/rfcs#2294 (tracking issue: #51114). I probably should do a few more things before this can be merged: - [x] Add tests (added basic tests, more advanced tests could be done in the future?) - [x] Add lint for exhaustive if-let guard (comparable to normal if-let statements) - [x] Fix clippy However since this is a nightly feature maybe it's fine to land this and do those steps in follow-up PRs. Thanks a lot `@matthewjasper` :heart: for helping me with lowering to MIR! Would you be interested in reviewing this? r? `@ghost` for now
2020-12-16compiletest: add split dwarf compare modeDavid Wood-0/+14
This commit adds a Split DWARF compare mode to compiletest so that debuginfo tests are also tested using Split DWARF in split mode (and manually in single mode). Signed-off-by: David Wood <david@davidtw.co>
2020-12-15Auto merge of #78399 - vn-ki:gsgdt-graphviz, r=oli-obkbors-3/+3
make MIR graphviz generation use gsgdt gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph. This is the first in a series of PRs on moving graphviz code out of rustc into normal crates and then implementating graph diffing on top of these crates. r? `@oli-obk`
2020-12-15Rollup merge of #80025 - JohnTitor:tidy-error, r=Mark-SimulacrumGuillaume Gomez-23/+20
Replace some `println!` with `tidy_error!` to simplify
2020-12-15Rollup merge of #79958 - richkadel:llvm-coverage-counters-2.2.0, r=tmandryGuillaume Gomez-15/+17
Fixes reported bugs in Rust Coverage Fixes: #79569 Fixes: #79566 Fixes: #79565 For the first issue (#79569), I got hit a `debug_assert!()` before encountering the reported error message (because I have `debug = true` enabled in my config.toml). The assertion showed me that some `SwitchInt`s can have more than one target pointing to the same `BasicBlock`. I had thought that was invalid, but since it seems to be possible, I'm allowing this now. I added a new test for this. ---- In the last two cases above, both tests (intentionally) fail to compile, but the `InstrumentCoverage` pass is invoked anyway. The MIR starts with an `Unreachable` `BasicBlock`, which I hadn't encountered before. (I had assumed the `InstrumentCoverage` pass would only be invoked with MIRs from successful compilations.) I don't have test infrastructure set up to test coverage on files that fail to compile, so I didn't add a new test. r? `@tmandry` FYI: `@wesleywiser`
2020-12-14Convenience funcs for `some_option.unwrap_or(...)`Rich Kadel-1/+1
This ensures consistent handling of default values for options that are None if not specified on the command line.
2020-12-14Improve warnings on incompatible options involving -Zinstrument-coverageRich Kadel-16/+18
Adds checks for: * `no_core` attribute * explicitly-enabled `legacy` symbol mangling * mir_opt_level > 1 (which enables inlining) I removed code from the `Inline` MIR pass that forcibly disabled inlining if `-Zinstrument-coverage` was set. The default `mir_opt_level` does not enable inlining anyway. But if the level is explicitly set and is greater than 1, I issue a warning. The new warnings show up in tests, which is much better for diagnosing potential option conflicts in these cases.
2020-12-14expand-yaml-anchors: Make the output directory separator-insensitiveYuki Okushi-1/+2
2020-12-14Replace some `println!` with `tidy_error!` to simplifyYuki Okushi-23/+20
2020-12-14Check the number of entries in UI testYuki Okushi-1/+43
2020-12-12Auto merge of #79969 - petrochenkov:outestidy, r=Mark-Simulacrumbors-1/+4
tidy: Re-enable check for inline unit tests It regressed in https://github.com/rust-lang/rust/pull/73265 and compiler crates are no longer checked.
2020-12-12tidy: Re-enable check for inline unit testsVadim Petrochenkov-1/+4
2020-12-12Ignore .css files in the diffJoshua Nelson-1/+2
These are always static and never autogenerated, so the diffs aren't useful.
2020-12-12If tidy isn't installed, only give one error, not manyJoshua Nelson-19/+22
2020-12-12Don't abort rustdoc tests if `tidy` isn't installedJoshua Nelson-11/+16
Before: ``` Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) running 396 tests ..................................................2020-11-23T12:12:37.735649Z ERROR compiletest::runtest: fatal error, panic: "failed to run tidy - is it installed? - No such file or directory (os error 2)" F................................................. 100/396 .................................................................................................... 200/396 .................................................................................................... 300/396 ...............................i...............2020-11-23T12:15:00.271271Z ERROR compiletest::runtest: fatal error, panic: "failed to run tidy - is it installed? - No such file or directory (os error 2)" F................................................ ``` After: ``` Check compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) running 4 tests .FFF failures: ---- [rustdoc] rustdoc/fn-pointer-arg-name.rs stdout ---- error: htmldocck failed! status: exit code: 1 command: "/usr/bin/python" "/home/joshua/rustc/src/etc/htmldocck.py" "/home/joshua/rustc/build/x86_64-unknown-linux-gnu/test/rustdoc/fn-pointer-arg-name" "/home/joshua/rustc/src/test/rustdoc/fn-pointer-arg-name.rs" stdout: ------------------------------------------ ------------------------------------------ stderr: ------------------------------------------ 4: @has check failed `XPATH PATTERN` did not match // @has - '//*[@class="rust fn"]' 'pub fn f(callback: fn(len: usize, foo: u32))' Encountered 1 errors ------------------------------------------ info: generating a diff against nightly rustdoc failed to run tidy - is it installed? - Permission denied (os error 13) failed to run tidy - is it installed? - Permission denied (os error 13) # a diff without running `tidy` ```
2020-12-12Auto merge of #79937 - RalfJung:miri, r=RalfJungbors-10/+8
update Miri Fixes https://github.com/rust-lang/rust/issues/79897 Cc `@rust-lang/miri` r? `@ghost`
2020-12-11Auto merge of #79349 - Nemo157:issue-79201, r=jyn514bors-1/+1
Apply `doc(cfg)` from parent items while collecting trait impls Because trait impls bypass the standard `clean` hierarchy they do not participate in the `propagate_doc_cfg` pass, so instead we need to pre-collect all possible `doc(cfg)` attributes that will apply to them when cleaning. fixes #79201
2020-12-11Move binder for dyn to each list itemJack Huey-2/+2
2020-12-11update MiriRalf Jung-10/+8
2020-12-10Rollup merge of #79809 - Eric-Arellano:split-once, r=matkladTyler Mandry-61/+80
Dogfood `str_split_once()` Part of https://github.com/rust-lang/rust/issues/74773. Beyond increased clarity, this fixes some instances of a common confusion with how `splitn(2)` behaves: the first element will always be `Some()`, regardless of the delimiter, and even if the value is empty. Given this code: ```rust fn main() { let val = "..."; let mut iter = val.splitn(2, '='); println!("Input: {:?}, first: {:?}, second: {:?}", val, iter.next(), iter.next()); } ``` We get: ``` Input: "no_delimiter", first: Some("no_delimiter"), second: None Input: "k=v", first: Some("k"), second: Some("v") Input: "=", first: Some(""), second: Some("") ``` Using `str_split_once()` makes more clear what happens when the delimiter is not found.