summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2020-12-08[beta] Update cargoEric Huss-0/+0
2020-11-24[beta] Update cargoEric Huss-0/+0
2020-11-17build-manifest: strip newline from rustc versionPietro Albini-4/+4
2020-11-13Auto merge of #78990 - RalfJung:miri, r=RalfJungbors-6/+6
update Miri Fixes https://github.com/rust-lang/rust/issues/78937 Cc `@rust-lang/miri` r? `@ghost`
2020-11-12Rollup merge of #78972 - ehuss:update-cargo, r=ehussMara Bos-0/+0
Update cargo 5 commits in d5556aeb8405b1fe696adb6e297ad7a1f2989b62..8662ab427a8d6ad8047811cc4d78dbd20dd07699 2020-11-04 22:20:36 +0000 to 2020-11-12 03:47:53 +0000 - Check if rust-src contains a vendor dir, and patch it in (rust-lang/cargo#8834) - Improve performance of almost fresh builds (rust-lang/cargo#8837) - Use u32/64::to/from_le_bytes instead of bit fiddling (rust-lang/cargo#8847) - Avoid constructing an anyhow::Error when not necessary (rust-lang/cargo#8844) - Skip extracting .cargo-ok files from packages (rust-lang/cargo#8835)
2020-11-12Rollup merge of #78970 - calebcartwright:update-rustfmt, r=Aaron1011Mara Bos-5/+5
update rustfmt to v1.4.25 Contains changes from https://github.com/rust-lang/rustfmt/pull/4507 r? ``@Aaron1011``
2020-11-12Rollup merge of #78836 - fanzier:struct-and-slice-destructuring, r=petrochenkovMara Bos-8/+32
Implement destructuring assignment for structs and slices This is the second step towards implementing destructuring assignment (RFC: rust-lang/rfcs#2909, tracking issue: #71126). This PR is the second part of #71156, which was split up to allow for easier review. Note that the first PR (#78748) is not merged yet, so it is included as the first commit in this one. I thought this would allow the review to start earlier because I have some time this weekend to respond to reviews. If ``@petrochenkov`` prefers to wait until the first PR is merged, I totally understand, of course. This PR implements destructuring assignment for (tuple) structs and slices. In order to do this, the following *parser change* was necessary: struct expressions are not required to have a base expression, i.e. `Struct { a: 1, .. }` becomes legal (in order to act like a struct pattern). Unfortunately, this PR slightly regresses the diagnostics implemented in #77283. However, it is only a missing help message in `src/test/ui/issues/issue-77218.rs`. Other instances of this diagnostic are not affected. Since I don't exactly understand how this help message works and how to fix it yet, I was hoping it's OK to regress this temporarily and fix it in a follow-up PR. Thanks to ``@varkor`` who helped with the implementation, particularly around the struct rest changes. r? ``@petrochenkov``
2020-11-12update MiriRalf Jung-6/+6
2020-11-11Update cargoEric Huss-0/+0
2020-11-11update rustfmtCaleb Cartwright-5/+5
2020-11-12Auto merge of #78782 - petrochenkov:nodoctok, r=Aaron1011bors-4/+4
Do not collect tokens for doc comments Doc comment is a single token and AST has all the information to re-create it precisely. Doc comments are also responsible for majority of calls to `collect_tokens` (with `num_calls == 1` and `num_calls == 0`, cc https://github.com/rust-lang/rust/pull/78736). (I also moved token collection into `fn parse_attribute` to deduplicate code a bit.) r? `@Aaron1011`
2020-11-11Implement destructuring assignment for structs and slicesFabian Zaiser-8/+32
Co-authored-by: varkor <github@varkor.com>
2020-11-11Fix typo in commentIkko Ashimine-1/+1
occurences -> occurrences
2020-11-09Rollup merge of #78710 - petrochenkov:macvisit, r=davidtwcoDylan DPC-7/+1
rustc_ast: Do not panic by default when visiting macro calls Panicking by default made sense when we didn't have HIR or MIR and everything worked on AST, but now all AST visitors run early and majority of them have to deal with macro calls, often by ignoring them. The second commit renames `visit_mac` to `visit_mac_call`, the corresponding structures were renamed earlier in https://github.com/rust-lang/rust/pull/69589.
2020-11-09Rollup merge of #78228 - pietroalbini:finally, r=Mark-SimulacrumDylan DPC-0/+1
Promote aarch64-unknown-linux-gnu to Tier 1 This PR promotes the `aarch64-unknown-linux-gnu` target to Tier 1, as proposed by [RFC 2959]: * The `aarch64-gnu` CI job is moved from `auto-fallible` to `auto`. * The platform support documentation is updated, uplifting the target to Tiert 1 with a note about missing stack probes support. * Building the documentation is enabled for the target, as we produce the `rust-docs` component for all Tier 1 platforms. [RFC 2959]: https://github.com/rust-lang/rfcs/pull/2959
2020-11-09Do not collect tokens for doc commentsVadim Petrochenkov-4/+4
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 #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-06update MiriRalf Jung-6/+6
2020-11-06Bump Rustfmt and RLSAlessandro Ghedini-5/+6
Should hopefully fix #78341 and #78340.
2020-11-07Rollup merge of #78705 - Mark-Simulacrum:nicer-failure-compiletest, r=jyn514Yuki Okushi-2/+35
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-05Merge commit 'b20d4c155d2fe3a8391f86dcf9a8c49e17188703' into clippyupflip1995-675/+2839
2020-11-05ci: build docs for aarch64-unknown-linux-gnuPietro Albini-0/+1
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-04Update cargoEric Huss-0/+0
2020-11-04Auto merge of #78662 - sexxi-goose:add_expr_id_to_delegate, r=nikomatsakisbors-16/+16
Provide diagnostic suggestion in ExprUseVisitor Delegate The [Delegate trait](https://github.com/rust-lang/rust/blob/981346fc07dd5ef414c5b1b21999f7604cece006/compiler/rustc_typeck/src/expr_use_visitor.rs#L28-L38) currently use `PlaceWithHirId` which is composed of Hir `Place` and the corresponding expression id. Even though this is an accurate way of expressing how a Place is used, it can cause confusion during diagnostics. Eg: ``` let arr : [String; 5]; let [a, ...] = arr; ^^^ E1 ^^^ = ^^E2^^ ``` Here `arr` is moved because of the binding created E1. However, when we point to E1 in diagnostics with the message `arr` was moved, it can be confusing. Rather we would like to report E2 to the user. Closes: https://github.com/rust-lang/project-rfc-2229/issues/20 r? `@ghost`
2020-11-04Auto merge of #78740 - pietroalbini:no-more-legacy, r=Mark-Simulacrumbors-93/+1
Remove legacy promote-release support from build-manifestg Now that we're not running the [legacy `promote-release`](https://github.com/rust-lang/rust-central-station/tree/master/promote-release) anymore, this PR removes support from it from `bootstrap` and `build-manifest`. r? `@Mark-Simulacrum`
2020-11-04s/Scalar::Raw/Scalar::Intoli-1/+1
2020-11-04Split the "raw integer bytes" part out of `Scalar`Oliver Scherer-8/+9
2020-11-03Add a tool to run `x.py` from any subdirectoryCasey Rodarmor-0/+107
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 `x.py` from any subdirectory. It can be installed globally with `cargo install --path src/tools/x`
2020-11-03rustc_ast: `visit_mac` -> `visit_mac_call`Vadim Petrochenkov-1/+1
2020-11-03Rollup merge of #77950 - arlosi:sha256, r=eddybMara Bos-0/+2
Add support for SHA256 source file hashing Adds support for `-Z src-hash-algorithm sha256`, which became available in LLVM 11. Using an older version of LLVM will cause an error `invalid checksum kind` if the hash algorithm is set to sha256. r? `@eddyb` cc #70401 `@est31`
2020-11-03rustc_ast: Do not panic by default when visiting macro callsVadim Petrochenkov-6/+0
2020-11-03Print a summary of which test suite failedMark Rousskov-2/+35
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.
2020-11-03build-manifest: remove legacy promote-release supportPietro Albini-93/+1
This commit removes support for the legacy promote-release, as that's not executed anymore on the nightly channel.
2020-11-02Auto merge of #78667 - pietroalbini:lldb-unbuffered, r=Mark-Simulacrumbors-0/+1
Try running lldb_batchmode.py with PYTHONUNBUFFERED When reporting fatal errors, LLVM calls abort() to exit the program. There is a chance that might interfere with Python printing stuff to stdout, as by default it relies on buffering to increase performance. This commit tries to disable Python buffering, to hopefully get useful logs while debugging #78665.
2020-11-02compiletest: try running lldb_batchmode.py with PYTHONUNBUFFEREDPietro Albini-0/+1
When reporting fatal errors, LLVM calls abort() to exit the program. There is a chance that might interfere with Python printing stuff to stdout, as by default it relies on buffering to increase performance. This commit tries to disable Python buffering, to hopefully get useful logs while debugging #78665.
2020-11-02Provide diagnostic suggestion in ExprUseVisitor DelegateDhruv Jauhar-16/+16
The [Delegate trait](https://github.com/rust-lang/rust/blob/981346fc07dd5ef414c5b1b21999f7604cece006/compiler/rustc_typeck/src/expr_use_visitor.rs#L28-L38) currently use `PlaceWithHirId` which is composed of Hir `Place` and the corresponding expression id. Even though this is an accurate way of expressing how a Place is used, it can cause confusion during diagnostics. Eg: ``` let arr : [String; 5]; let [a, ...] = arr; ^^^ E1 ^^^ = ^^E2^^ ``` Here `arr` is moved because of the binding created E1. However, when we point to E1 in diagnostics with the message `arr` was moved, it can be confusing. Rather we would like to report E2 to the user. Closes: https://github.com/rust-lang/project-rfc-2229/issues/20
2020-11-01Auto merge of #75534 - Aaron1011:feature/new-future-breakage, r=pnkfelixbors-9/+59
Implement rustc side of report-future-incompat cc https://github.com/rust-lang/rust/issues/71249 This is an alternative to `@pnkfelix's` initial implementation in https://github.com/pnkfelix/rust/commits/prototype-rustc-side-of-report-future-incompat (mainly because I started working before seeing that branch :smile: ). My approach outputs the entire original `Diagnostic`, in a way that is compatible with incremental compilation. This is not yet integrated with compiletest, but can be used manually by passing `-Z emit-future-incompat-report` to `rustc`. Several changes are made to support this feature: * The `librustc_session/lint` module is moved to a new crate `librustc_lint_defs` (name bikesheddable). This allows accessing lint definitions from `librustc_errors`. * The `Lint` struct is extended with an `Option<FutureBreakage>`. When present, it indicates that we should display a lint in the future-compat report. `FutureBreakage` contains additional information that we may want to display in the report (currently, a `date` field indicating when the crate will stop compiling). * A new variant `rustc_error::Level::Allow` is added. This is used when constructing a diagnostic for a future-breakage lint that is marked as allowed (via `#[allow]` or `--cap-lints`). This allows us to capture any future-breakage diagnostics in one place, while still discarding them before they are passed to the `Emitter`. * `DiagnosticId::Lint` is extended with a `has_future_breakage` field, indicating whether or not the `Lint` has future breakage information (and should therefore show up in the report). * `Session` is given access to the `LintStore` via a new `SessionLintStore` trait (since `librustc_session` cannot directly reference `LintStore` without a cyclic dependency). We use this to turn a string `DiagnosticId::Lint` back into a `Lint`, to retrieve the `FutureBreakage` data. Currently, `FutureBreakage.date` is always set to `None`. However, this could potentially be interpreted by Cargo in the future. I've enabled the future-breakage report for the `ARRAY_INTO_ITER` lint, which can be used to test out this PR. The intent is to use the field to allow Cargo to determine the date of future breakage (as described in [RFC 2834](https://github.com/rust-lang/rfcs/blob/master/text/2834-cargo-report-future-incompat.md)) without needing to parse the diagnostic itself. cc `@pnkfelix`
2020-10-30Update Clippy path to `Lint`Aaron Hill-1/+1
2020-10-30Always pass `-Z future-incompat-report` to UI testsAaron Hill-0/+1
2020-10-30Don't display empty future-compat reportAaron Hill-16/+21
2020-10-30Update into-iter-on-arrays test to check future-incompat-reportAaron Hill-11/+22
2020-10-30Only error on unfixed diagnosticsAaron Hill-1/+3
2020-10-30Strip out non-diagnostic lines from rustfix inputAaron Hill-7/+20
2020-10-30Print future breakage reportAaron Hill-6/+9
2020-10-30Some workAaron Hill-2/+17
2020-10-30Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obkbors-4/+6
TypeVisitor: use `std::ops::ControlFlow` instead of `bool` Implements MCP rust-lang/compiler-team#374. Blocked on FCP in rust-lang/compiler-team#374. r? `@lcnr` cc `@jonas-schievink`
2020-10-30Remove implicit `Continue` typeLeSeulArtichaut-1/+1
2020-10-30Use `ControlFlow::is{break,continue}`LeSeulArtichaut-2/+2