about summary refs log tree commit diff
path: root/src/test/ui/mir
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-4076/+0
2023-01-09Add test for issue 106062Albert Larsan-0/+42
2022-12-19add non-regression test for issue 105809Rémy Rakic-0/+36
2022-12-19Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"Rémy Rakic-76/+0
This reverts commit 03770f0e2b60c02db8fcf52fed5fb36aac70cedc, reversing changes made to 01ef4b21dc5251b58bd9c6fd6face2ae95d56da1.
2022-12-16Auto merge of #103880 - b-naber:field-ty-mir, r=lcnrbors-0/+76
Use non-ascribed type as field's type in mir Fixes https://github.com/rust-lang/rust/issues/96514 r? `@lcnr`
2022-12-11Move testsCaio-0/+190
2022-12-08add regression test for #105009lcnr-0/+52
2022-11-23add invariance testb-naber-0/+24
2022-11-23add more testsb-naber-0/+31
2022-11-23add testsb-naber-0/+21
2022-11-19Use `type_ascribe!` in many UI testsNilstrieb-1/+1
Use it in all UI tests that are about the semantics and not the syntax of type ascription.
2022-11-15nll: correctly deal with bivariancelcnr-0/+26
2022-10-16Don't consider `Let` exprs terminating scopesNathan Whitaker-4/+4
2022-10-13Add test for issue 102389Gary Guo-0/+17
2022-10-05Auto merge of #102394 - dingxiangfei2009:issue-102317, r=oli-obkbors-0/+24
Fix unwind drop glue for if-then scopes cc `@est31` Fix #102317 Fix #99852 This PR fixes the drop glue for unwinding from a panic originated in a drop while breaking out for the else block in an `if-then` scope. MIR validation does not fail for the synchronous versions of the test program, because `StorageDead` statements are skipped over in the unwinding process. It is only becoming a problem when it is inside a generator where `StorageDead` must be kept around.
2022-10-01bless ui testsMaybe Waffle-1/+1
2022-09-28fix unwind drop glue for if-then scopesDing Xiang Fei-0/+24
2022-09-26Auto merge of #102184 - chenyukang:fix-102087-add-binding-sugg, r=nagisabors-0/+5
Suggest Default::default() when binding isn't initialized Fixes #102087
2022-09-26fix #102087, Suggest Default::default() when binding isn't initializedyukang-0/+5
2022-09-25Rollup merge of #102194 - fee1-dead-contrib:improve-const-drop, r=oli-obkfee1-dead-12/+12
Note the type when unable to drop values in compile time
2022-09-24Note the type when unable to drop values in compile timeDeadbeef-12/+12
2022-09-23Restore ignore tagFlorian Bartels-5/+0
This test case actually requires std::process.
2022-09-16Rollup merge of #101741 - andrewpollack:add-needs-unwind-ui-tests, r=tmandryMichael Howell-0/+1
Adding needs-unwind arg to applicable compiler ui tests Adding `needs-unwind` arg to applicable compiler ui tests
2022-09-16Adding needs-unwind arg to applicable compiler ui testsAndrew Pollack-0/+1
2022-09-16Add test for #101844Jack Huey-0/+73
2022-09-02Rollup merge of #100121 - Nilstrieb:mir-validator-param-env, r=oli-obkMatthias Krüger-0/+25
Try normalizing types without RevealAll in ParamEnv in MIR validation Before, the MIR validator used RevealAll in its ParamEnv for type checking. This could cause false negatives in some cases due to RevealAll ParamEnvs not always use all predicates as expected here. Since some MIR passes like inlining use RevealAll as well, keep using it in the MIR validator too, but when it fails usign RevealAll, also try the check without it, to stop false negatives. Fixes #99866 cc ````````@compiler-errors```````` who nicely helped me on zulip
2022-08-29Revert let_chains stabilizationNilstrieb-1/+13
This reverts commit 326646074940222d602f3683d0559088690830f4. This is the revert against master, the beta revert was already done in #100538.
2022-08-29Try normalizing types without RevealAll in ParamEnv in mir validationNilstrieb-0/+25
Before, the MIR validator used RevealAll in its ParamEnv for type checking. This could cause false negatives in some cases due to RevealAll ParamEnvs not always use all predicates as expected here. Since some MIR passes like inlining use RevealAll as well, keep using it in the MIR validator too, but when it fails usign RevealAll, also try the check without it, to stop false negatives.
2022-08-21Add test.Camille GILLOT-0/+30
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-5/+6
2022-07-16Stabilize `let_chains`Caio-13/+1
2022-07-07Tweak wording and spansEsteban Küber-2/+2
2022-07-07On partial uninit error point at where we need initEsteban Küber-3/+6
When a binding is declared without a value, borrowck verifies that all codepaths have *one* assignment to them to initialize them fully. If there are any cases where a condition can be met that leaves the binding uninitialized or we attempt to initialize a field of an unitialized binding, we emit E0381. We now look at all the statements that initialize the binding, and use them to explore branching code paths that *don't* and point at them. If we find *no* potential places where an assignment to the binding might be missing, we display the spans of all the existing initializers to provide some context.
2022-07-06fix projectionelem validationDrMeepster-2/+2
2022-06-28Migrate some rustc_borrowck diagnostics to SessionDiagnosticMichael Goulet-3/+3
2022-06-25[rustc_parse] Forbid lets in certain placesCaio-2/+9
2022-06-15remove box derefs from codgenDrMeepster-8/+10
2022-04-16Rollup merge of #96004 - JakobDegen:fix-validator-ice, r=petrochenkovDylan DPC-0/+10
Consider lifetimes when comparing types for equality in MIR validator Closes #95978 .
2022-04-14Update issue-92893.stderrouz-a-0/+27
2022-04-13Consider lifetimes when comparing types for equality in MIR validatorJakob Degen-0/+10
2022-04-04diagnostics: use correct span for const genericsMichael Howell-2/+2
Fixes #95616
2022-03-23add test for treating ExprKind::ConstParam as tempb-naber-0/+42
2022-03-16Extend the irrefutable_let_patterns lint to let chainsest31-0/+1
Only look for complete suffixes or prefixes of irrefutable let patterns, so that an irrefutable let pattern in a chain surrounded by refutable ones is not linted, as it is an useful pattern.
2022-03-13Fix definition of Box in ssa-analysis-regression-50041.rsbjorn3-2/+2
The Box in liballoc always has a field for the allocator. It is quite hard to support both the old and new definition of Box in cg_clif so this change uses the new definition in this test too.
2022-01-18Formally implement let chainsCaio-0/+93
2021-12-22Delay remaining `span_bug`s in drop elaborationTomasz Miąsko-0/+82
This follows changes from #67967 and converts remaining `span_bug`s into delayed bugs, since for const items drop elaboration might be executed on a MIR which failed borrowck.
2021-12-18Rollup merge of #91975 - cjgillot:noinline-generator, r=jackh726Matthias Krüger-1/+1
Move generator check earlier in inlining. Inlining into generator may create references to other generators. For instance, inlining `Pin::<&mut from_generator::GenFuture<[generator1]>>::new_unchecked` into `generator2`. This cross reference can then create cycles when computing inlining for `generator1`. In order to avoid this kind of surprises, we forbid all inlining into generators, and rely on LLVM to do the right thing. The existing `remove-zst-query-cycle` already ICEs in inline-mir mode, so we use it as test. Split from #91743.
2021-12-15Move generator check earlier in inlining.Camille GILLOT-1/+1
2021-12-14Return an error when `eval_rvalue_with_identities` failsTomasz Miąsko-0/+12
Previously some code paths would fail to evaluate the rvalue, while incorrectly indicating success with `Ok`. As a result the previous value of lhs could have been incorrectly const propagated.
2021-12-13use try_normalize_erasing_regions in RevealAllVisitorb-naber-0/+21