about summary refs log tree commit diff
path: root/src/test/incremental
AgeCommit message (Collapse)AuthorLines
2020-03-17Update tests for erasing regions in typeckMatthew Jasper-4/+4
2020-03-14Add test for #69596John Kåre Alsaker-0/+21
2020-03-14Update ich_nested_items.rsJohn Kåre Alsaker-8/+11
2020-03-14Format function_interfaces.rsJohn Kåre Alsaker-46/+40
2020-03-14Replace `Hir` with `hir_owner` in testsJohn Kåre Alsaker-472/+472
2020-03-14Replace `HirBody` with `hir_owner_items` in testsJohn Kåre Alsaker-352/+352
2020-03-06fix various typosMatthias Krüger-3/+3
2020-02-28Auto merge of #68505 - skinny121:canonicalize-const-eval-inputs, r=nikomatsakisbors-0/+23
Canonicalize inputs to const eval where needed Canonicalize inputs to const eval, so that they can contain inference variables. Which enables invoking const eval queries even if the current param env has inference variable within it, which can occur during trait selection. This is a reattempt of #67717, in a far less invasive way. Fixes #68477 r? @nikomatsakis cc @eddyb
2020-02-20Revert "Rollup merge of #69280 - ↵Dylan MacKenzie-2/+1
ecstatic-morse:promote-shuffle-no-special-case, r=petrochenkov" This reverts commit 61d3b6dedb1ec1f3e3cbd3d66b1a3453225bc37c, reversing changes made to c6ad1e2c2a0c7e48537617d36085f866fa6a65a3.
2020-02-20Rollup merge of #69185 - RalfJung:const-prop-lints, r=oli-obkMazdak Farrokhzad-2/+2
Unify and improve const-prop lints Add a single helper method for all lints emitted by const-prop, and make that lint different from the CTFE `const_err` lint. Also consistently check overflow on *arithmetic*, not on the assertion, to make behavior the same for debug and release builds. See [this summary comment](https://github.com/rust-lang/rust/pull/69185#issuecomment-587924754) for details and the latest status. In terms of lint formatting, I went for what seems to be the better style: have a general message above the code, and then a specific message at the span: ``` error: this arithmetic operation will overflow --> $DIR/const-err2.rs:21:18 | LL | let a_i128 = -std::i128::MIN; | ^^^^^^^^^^^^^^^ attempt to negate with overflow ``` We could also just have the specific message above and no text at the span if that is preferred. I also converted some of the existing tests to use compiletest revisions, so that the same test can check a bunch of different compile flags. Fixes https://github.com/rust-lang/rust/issues/69020. Helps with https://github.com/rust-lang/rust/issues/69021: debug/release are now consistent, but the assoc-const test in that issue still fails (there is a FIXME in the PR for this). The reason seems to be that const-prop notices the assoc const in `T::N << 42` and does not even bother calling `const_prop` on that operation. Has no effect on https://github.com/rust-lang/rust/issues/61821; the duplication there has entirely different reasons.
2020-02-20Add regression test for issue 68477.Ben Lewis-0/+23
2020-02-18Add `#[rustc_args_required_const]` to `simd_shuffle` testsDylan MacKenzie-1/+2
2020-02-18better lint namesRalf Jung-1/+1
2020-02-15fix incremental testsRalf Jung-2/+2
2020-02-06Move the `krate` method to Hir and remove the Krate dep nodeJohn Kåre Alsaker-19/+13
2020-01-27Collisions in the dep-graph due to path-reuse are rare but can occur.Felix S. Klock II-0/+13
So, instead of ICE'ing, just fail to mark green in such cases (for `DepKind::{Hir, HirBody, CrateMetadata}`). Fix #62649.
2020-01-01Add a test for #37333Michal Terepeta-0/+51
The test checks that we reuse the CGU of a crate when the implementation details of an `extern crate` have changed. Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
2019-12-20General purpose teest cases contributed by mw.Felix S. Klock II-0/+136
2019-12-06Make try_mark_previous_green aware of cycles.Alex Aktsipetrov-0/+15
2019-11-27rustc: move debug info from LocalDecl and UpvarDecl into a dedicated ↵Eduard-Mihai Burtescu-8/+8
VarDebugInfo.
2019-11-21Fix broken incremental testDylan MacKenzie-2/+1
This test does not actually emit any warnings, since `#![allow(warnings)]` was specified. `compiletest` was erroneously ignoring `//~` tests and looking only for `//[X]~` ones. As a result of the changes in the previous commit, we now look for `//~` comments in incremental tests and expect them to appear in *all* revisions.
2019-11-20Rollup merge of #66060 - traxys:test_65401, r=michaelwoeristerMazdak Farrokhzad-0/+8
Making ICEs and test them in incremental This adds: - A way to make the compiler ICE - A way to check for ICE in `cfail` tests with `should-ice` - A regression test for issue #65401 I am not sure the attribute added `should-ice` is the best for this job
2019-11-11[mir-opt] Turn on the `ConstProp` pass by defaultWesley Wiser-7/+7
perf.rlo shows that running the `ConstProp` pass results in across-the-board wins regardless of debug or opt complilation mode. As a result, we're turning it on to get the compile time benefits. `ConstProp` doesn't currently intern the memory used by its `Machine` so we can't yet propagate allocations which is why `ConstProp::should_const_prop()` checks if the value being propagated is a scalar or not.
2019-11-10Rollup merge of #66216 - wesleywiser:const_prop_codegen_improvements, r=oli-obkYuki Okushi-2/+2
[mir-opt] Handle return place in ConstProp and improve SimplifyLocals pass Temporarily rebased on top of #66074. The top 2 commits are new. r? @oli-obk
2019-11-08[mir-opt] Handle aggregates in SimplifyLocals passWesley Wiser-2/+2
2019-11-06gate rustc_on_unimplemented under rustc_attrsMazdak Farrokhzad-1/+1
2019-11-05was not the same replace as othersQuentin Boyer-1/+1
2019-11-05rewrote error messages for #[rustc_error]Quentin Boyer-1/+1
2019-11-03added test for checking that ICEs are not hiddenQuentin Boyer-0/+8
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-1/+1
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-21Rollup merge of #65652 - skinny121:const_infer_leak, r=eddybYuki Okushi-0/+67
Fix `canonicalize_const_var` leaking inference variables Fixes #61338 Fixes #61516 Fixes #62536 Fixes #64087 Fixes #64863 Fixes #65623 I added regression tests for all these issues apart from #64863, which is very similar to #61338. r? @varkor
2019-10-21Fix `canonicalize_const_var` from leaking inference variables throughben-0/+67
it's type.
2019-10-20Improve SimplifyLocals pass so it can remove unused constsWesley Wiser-8/+8
The `ConstProp` can cause many locals to be initialized to a constant value and then never read from. `ConstProp` can also evaluate ZSTs into constant values. Previously, many of these would be removed by other parts of the MIR optimization pipeline. However, evaluating ZSTs (especially `()`) into constant values defeated those parts of the optimizer and so in a2e3ed5c054b544df6ceeb9e612d39af819f4aae, I added a hack to `ConstProp` that skips evaluating ZSTs to avoid that regression. This commit changes `SimplifyLocals` so that it doesn't consider writes of const values to a local to be a use of that local. In doing so, `SimplifyLocals` is able to remove otherwise unused locals left behind by other optimization passes (`ConstProp` in particular).
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-0/+6
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-6/+0
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Fix ABI, run and fix more tests, re-enable CI for PRsThomas Lively-0/+6
2019-09-14Ban non-extern rust intrinsicsMark Rousskov-15/+2
Intrinsics can only be defined by the compiler.
2019-08-26Auto merge of #63580 - wesleywiser:move_promoted_out, r=oli-obkbors-4/+10
Move promoted MIR out of `mir::Body` r? @oli-obk
2019-08-25Revert "Allow a dirty MirBuilt for make_extern and make_method_extern"Josh Stone-2/+2
This reverts commit b4a6f597934f16f89e27058a32a514c9572f148f.
2019-08-23Fix incremental testsWesley Wiser-4/+10
2019-08-22Changed testsWesley Wiser-1/+1
2019-08-19Cherry-pick src/test changes with Centril's changessd234678-157/+156
2019-07-20normalize use of backticks in compiler messages for librustc_incrementalSamy Kacimi-4/+4
https://github.com/rust-lang/rust/issues/60532
2019-07-06while_{let_}loops/change_{break,continue}: typeck_tables_of clean.Mazdak Farrokhzad-4/+4
2019-07-06Adjust incremental test while_loops.rsMazdak Farrokhzad-2/+2
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-48/+48
2019-06-23Auto merge of #61778 - petrochenkov:pass, r=Mark-Simulacrumbors-4/+4
compiletest: Introduce `// {check,build,run}-pass` pass modes Pass UI tests now have three modes ``` // check-pass // build-pass // run-pass ``` mirroring equivalent well-known `cargo` commands. `// check-pass` will compile the test skipping codegen (which is expensive and isn't supposed to fail in most cases). `// build-pass` will compile and link the test without running it. `// run-pass` will compile, link and run the test. Tests without a "pass" annotation are still considered "fail" tests. Most UI tests would probably want to switch to `check-pass`. Tests validating codegen would probably want to run the generated code as well and use `run-pass`. `build-pass` should probably be rare (linking tests?). https://github.com/rust-lang/rust/pull/61755 will provide a way to run the tests with any mode, e.g. bump `check-pass` tests to `run-pass` to satisfy especially suspicious people, and be able to make sure that codegen doesn't breaks in some entirely unexpected way. Tests marked with any mode are expected to pass with any other mode, if that's not the case for some legitimate reason, then the test should be made a "fail" test rather than a "pass" test. Perhaps some secondary CI can verify this invariant, but that's not super urgent. `// compile-pass` still works and is equivalent to `build-pass`. Why is `// compile-pass` bad - 1) it gives an impression that the test is only compiled, but not linked, 2) it doesn't mirror a cargo command. It can be removed some time in the future in a separate PR. cc https://github.com/rust-lang/rust/issues/61712
2019-06-19Rename regression test to link it to the corresponding issueOliver Scherer-0/+0
2019-06-19Remove the `AllocId` from `ByRef` valuesOliver Scherer-0/+17
`ByRef` const values have no identity beyond their value, we should not treat them as having identity. The `AllocId` often differed between equal constants, because of the way that the miri-engine evaluates constants.
2019-06-16compiletest: Remove `skip-codegen`Vadim Petrochenkov-1/+1