about summary refs log tree commit diff
path: root/src/test/ui/mir
AgeCommit message (Collapse)AuthorLines
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-2/+2
propagation
2020-06-24lints: add `improper_ctypes_definitions`David Wood-0/+3
This commit adds a new lint - `improper_ctypes_definitions` - which functions identically to `improper_ctypes`, but on `extern "C" fn` definitions (as opposed to `improper_ctypes`'s `extern "C" {}` declarations). Signed-off-by: David Wood <david@davidtw.co>
2020-06-23The const propagator cannot trace references.Oliver Scherer-8/+2
Thus we avoid propagation of a local the moment we encounter references to it.
2020-05-28Add test for #66930Yuki Okushi-0/+11
2020-05-08Skip tests on emscriptenYuki Okushi-0/+11
2020-05-06Move tests from `test/run-fail` to UIYuki Okushi-0/+247
2020-04-28Added new ui tests to show what errors MIR can now find at compile timeFélix Fischer-0/+46
2020-03-13Add test for issue-60390Yuki Okushi-0/+8
2020-03-06fix various typosMatthias Krüger-1/+1
2020-02-03rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments.Eduard-Mihai Burtescu-0/+11
2020-02-02add raw-addr-of variant to mir_raw_fat_ptrRalf Jung-1/+58
2020-01-09Delay bug to prevent ICE in MIR borrowckYuki Okushi-0/+23
2020-01-05Fix ICE involving calling `Instance.ty` during const evaluationAaron Hill-0/+34
Fixes #67639 `Instance.ty` assumes that we are in a fully monomorphic context (e.g. codegen), and can therefore use an empty `ParamEnv` when performing normalization. Howver, the MIR constant evaluator code ends up calling `Instance.ty` as a result of us attemptign to 'speculatively' const-evaluate generic functions during const propagation. As a result, we may end up with projections involving type parameters (e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize. Normalization expects us to have proper predicates in the `ParamEnv` for such projections, and will ICE if we don't. This commit adds a new method `Instance.ty_env`, which takes a `ParamEnv` for use during normalization. The MIR const-evaluator code is changed to use this method, passing in the proper `ParamEnv` for the context at hand.
2020-01-01Ensure that we process projections during MIR inliningAaron Hill-0/+17
Fixes #67710 Previously, we were not calling `super_place`, which resulted in us failing to update any local references that occur in ProjectionElem::Index. This caused the post-inlining MIR to contain a reference to a local ID from the inlined callee, leading to an ICE due to a type mismatch.
2019-12-14Revert "Remove `#![feature(never_type)]` from tests."Niko Matsakis-0/+1
This reverts commit 8f6197f39f7d468dfc5b2bd41dae4769992a2f83.
2019-12-06const-prop: Restrict scalar pair propagationÖmer Sinan Ağacan-0/+13
We now only propagate a scalar pair if the Rvalue is a tuple with two scalars. This for example avoids propagating a (u8, u8) value when Rvalue has type `((), u8, u8)` (see the regression test). While this is a correct thing to do, implementation is tricky and will be done later. Fixes #66971 Fixes #66339 Fixes #67019
2019-11-21Remove `#![feature(never_type)]` from tests.Mazdak Farrokhzad-1/+0
Also remove `never_type` the feature-gate test.
2019-11-13Revert "Auto merge of #65134 - ↵Robin Kruppe-3/+0
davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, r=rkruppe" This reverts commit 3f0e16473de5ec010f44290a8c3ea1d90e0ad7a2, reversing changes made to 61a551b4939ec1d5596e585351038b8fbd0124ba.
2019-11-11Evaluate borrow and struct expressions in `into`Matthew Jasper-0/+67
This fixes some ordering problems around assignment expressions.
2019-11-05improper_ctypes: `extern "C"` fnsDavid Wood-0/+3
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-2/+2
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-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-2/+2
- 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-2/+2
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-2/+2
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-08-15Group all ui tests and move to abi #62593Kevin Per-22/+0
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+2075