about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-10-14Auto merge of #77741 - JohnTitor:add-tests, r=matthewjasperbors-1/+226
Add some regression tests They're fixed since nightly-2020-10-07: Closes #52843 Closes #53448 Closes #54108 Closes #65581 Closes #65934 Closes #70292 Closes #71443
2020-10-14Auto merge of #77926 - Dylan-DPC:rollup-wttr8a1, r=Dylan-DPCbors-3637/+3697
Rollup of 8 pull requests Successful merges: - #77765 (Add LLVM flags to limit DWARF version to 2 on BSD) - #77788 (BTreeMap: fix gdb provider on BTreeMap with ZST keys or values) - #77795 (Codegen backend interface refactor) - #77808 (Moved the main `impl` for FnCtxt to its own file.) - #77817 (Switch rustdoc from `clean::Stability` to `rustc_attr::Stability`) - #77829 (bootstrap: only use compiler-builtins-c if they exist) - #77870 (Use intra-doc links for links to module-level docs) - #77897 (Move `Strip` into a separate rustdoc pass) Failed merges: - #77879 (Provide better documentation and help messages for x.py setup) - #77902 (Include aarch64-pc-windows-msvc in the dist manifests) r? `@ghost`
2020-10-14Rollup merge of #77897 - GuillaumeGomez:cleanup-passes-mod, r=jyn514Dylan DPC-170/+176
Move `Strip` into a separate rustdoc pass Just something which was bothering me lately. :) r? @jyn514
2020-10-14Rollup merge of #77870 - camelid:intra-doc-super, r=jyn514Dylan DPC-20/+20
Use intra-doc links for links to module-level docs r? @jyn514
2020-10-14Rollup merge of #77829 - gburgessiv:unused-features-var, r=alexcrichtonDylan DPC-5/+5
bootstrap: only use compiler-builtins-c if they exist The assignment of `features` above was added in rust-lang#60981, but never used. Presumably the intent was to replace the string literal here with it. While I'm in the area, `compiler_builtins_c_feature` doesn't need to be a `String`. I'm not entirely sure of a great way to locally test this -- `./x.py test` passed on my machine, but 🤷‍♂️. r? @alexcrichton
2020-10-14Rollup merge of #77817 - jyn514:const-since, r=petrochenkovDylan DPC-82/+62
Switch rustdoc from `clean::Stability` to `rustc_attr::Stability` This gives greater type safety and is less work to maintain on the rustdoc end. It also makes rustdoc more consistent with rustc. Noticed this while working on https://github.com/rust-lang/rust/issues/76998. - Remove `clean::Stability` in favor of `rustc_attr::Stability` - Remove `impl Clean for Stability`; it's no longer necessary r? @GuillaumeGomez cc @petrochenkov
2020-10-14Rollup merge of #77808 - Nicholas-Baron:fn_ctxt_impl, r=matthewjasperDylan DPC-3201/+3272
Moved the main `impl` for FnCtxt to its own file. Resolves #77085 without breaking the API of the `FnCtxt` struct. This is a solution to the file length being over 3000 (see issue #60302). The other solution to the file length is 1. to change the API of this struct by 2. encapulating certain fields of the struct into other structs.
2020-10-14Rollup merge of #77795 - bjorn3:codegen_backend_interface_refactor, r=oli-obkDylan DPC-119/+96
Codegen backend interface refactor This moves several things away from the codegen backend to rustc_interface. There are a few behavioral changes where previously the incremental cache (incorrectly) wouldn't get finalized, but now it does. See the individual commit messages.
2020-10-14Rollup merge of #77788 - ssomers:btree_cleanup_gdb, r=Mark-SimulacrumDylan DPC-36/+43
BTreeMap: fix gdb provider on BTreeMap with ZST keys or values Avoid error when gdb is asked to inspect a BTreeMap or BTreeSet with a zero-sized type as key or value. And clean up. r? @Mark-Simulacrum
2020-10-14Rollup merge of #77765 - amshafer:master, r=petrochenkovDylan DPC-4/+23
Add LLVM flags to limit DWARF version to 2 on BSD This has been a thorn in my side for a while, I can finally generate flamegraphs of rust programs on bsd again. This fixes dtrace profiling on freebsd, I think it might help with lldb as well but I can't test that because my current rust-lldb setup is messed up. I'm limiting the dwarf version to 2 on all bsd's (netbsd/openbsd/freebsd) since it looks like this applies to all of them, but I have only tested on freebsd. Let me know if there's anything I can improve! --- Currently on FreeBSD dtrace profiling does not work and shows jumbled/incorrect symbols in the backtraces. FreeBSD does not support the latest versions of DWARF in dtrace (and lldb?) yet, and needs to be limited to DWARF2 in the same way as macos. This adds an is_like_bsd flag since it was missing. NetBSD/OpenBSD/FreeBSD all match this. This effectively copies #11864 but targets FreeBSD instead of macos.
2020-10-14Auto merge of #77135 - Aaron1011:pretty-ignore-paren, r=petrochenkovbors-197/+633
Refactor AST pretty-printing to allow skipping insertion of extra parens Fixes #75734 Makes progress towards #43081 Unblocks PR #76130 When pretty-printing an AST node, we may insert additional parenthesis to ensure that precedence is properly preserved in code we output. However, the proc macro implementation relies on comparing a pretty-printed AST node to the captured `TokenStream`. Inserting extra parenthesis changes the structure of the reparsed `TokenStream`, making the comparison fail. This PR refactors the AST pretty-printing code to allow skipping the insertion of additional parenthesis. Several freestanding methods are moved to trait methods on `PrintState`, which keep track of an internal `insert_extra_parens` flag. This flag is normally `true`, but we expose a public method which allows pretty-printing a nonterminal with `insert_extra_parens = false`. To avoid changing the public interface of `rustc_ast_pretty`, the freestanding `_to_string` methods are changed to delegate to a newly-crated `State`. The main pretty-printing code is moved to a new `state` module to ensure that it does not accidentally call any of these public helper functions (instead, the internal functions with the same name should be used).
2020-10-13Auto merge of #77917 - JohnTitor:rollup-e47h2qt, r=JohnTitorbors-359/+426
Rollup of 14 pull requests Successful merges: - #77239 (Enable building Cargo for aarch64-apple-darwin) - #77569 (BTreeMap: type-specific variants of node_as_mut and cast_unchecked) - #77719 (Remove unnecessary rustc_const_stable attributes.) - #77722 (Remove unsafety from sys/unsupported and add deny(unsafe_op_in_unsafe_fn).) - #77725 (Add regression issue template) - #77776 ( Give an error when running `x.py test --stage 0 src/test/ui`) - #77786 (Mention rustdoc in `x.py setup`) - #77825 (`min_const_generics` diagnostics improvements) - #77868 (Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component) - #77884 (Use Option::unwrap_or instead of open-coding it) - #77886 (Replace trivial bool matches with the `matches!` macro) - #77892 (Replace absolute paths with relative ones) - #77895 (Include aarch64-apple-darwin in the dist manifests) - #77909 (bootstrap: set correct path for the build-manifest binary) Failed merges: - #77902 (Include aarch64-pc-windows-msvc in the dist manifests) r? `@ghost`
2020-10-14Rollup merge of #77909 - pietroalbini:fix-build-manifest-path, r=Mark-SimulacrumYuki Okushi-1/+1
bootstrap: set correct path for the build-manifest binary This changes the path of the binary inside the tarball to be: ``` build-manifest-{release}-{target}/build-manifest/bin/build-manifest ``` ...instead of: ``` build-manifest-{release}-{target}/build-manifest/bin/build-manifest/build-manifest ``` r? @Mark-Simulacrum
2020-10-14Rollup merge of #77895 - shepmaster:silicon-manifest, r=pietroalbiniYuki Okushi-0/+2
Include aarch64-apple-darwin in the dist manifests r? @ehuss /cc @pietroalbini @Mark-Simulacrum
2020-10-14Rollup merge of #77892 - est31:remove_redundant_absolute_paths, r=lcnrYuki Okushi-76/+73
Replace absolute paths with relative ones Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-10-14Rollup merge of #77886 - LingMan:ast_pretty_bool_matches, r=petrochenkovYuki Okushi-8/+2
Replace trivial bool matches with the `matches!` macro This derives `PartialEq` on one enum (and two structs it contains) to enable the `==` operator for it. If there's some downside to this, I could respin with the `matches!` macro instead.
2020-10-14Rollup merge of #77884 - LingMan:ast_pretty_unwrap_or, r=varkorYuki Okushi-6/+3
Use Option::unwrap_or instead of open-coding it
2020-10-14Rollup merge of #77868 - Aaron1011:llvm-tools-opt-llc, r=Mark-SimulacrumYuki Okushi-0/+3
Include `llvm-dis`, `llc` and `opt` in `llvm-tools-preview` component Fixes #55890 It's useful to have `llc` and `opt` available when debugging an LLVM miscompilation,.
2020-10-14Rollup merge of #77825 - ethanboxx:min_const_generics_diagnostic, r=lcnrYuki Okushi-192/+185
`min_const_generics` diagnostics improvements As disscussed in [zulip/project-const-generics/non-trivial anonymous constant](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/non-trivial.20anonymous.20constants). This is my first PR on the compiler. @lcnr is mentoring me on this PR. Related to #60551.
2020-10-14Rollup merge of #77786 - jyn514:rustdoc, r=Mark-SimulacrumYuki Okushi-2/+2
Mention rustdoc in `x.py setup` This lets new contributors know which option they should pick; previously it wasn't clear 'compiler' also included rustdoc. Unresolved questions: should this say 'compiler and tools' instead? I don't know of any tools that are modified in-tree other than rustdoc, though. r? @Mark-Simulacrum
2020-10-14Rollup merge of #77776 - jyn514:wrong-way, r=Mark-SimulacrumYuki Okushi-0/+9
Give an error when running `x.py test --stage 0 src/test/ui` The error can be overridden with `COMPILETEST_FORCE_STAGE0=1`. In practice I don't know why anyone would do this. r? @Mark-Simulacrum Closes https://github.com/rust-lang/rust/issues/77711
2020-10-14Rollup merge of #77725 - camelid:regression-template, r=Mark-SimulacrumYuki Okushi-0/+68
Add regression issue template Feel free to suggest improvements!
2020-10-14Rollup merge of #77722 - fusion-engineering-forks:safe-unsupported-locks, ↵Yuki Okushi-37/+34
r=Mark-Simulacrum Remove unsafety from sys/unsupported and add deny(unsafe_op_in_unsafe_fn). Replacing `UnsafeCell`s by a `Cell`s simplifies things and makes the mutex and rwlock implementations safe. Other than that, only unsafety in strlen() contained unsafe code. @rustbot modify labels: +F-unsafe-block-in-unsafe-fn +C-cleanup
2020-10-14Rollup merge of #77719 - ↵Yuki Okushi-2/+0
fusion-engineering-forks:const-new-mutex-attr-cleanup, r=Mark-Simulacrum Remove unnecessary rustc_const_stable attributes. These attributes were added in https://github.com/rust-lang/rust/pull/74033#discussion_r450593156 because of [std::io::lazy::Lazy::new](https://github.com/rust-lang/rust/blob/0c03aee8b81185d65b5821518661c30ecdb42de5/src/libstd/io/lazy.rs#L21-L23). But [std::io::lazy::Lazy is gone now](https://github.com/rust-lang/rust/pull/77154), so this can be cleaned up. @rustbot modify labels: +T-libs +C-cleanup
2020-10-14Rollup merge of #77569 - ssomers:btree_cleanup_1, r=Mark-SimulacrumYuki Okushi-24/+28
BTreeMap: type-specific variants of node_as_mut and cast_unchecked Improves debug checking and shortens some expressions. Extracted from #77408
2020-10-14Rollup merge of #77239 - shepmaster:silicon-ci-plus, r=pietroalbiniYuki Okushi-11/+16
Enable building Cargo for aarch64-apple-darwin r? @ghost
2020-10-13Auto merge of #75213 - dingxiangfei2009:yield-point-in-match-guard, r=tmandrybors-12/+122
[generator] Special cases for match guard when analyzing interior types in generators Fix #72651 This proposes one of ways to fix the mentioned issue. One cause of #72651 is that the interior type analysis misses out types of match pattern locals. Those locals are manifested as temporary borrows in the scopes of match arm guards. If uses of these locals appear after yield points, the borrows from them were not considered live across the yield points. However, this is not the case since the borrowing always happens at the very beginning of the match guard. This calls for special treatment to analysis of types appearing in the match guard. Those borrows are recorded as the HIR tree is walked by `InteriorVisitor` and their uses are recorded whenever a yield point is crossed.
2020-10-13Add a target option for selecting a DWARF versionAustin Shafer-4/+23
Certain platforms need to limit the DWARF version emitted (oxs, *bsd). This change adds a dwarf_version entry to the options that allows a platform to specify the dwarf version to use. By default this option is none and the default DWARF version is selected. Also adds an option for printing Option<u32> json keys
2020-10-13Replace trivial bool matches with the `matches!` macroLingMan-8/+2
2020-10-13bootstrap: set correct path for the build-manifest binaryPietro Albini-1/+1
2020-10-13Add regression issue templateCamelid-0/+68
2020-10-13Deny unsafe_op_in_unsafe_fn for unsupported/common.rs through sys/wasm too.Mara Bos-0/+2
2020-10-14explanatory comments and fix guard binding stackDing Xiang Fei-7/+8
2020-10-14dedicated visitor for arm patternsDing Xiang Fei-18/+41
2020-10-14switch the test to an actual MCVEDing Xiang Fei-14/+9
2020-10-14rustfmtDing Xiang Fei-6/+11
2020-10-14test derived from #74961Ding Xiang Fei-0/+29
2020-10-14also record the types of borrows from the pattern locals in match guardsDing Xiang Fei-9/+61
so that it reflects the fact that borrowing these pattern locals is happening before any yield points in match guards
2020-10-14documentation fixDing Xiang Fei-5/+10
2020-10-13aarch64-apple-darwin now includes CargoJake Goulding-1/+1
2020-10-13 Give an error when running `x.py test --stage 0 src/test/ui`Joshua Nelson-0/+9
2020-10-13Auto merge of #75406 - mati865:mingw-aslr, r=Mark-Simulacrumbors-2/+12
Enable ASLR for windows-gnu Fixes https://github.com/rust-lang/rust/issues/16514 Fixes https://github.com/rust-lang/rust/issues/16593 Fixes https://github.com/rust-lang/rust/issues/17684 Passes the tests for me with x86_64 toolchain.
2020-10-13Add note about using cells in the locks on the 'unsupported' platform.Mara Bos-0/+2
2020-10-13Replace absolute paths with relative onesest31-76/+73
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-10-13Auto merge of #77762 - pietroalbini:dist-build-manifest, r=Mark-Simulacrumbors-56/+127
Dist build manifest This PR makes two changes that should remove a significant chunk of the time spent in our release process: cloning the `rust-lang/rust` monorepo, all its submodules, and building `bootstrap` to then invoke `build-manifest`: * `build-manifest` doesn't rely on a clone of the monorepo being present anymore. The only remaining bit of information it fetched from it (the Rust version) is instead bundled in the binary. * A new "component" is added, `build-manifest`. That component includes a prebuilt version of the tool, and it's *not* included in the Rustup manifest. This will allow `promote-release` to directly invoke the tool without interacting with our build system. * The Linux x86_64 CI is changed to also build the component mentioned above. It's the only CI builder tasked to do so, and to cleanly support this a new `--include-default-paths` flag was added to `./x.py`. * The `BUILD_MANIFEST_NUM_THREADS` environment variable is added to configure the number of threads at runtime. This PR is best reviewed commit-by-commit. r? `@Mark-Simulacrum`
2020-10-13Clean up rustdoc passesGuillaume Gomez-170/+176
2020-10-13Include aarch64-apple-darwin in the dist manifestsJake Goulding-0/+2
2020-10-13Auto merge of #77755 - bugadani:perf-calc-dtor, r=ecstatic-morsebors-4/+4
Monomorphize `calculate_dtor` instead of using function pointers Change `calculate_dtor` to avoid dynamic dispatching. This change allows the empty functions to be optimized away. Based on the discussion in https://github.com/rust-lang/rust/pull/77754#discussion_r502498970, the performance impact of this change was measured. Perf run results: https://perf.rust-lang.org/compare.html?start=7bc5839e99411aad9061a632b62075d1346cbb3b&end=ffec759ae9bbc4d6d2235ff40ade6723a85bc7cc
2020-10-13Auto merge of #77759 - tblah:fix_riscv_qemu, r=pietroalbinibors-3/+3
ci: Fix riscv64gc linux test QEMU fault, plus doc link fix Newer versions of the `qemu` package (used for riscv64gc-unknown-linux-gnu testing) don't work with the version of the RISC-V bootloader we were using. https://github.com/rust-lang/rust/commit/a4a0342cf59a1bff43ed79586065eb97dba0cddb bumps to a revision which should fix the problem. https://github.com/rust-lang/rust/commit/e0b033e965a7d422da70a409a028af7c8b64e709 fixes a documentation failure I encountered while running the tests.
2020-10-13Auto merge of #77639 - jagill:stabilize-slice_partition_at_index, r=Amanieubors-31/+69
Stabilize slice_partition_at_index This stabilizes slice_partition_at_index, including renaming `partition_at_index*` -> `select_nth_unstable*`. Closes #55300 r? `@Amanieu`