about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2020-08-06write currently failing test for transmutes_expressible_as_ptr_castsRyan1729-1/+54
There are 5 errors, when there should be 7.
2020-08-06initial compiling version of TRANSMUTES_EXPRESSIBLE_AS_PTR_CASTSRyan1729-2/+72
2020-08-06run cargo dev new_lint then move transmutes_expressible_as_ptr_casts into ↵Ryan1729-0/+39
transmute module
2020-08-05Label rustfmt toolstate issues with A-rustfmtAaron Hill-1/+1
This makes it easier to filter toolstate issues by the tool involved.
2020-08-04Update cargoEric Huss-0/+0
2020-08-04Rollup merge of #75106 - etherealist:docs_manifest, r=Mark-SimulacrumYuki Okushi-0/+1
Enable docs on in the x86_64-unknown-linux-musl manifest Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows people using rustup on their musl-based linux distribution to download the rust-docs. Generating and uploading the docs was enabled in b5d143b (#74871). In #75102 @Mark-Simulacrum found that we are uploading the docs, but the correct manifest is missing. * The relevant call to build-manifest seems to be [in bootstrap](https://github.com/rust-lang/rust/blob/c058a8b8dc5dea0ed9b33e14da9e317e2749fcd7/src/bootstrap/dist.rs#L2334) * The manifest is then used in [promote-release crontab](https://github.com/rust-lang/rust-central-station/blob/master/crontab)
2020-08-04rustc_ast: `(Nested)MetaItem::check_name` -> `has_name`Vadim Petrochenkov-19/+19
For consistency with `Attribute::has_name` which doesn't mark the attribute as used either. Replace all uses of `check_name` with `has_name` outside of rustc
2020-08-03Enable docs on in the x86_64-unknown-linux-musl manifestDavid Sonder-0/+1
Add the rust-docs component to toolchain x86_64-unknown-linux-musl, which allows people using rustup on their musl-based linux distribution to download the rust-docs. Generating and uploading the docs was enabled in b5d143b.
2020-08-02Rollup merge of #75064 - petrochenkov:llvmtarg, r=Mark-SimulacrumManish Goregaokar-0/+12
compiletest: Support ignoring tests requiring missing LLVM components This PR implements a more principled solution to the problem described in https://github.com/rust-lang/rust/pull/66084. Builds of LLVM backends take a lot of time and disk space. So it usually makes sense to build rustc with ```toml [llvm] targets = "X86" experimental-targets = "" ``` unless you are working on some target-specific tasks. A few tests, however, require non-x86 backends to be built. A new test directive `// needs-llvm-components: component1 component2 component3` makes such tests to be automatically ignored if one of the listed components is missing in the provided LLVM (this is determined through `llvm-config --components`). As a result, the test suite now fully passes with LLVM built only with the x86 backend. The component list in this case is ``` aggressiveinstcombine all all-targets analysis asmparser asmprinter binaryformat bitreader bitstreamreader bitwriter cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel instcombine instrumentation interpreter ipo irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mirparser native nativecodegen objcarcopts object objectyaml option orcerror orcjit passes profiledata remarks runtimedyld scalaropts selectiondag support symbolize tablegen target textapi transformutils vectorize windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xray ``` (With the default target list it's much larger.) ``` aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xray ``` https://github.com/rust-lang/rust/pull/66084 is also reverted now. r? @Mark-Simulacrum
2020-08-02Rollup merge of #75059 - shengsheng:typos, r=Dylan-DPCManish Goregaokar-1/+1
fix typos Fix common misspellings with https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2020-08-02Rollup merge of #74980 - davidtwco:issue-74745-pprust-regression-test, ↵Manish Goregaokar-9/+16
r=petrochenkov pprust: adjust mixed comment printing and add regression test for #74745 Fixes #74745. This PR adds a regression test for #74745. While a `ignore-tidy-trailing-lines` header is required, this doesn't stop the test from reproducing, so long as there is no newline at the end of the file. However, adding the header comments made the test fail due to a bug in pprust - so this PR also adjusts the pretty printing of mixed comments so that the initial zero-break isn't emitted at the beginning of the line. Through this, the `block-comment-wchar` test can have the `pp-exact` file removed, as it no longer converges from pretty printing of the source.
2020-08-02compiletest: Support ignoring tests requiring missing LLVM componentsVadim Petrochenkov-0/+12
2020-08-02fix typosliuzhenyu-1/+1
2020-08-02compiletest: print diff for pretty testsDavid Wood-9/+16
This commit modifies compiletest so that a diff of actual and expected output is shown for pretty tests. This makes it far easier to work out what has changed. Signed-off-by: David Wood <david@davidtw.co>
2020-08-01Update elasticlunr-rs and ammonia transitive depsAaron Hill-1/+0
This removes all dependencies on pre-1.0 proc-macro ecosystem crates (syn, quote, and proc-macro2)
2020-08-01Auto merge of #74726 - oli-obk:tracing, r=Mark-Simulacrumbors-3/+6
Move from `log` to `tracing` The only visible change is that we now get timestamps in our logs: ``` Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: skipping replace of Rvalue::Use(const () because it is already a const Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: propagated into _2 Jul 24 18:41:01.065 TRACE rustc_mir::transform::const_prop: visit_constant: const () ``` This PR was explicitly designed to be as low-impact as possible. We can now move to using the name `tracing` insteads of `log` on a crate-by-crate basis and use any of the other tracing features where desirable. As far as I can tell this will allow tools to seamlessly keep working (since they are using `rustc_driver::init_log...`). This is the first half of step 1 of the accepted `tracing` MCP (https://github.com/rust-lang/compiler-team/issues/331)
2020-08-01Rollup merge of #74996 - matthiaskrgr:submodule_upd, r=ehussManish Goregaokar-0/+0
submodules: update cargo from 974eb438d to 2d5c2381e Changes: ```` Use the same index location on nightly as beta relax deprecated diagnostic message check Don't print to raw stderr in test Emit the `test` field in cargo metadata ```` r? @ehuss Trying to get the fix to the registry-index-hash upstream soonish.
2020-08-01submodules: update cargo from 974eb438d to 2d5c2381eMatthias Krüger-0/+0
Changes: ```` Use the same index location on nightly as beta relax deprecated diagnostic message check Don't print to raw stderr in test Emit the `test` field in cargo metadata ````
2020-07-31Rename HAIR to THIR (Typed HIR).Valentin Lazureanu-1/+1
2020-07-31Update error index generator to tracingOliver Scherer-2/+2
2020-07-31Add tracing libs to list of permitted dependenciesOliver Scherer-0/+3
2020-07-31Move from `log` to `tracing`Oliver Scherer-1/+1
2020-07-31compiletest: ignore-endian-big, fixes #74829, fixes #74885Ximin Luo-0/+21
2020-07-30Auto merge of #74682 - alexcrichton:backtrace-gimli-round-2, r=Mark-Simulacrumbors-3/+6
std: Switch from libbacktrace to gimli (take 2) This is the second attempt to land https://github.com/rust-lang/rust/pull/73441 after being reverted in https://github.com/rust-lang/rust/pull/74613. Will be gathering precise perf numbers here in this take. Closes #71060
2020-07-30Auto merge of #74908 - RalfJung:miri, r=RalfJungbors-34/+9
update Miri Fixes https://github.com/rust-lang/rust/issues/74580 Cc @rust-lang/miri r? @ghost
2020-07-30update MiriRalf Jung-34/+9
2020-07-30Auto merge of #74923 - ehuss:update-cargo, r=Mark-Simulacrumbors-1/+0
Update cargo 14 commits in aa6872140ab0fa10f641ab0b981d5330d419e927..974eb438da8ced6e3becda2bbf63d9b643eacdeb 2020-07-23 13:46:27 +0000 to 2020-07-29 16:15:05 +0000 - Fix O0 build scripts by default without `[profile.release]` (rust-lang/cargo#8560) - Emphasize git dependency version locking behavior. (rust-lang/cargo#8561) - Update lock file encodings on changes (rust-lang/cargo#8554) - Fix sporadic lto test failures. (rust-lang/cargo#8559) - build-std: Fix libraries paths following upstream (rust-lang/cargo#8558) - Flag git http errors as maybe spurious (rust-lang/cargo#8553) - Display builtin aliases with `cargo --list` (rust-lang/cargo#8542) - Check manifest for requiring nonexistent features (rust-lang/cargo#7950) - Clarify test name filter usage (rust-lang/cargo#8552) - Revert Cargo Book changes for default edition (rust-lang/cargo#8551) - Prepare for not defaulting to master branch for git deps (rust-lang/cargo#8522) - Include `+` for crates.io feature requirements in the Cargo Book section on features (rust-lang/cargo#8547) - Update termcolor and fwdansi versions (rust-lang/cargo#8540) - Cargo book nitpick in Manifest section (rust-lang/cargo#8543)
2020-07-29Improve the diagnostics around misspelled mir dump filenamesOliver Scherer-2/+13
2020-07-29Update clippy ui test.Oliver Scherer-21/+1
The reason we do not trigger these lints anymore is that clippy sets the mir-opt-level to 0, and the recent changes subtly changed how the const propagator works.
2020-07-29Update cargoEric Huss-1/+0
2020-07-29Move mir-opt tests to toplevelXavier Denis-29/+48
2020-07-28std: Switch from libbacktrace to gimliAlex Crichton-3/+6
This commit is a proof-of-concept for switching the standard library's backtrace symbolication mechanism on most platforms from libbacktrace to gimli. The standard library's support for `RUST_BACKTRACE=1` requires in-process parsing of object files and DWARF debug information to interpret it and print the filename/line number of stack frames as part of a backtrace. Historically this support in the standard library has come from a library called "libbacktrace". The libbacktrace library seems to have been extracted from gcc at some point and is written in C. We've had a lot of issues with libbacktrace over time, unfortunately, though. The library does not appear to be actively maintained since we've had patches sit for months-to-years without comments. We have discovered a good number of soundness issues with the library itself, both when parsing valid DWARF as well as invalid DWARF. This is enough of an issue that the libs team has previously decided that we cannot feed untrusted inputs to libbacktrace. This also doesn't take into account the portability of libbacktrace which has been difficult to manage and maintain over time. While possible there are lots of exceptions and it's the main C dependency of the standard library right now. For years it's been the desire to switch over to a Rust-based solution for symbolicating backtraces. It's been assumed that we'll be using the Gimli family of crates for this purpose, which are targeted at safely and efficiently parsing DWARF debug information. I've been working recently to shore up the Gimli support in the `backtrace` crate. As of a few weeks ago the `backtrace` crate, by default, uses Gimli when loaded from crates.io. This transition has gone well enough that I figured it was time to start talking seriously about this change to the standard library. This commit is a preview of what's probably the best way to integrate the `backtrace` crate into the standard library with the Gimli feature turned on. While today it's used as a crates.io dependency, this commit switches the `backtrace` crate to a submodule of this repository which will need to be updated manually. This is not done lightly, but is thought to be the best solution. The primary reason for this is that the `backtrace` crate needs to do some pretty nontrivial filesystem interactions to locate debug information. Working without `std::fs` is not an option, and while it might be possible to do some sort of trait-based solution when prototyped it was found to be too unergonomic. Using a submodule allows the `backtrace` crate to build as a submodule of the `std` crate itself, enabling it to use `std::fs` and such. Otherwise this adds new dependencies to the standard library. This step requires extra attention because this means that these crates are now going to be included with all Rust programs by default. It's important to note, however, that we're already shipping libbacktrace with all Rust programs by default and it has a bunch of C code implementing all of this internally anyway, so we're basically already switching already-shipping functionality to Rust from C. * `object` - this crate is used to parse object file headers and contents. Very low-level support is used from this crate and almost all of it is disabled. Largely we're just using struct definitions as well as convenience methods internally to read bytes and such. * `addr2line` - this is the main meat of the implementation for symbolication. This crate depends on `gimli` for DWARF parsing and then provides interfaces needed by the `backtrace` crate to turn an address into a filename / line number. This crate is actually pretty small (fits in a single file almost!) and mirrors most of what `dwarf.c` does for libbacktrace. * `miniz_oxide` - the libbacktrace crate transparently handles compressed debug information which is compressed with zlib. This crate is used to decompress compressed debug sections. * `gimli` - not actually used directly, but a dependency of `addr2line`. * `adler32`- not used directly either, but a dependency of `miniz_oxide`. The goal of this change is to improve the safety of backtrace symbolication in the standard library, especially in the face of possibly malformed DWARF debug information. Even to this day we're still seeing segfaults in libbacktrace which could possibly become security vulnerabilities. This change should almost entirely eliminate this possibility whilc also paving the way forward to adding more features like split debug information. Some references for those interested are: * Original addition of libbacktrace - #12602 * OOM with libbacktrace - #24231 * Backtrace failure due to use of uninitialized value - #28447 * Possibility to feed untrusted data to libbacktrace - #21889 * Soundness fix for libbacktrace - #33729 * Crash in libbacktrace - #39468 * Support for macOS, never merged - ianlancetaylor/libbacktrace#2 * Performance issues with libbacktrace - #29293, #37477 * Update procedure is quite complicated due to how many patches we need to carry - #50955 * Libbacktrace doesn't work on MinGW with dynamic libs - #71060 * Segfault in libbacktrace on macOS - #71397 Switching to Rust will not make us immune to all of these issues. The crashes are expected to go away, but correctness and performance may still have bugs arise. The gimli and `backtrace` crates, however, are actively maintained unlike libbacktrace, so this should enable us to at least efficiently apply fixes as situations come up.
2020-07-28Collect library features from library/Mark Rousskov-3/+5
2020-07-27mv std libs to library/mark-155/+94
2020-07-27clippyBastian Kauschke-5/+5
2020-07-27introduce PredicateAtomBastian Kauschke-5/+5
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-3/+3
2020-07-27clippyBastian Kauschke-22/+22
2020-07-27Rollup merge of #74750 - oli-obk:logging_and_test_cleanups, r=JohnTitorYuki Okushi-1/+1
Clean up some uses of logging in ui tests The removed test can't possibly trigger anything today as we don't have logging in libstd. The `exec-env` flag was mistakenly used for adding env vars to rustc invocations both in test and in the test suite and there were some accidental renames from RUST_LOG to RUSTC_LOG that I reverted.
2020-07-26Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyupflip1995-259/+840
2020-07-25Update rustfmtTyler Mandry-18/+15
Changes: - preparation for potential rustfmt 1.4.19 (#4283) - chore: backport 8157a3f0afe978d3e953420577f8344db7e905bf - deps: bump rustc-ap to v669 - deps: bump rustc-ap-* to v668 - deps: bump rustc-ap* to v666 - Use correct span for match arms with the leading pipe and attributes (#3975)
2020-07-25Update rlsTyler Mandry-0/+0
Changes: - deps: update racer and cargo
2020-07-25Clean up some uses of logging in ui testsOliver Scherer-1/+1
2020-07-24Rollup merge of #74715 - oli-obk:mir_pass_diff, r=wesleywiserManish Goregaokar-10/+43
Add a system for creating diffs across multiple mir optimizations. r? @wesleywiser
2020-07-24Add a system for creating diffs across multiple mir optimizations.Oliver Scherer-10/+43
2020-07-23Update cargoEric Huss-0/+0
2020-07-23Auto merge of #74613 - Mark-Simulacrum:revert-gimli, r=nnethercotebors-6/+3
Revert libbacktrace -> gimli This reverts 4cbd265c119cb1a5eb92e98d2bb93466f05efa46 028f8d7b85898683b99e05564cd2976c7e0d5b43 13db3cc1e8d2fd4b8e7c74d91002274d7b62801b d7a36d8964c927863faef5d3b42da08f37e5896c (and technically 79673d300915f846726c27b9e1974dc451013ee9 but it's made empty by previous reverts). The current plan is to land this PR as a temporary change, so that we can get a better handle on the regressions introduced by it. Trying to fix/examine them in master is difficult, and we want to be better able to evaluate them without impact to other PRs being landed in the mean time. That said, it is currently *my* belief that gimli, in one form or another, will need to land sometime soon. I think it's quite likely that it may slip a week or two, but I would personally push for re-landing it then "regardless" of the regressions. We should try to focus efforts on understanding and removing as much of the performance impact as possible, as everyone pretty much agrees that it should be quite minimal (and entirely in the linker, basically). r? @nnethercote
2020-07-22Rollup merge of #74643 - petrochenkov:noenvrerun, r=Mark-SimulacrumManish Goregaokar-1/+0
build: Remove unnecessary `cargo:rerun-if-env-changed` annotations ... and a couple of related cleanups. rustc and cargo now track the majority of env var dependencies automatically (https://github.com/rust-lang/cargo/pull/8421), so the annotations are no longer necessary.
2020-07-22Rollup merge of #74237 - lzutao:compiletest, r=Mark-SimulacrumManish Goregaokar-245/+200
compiletest: Rewrite extract_*_version functions This makes extract_lldb_version has the same version type like extract_gdb_version.
2020-07-22build: Remove unnecessary `build = "build.rs"` annotationsVadim Petrochenkov-1/+0