about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-11-15Rollup merge of #78968 - zec:add-llvm-as, r=Mark-SimulacrumDylan DPC-0/+1
Include llvm-as in llvm-tools-preview component Including `llvm-as` adds the ability to include assembly language fragments that can be inlined using LTO while making sure the correct version of LLVM is always used.
2020-11-15Rollup merge of #78966 - tmiasko:inline-never, r=oli-obkDylan DPC-39/+219
Never inline C variadics, cold functions, functions with incompatible attributes ... ... and fix generator inlining. Closes #67863. Closes #78859.
2020-11-15Rollup merge of #78962 - poliorcetics:rustdoc-raw-ident-test, r=jyn514Dylan DPC-0/+22
Add a test for r# identifiers I'm not entirely sure I properly ran the test locally (I think so though), waiting for CI to confirm. :) ```````@rustbot``````` modify labels: T-rustdoc r? ```````@jyn514```````
2020-11-15Rollup merge of #78948 - slanterns:master, r=varkorDylan DPC-0/+7
test: add `()=()=()=...` to weird-exprs.rs Idea from https://github.com/rust-lang/rust/pull/71156#discussion_r410953972 😄 Builds on nightly since https://github.com/rust-lang/rust/pull/78748 has been merged.
2020-11-15Rollup merge of #78856 - mark-i-m:fix-or-pat-ice, r=matthewjasperDylan DPC-0/+65
Explicitly checking for or-pattern before test Fixes https://github.com/rust-lang/rust/issues/72680 cc https://github.com/rust-lang/rust/issues/54883 r? ````@varkor````
2020-11-15Rollup merge of #78848 - DevJPM:ci-llvm-9, r=nikicDylan DPC-9/+7
Bump minimal supported LLVM version to 9 This bumps the minimal tested llvm version to 9. This should enable supporting newer LLVM features (and CPU extensions). This was motived by #78361 having to drop features because of LLVM 8 not supporting certain CPU extensions yet. This was declared relatively uncontroversial on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Min.20Supported.20LLVM.20Upgrade.20Process.3F/near/215957859). Paging ````@eddyb```` because there was a comment in the [dockerfile](https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/x86_64-gnu-llvm-8/Dockerfile#L42) describing a hack (which I don't quite understand) which was also blocked by not having LLVM 9.
2020-11-15Rollup merge of #78590 - DeveloperC286:issue_60302, r=varkorDylan DPC-1/+1
refactor: removing alloc::collections::vec_deque ignore-tidy-filelength This PR removes the need for ignore-tidy-filelength for alloc::collections::vec_deque which is part of the issue https://github.com/rust-lang/rust/issues/60302 It is probably easiest to review this PR by looking at it commit by commit rather than looking at the overall diff.
2020-11-14Auto merge of #79049 - tmiasko:lower-intrinsics, r=jonas-schievinkbors-5/+263
Lower intrinsics calls: forget, size_of, unreachable, wrapping_* This allows constant propagation to evaluate `size_of` and `wrapping_*`, and unreachable propagation to propagate a call to `unreachable`. The lowering is performed as a MIR optimization, rather than during MIR building to preserve the special status of intrinsics with respect to unsafety checks and promotion. Currently enabled by default to determine the performance impact (no significant impact expected). In practice only useful when combined with inlining since intrinsics are rarely used directly (with exception of `unreachable` and `discriminant_value` used by built-in derive macros). Closes #32716.
2020-11-14Auto merge of #78809 - vn-ki:fix-issue-76064, r=oli-obkbors-146/+44
add error_occured field to ConstQualifs, fix #76064 I wasn't sure what `in_return_place` actually did and not sure why it returns `ConstQualifs` while it's sibling functions return `bool`. So I tried to make as minimal changes to the structure as possible. Please point out whether I have to refactor it or not. r? `@oli-obk` cc `@RalfJung`
2020-11-14Style nitWho? Me?!-1/+1
Co-authored-by: matthewjasper <20113453+matthewjasper@users.noreply.github.com>
2020-11-14Lower intrinsics calls: forget, size_of, unreachable, wrapping_*Tomasz MiÄ…sko-5/+263
This allows constant propagation to evaluate `size_of` and `wrapping_*`, and unreachable propagation to propagate a call to `unreachable`. The lowering is performed as a MIR optimization, rather than during MIR building to preserve the special status of intrinsics with respect to unsafety checks and promotion.
2020-11-13Auto merge of #78683 - Nemo157:issue-78673, r=lcnrbors-7/+47
Check predicates from blanket trait impls while testing if they apply fixes #78673
2020-11-13Auto merge of #78888 - richkadel:llvm-coverage-tests, r=tmandrybors-35/+23
Fix and re-enable two coverage tests on MacOS Note, in the coverage-reports test, the comment about MacOS was wrong. The setting is based on config.toml llvm `optimize` setting. There doesn't appear to be any environment variable I can check, and I don't think we should add one. Testing the binary itself is a more reliable way to check anyway. For the coverage-spanview test, I removed the dependency on sed altogether, which is much less ugly than trying to work around the MacOS sed differences. I tested these changes on Linux, Windows, and Mac. r? `@tmandry` FYI `@wesleywiser`
2020-11-13refactor: vec_deque ignore-tidy-filelengthC-1/+1
commit c547d5fabcd756515afa7263ee5304965bb4c497 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 11:22:23 2020 +0000 test: updating ui/hygiene/panic-location.rs expected commit 2af03769c4ffdbbbad75197a1ad0df8c599186be Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 10:43:30 2020 +0000 fix: documentation unresolved link commit c4b0df361ce27d7392d8016229f2e0265af32086 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:58:31 2020 +0000 style: compiling with Rust's style guidelines commit bdd2de5f3c09b49a18e3293f2457fcab25557c96 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:56:31 2020 +0000 refactor: removing ignore-tidy-filelength commit fcc4b3bc41f57244c65ebb8e4efe4cbc9460b5a9 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:51:35 2020 +0000 refactor: moving trait RingSlices to ring_slices.rs commit 2f0cc539c06d8841baf7f675168f68ca7c21e68e Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:46:09 2020 +0000 refactor: moving struct PairSlices to pair_slices.rs commit a55d3ef1dab4c3d85962b3a601ff8d1f7497faf2 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:31:45 2020 +0000 refactor: moving struct Iter to iter.rs commit 76ab33a12442a03726f36f606b4e0fe70f8f246b Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:24:32 2020 +0000 refactor: moving struct IntoIter into into_iter.rs commit abe0d9eea2933881858c3b1bc09df67cedc5ada5 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:19:07 2020 +0000 refactor: moving struct IterMut into iter_mut.rs commit 70ebd6420335e1895e2afa2763a0148897963e24 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 01:49:15 2020 +0000 refactor: moved macros into macros.rs commit b08dd2add994b04ae851aa065800bd8bd6326134 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 01:05:36 2020 +0000 refactor: moving vec_deque.rs to vec_deque/mod.rs
2020-11-13Auto merge of #79011 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo Fixing an important publish bug. 2 commits in 8662ab427a8d6ad8047811cc4d78dbd20dd07699..2af662e22177a839763ac8fb70d245a680b15214 2020-11-12 03:47:53 +0000 to 2020-11-12 19:04:56 +0000 - Fix publishing with optional dependencies. (rust-lang/cargo#8853) - Minor typo in features.md (rust-lang/cargo#8851)
2020-11-13Rollup merge of #78996 - lcnr:cg-promotion, r=RalfJungGuillaume Gomez-0/+11
add explicit test for const param promotion r? `@RalfJung`
2020-11-13Rollup merge of #78985 - lcnr:cg-drop-test, r=nikomatsakisGuillaume Gomez-28/+61
add dropck test for const params r? `@nikomatsakis` or `@varkor`
2020-11-13Rollup merge of #78984 - GuillaumeGomez:rustdoc-check-option, r=jyn514Guillaume Gomez-0/+154
Rustdoc check option The ultimate goal behind this option would be to have `rustdoc --check` being run when you use `cargo check` as a second step. r? `@jyn514`
2020-11-13Rollup merge of #77151 - rust-lang:LeSeulArtichaut-patch-1, r=pnkfelixGuillaume Gomez-0/+16
Add regression test for issue #76042 Originally posted in https://github.com/rust-lang/rust/issues/76042#issuecomment-683272710. r? `@pnkfelix`
2020-11-13Fix wrong XPathAlexis Bourget-4/+6
2020-11-13update clippy test ouputVishnunarayan K I-16/+2
2020-11-13bump version to 1.50.0Pietro Albini-1/+1
2020-11-13Auto merge of #78826 - petrochenkov:mrscopes2, r=eddybbors-1/+1
resolve: Collapse `macro_rules` scope chains on the fly Otherwise they grow too long and you have to endlessly walk through them when resolving macros or imports. Addresses https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/Slow.20Builtin.20Derives/near/215750815
2020-11-12Update cargoEric Huss-0/+0
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-12Ensure that INVALID_CODEBLOCK_ATTRIBUTES lint is emittedGuillaume Gomez-28/+47
2020-11-12./x.py test --blessTomasz MiÄ…sko-36/+184
2020-11-12Never inline C variadic functionsTomasz MiÄ…sko-0/+18
2020-11-12Fix generator inlining by checking for rust-call abi and spread argTomasz MiÄ…sko-0/+16
2020-11-12Never inline when `no_sanitize` attributes differTomasz MiÄ…sko-3/+1
The inliner looks if a sanitizer is enabled before considering `no_sanitize` attribute as possible source of incompatibility. The MIR inlining could happen in a crate with sanitizer disabled, but code generation in a crate with sanitizer enabled, thus the attribute would be incorrectly ignored. To avoid the issue never inline functions with different `no_sanitize` attributes.
2020-11-12Rollup merge of #78987 - lcnr:integer-sizes, r=varkorMara Bos-5/+94
extend min_const_generics param ty tests Apparently we never tested for `u128` and `i128` before this, so I added a test for all types which are allowed. r? ``@varkor``
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-72/+443
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-12Rollup merge of #76730 - ebkalderon:rustdoc-fix-mut-args-async-fn, r=tmandryMara Bos-2/+15
Fix rustdoc rendering of by-value mutable arguments in async fn r? `@jyn514` Fixes #76517.
2020-11-12cg: add explicit test for const param promotionBastian Kauschke-0/+11
2020-11-12Handle and test wildcard argumentsJoshua Nelson-2/+7
2020-11-12Don't reuse bindings for `ref mut`Joshua Nelson-0/+8
Reusing bindings causes errors later in lowering: ``` error[E0596]: cannot borrow `vec` as mutable, as it is not declared as mutable --> /checkout/src/test/ui/async-await/argument-patterns.rs:12:20 | LL | async fn b(n: u32, ref mut vec: A) { | ^^^^^^^^^^^ | | | cannot borrow as mutable | help: consider changing this to be mutable: `mut vec` ```
2020-11-12update MiriRalf Jung-6/+6
2020-11-12check mir exists before validation; fix testsVishnunarayan K I-90/+18
2020-11-12fix tests and formattingVishnunarayan K I-40/+8
2020-11-12add error_occured field to ConstQualifs, fix #76064Vishnunarayan K I-0/+16
2020-11-12extend min_const_generics param ty testsBastian Kauschke-5/+94
2020-11-12Auto merge of #76256 - tgnottingham:issue-74890, r=nikomatsakisbors-0/+48
incr-comp: hash and serialize span end line/column Hash both the length and the end location (line/column) of a span. If we hash only the length, for example, then two otherwise equal spans with different end locations will have the same hash. This can cause a problem during incremental compilation wherein a previous result for a query that depends on the end location of a span will be incorrectly reused when the end location of the span it depends on has changed. A similar analysis applies if some query depends specifically on the length of the span, but we only hash the end location. So hash both. Fix #46744, fix #59954, fix #63161, fix #73640, fix #73967, fix #74890, fix #75900 --- See #74890 for a more in-depth analysis. I haven't thought about what other problems this root cause could be responsible for. Please let me know if anything springs to mind. I believe the issue has existed since the inception of incremental compilation.
2020-11-12check `Drop` specialization of const paramsBastian Kauschke-28/+61
2020-11-12move dropck tests from ui -> ui/dropckBastian Kauschke-0/+0
2020-11-12Add tests for rustdoc --check optionGuillaume Gomez-0/+124
2020-11-12Add --check option to rustdocGuillaume Gomez-0/+11
2020-11-12fully exploited the dropped support of LLVM 8DevJPM-3/+0
This commit grepped for LLVM_VERSION_GE, LLVM_VERSION_LT, get_major_version and min-llvm-version and statically evaluated every expression possible (and sensible) assuming that the LLVM version is >=9 now
2020-11-12Bump the minimal supported LLVM version in the bootstrapping code to 9.0DevJPM-2/+2