summary refs log tree commit diff
path: root/src/test/ui/mir
AgeCommit message (Collapse)AuthorLines
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
2021-12-09Add needs-unwind to tests that depend on panickingDavid Koloski-0/+4
This directive isn't automatically set by compiletest or x.py, but can be turned on manually for targets that require it.
2021-11-24Remove `-Z force-overflow-checks`Noah Lev-1/+1
It was replaced several years ago by the stable option `-C overflow-checks`. The goal was to delete the `-Z` flag once users had migrated [1]. Now that it's been several years, it makes sense to delete the old flag. See also the discussion on Zulip [2]. [1]: https://github.com/rust-lang/rust/issues/33134#issuecomment-280484097 [2]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/overflow.20checks/near/262497224
2021-11-18Move some tests to more reasonable directoriesCaio-0/+30
2021-11-06Move some tests to more reasonable directoriesCaio-0/+14
2021-10-03Fix unsound optimization with explicit variant discriminantsFabian Wolff-0/+18
2021-09-15Disable RemoveZsts in generators to avoid query cyclesTomasz Miąsko-0/+16
Querying layout of a generator requires its optimized MIR. Thus computing layout during MIR optimization of a generator might create a query cycle. Disable RemoveZsts in generators to avoid the issue (similar approach is used in ConstProp transform already).
2021-08-30`feature(const_generics)` -> `feature(const_param_types)`lcnr-116/+0
2021-08-30rename const_evaluatable_checked to generic_const_exprsEllen-1/+1
:sparkles:
2021-08-16Use note to point at bound introducing requirementEsteban Küber-3/+5
2021-08-11Modify structured suggestion outputEsteban Küber-1/+1
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-08-04Remove trailing whitespace from error messagesFabian Wolff-3/+3
2021-07-27Remove min_tait and full_tait stderr dangling filesSantiago Pastorino-16/+0
2021-07-27Make all tests use type_alias_impl_trait feature instead of minSantiago Pastorino-3/+9
2021-07-27Use type_alias_impl_trait instead of min in compiler and libSantiago Pastorino-13/+3
2021-07-18Remove impl_trait_in_bindings feature flagSantiago Pastorino-39/+15
2021-06-09Handle C-variadic arguments properly when reporting region errorsFabian Wolff-2/+2
2021-05-28const eval errors: display the current item instance if there are generics ↵Rémy Rakic-2/+2
involved
2021-04-01Add a test that triggers the out-of-bounds ICE.Midas Lambrichts-0/+31
Add a test that has the right input to trigger an out-of-bounds error when in MIR the local_decls and the normalized_input_tys don't match in amount.
2021-03-18Rollup merge of #83080 - tmiasko:inline-coverage, r=wesleywiserDylan DPC-23/+0
Make source-based code coverage compatible with MIR inlining When codegenning code coverage use the instance that coverage data was originally generated for, to ensure basic level of compatibility with MIR inlining. Fixes #83061
2021-03-17Rollup merge of #83092 - petrochenkov:qspan, r=estebankYuki Okushi-1/+1
More precise spans for HIR paths `Ty::assoc_item` is lowered to `<Ty>::assoc_item` in HIR, but `Ty` got span from the whole path. This PR fixes that, and adjusts some diagnostic code that relied on `Ty` having the whole path span. This is a pre-requisite for https://github.com/rust-lang/rust/pull/82868 (we cannot report suggestions like `Tr::assoc` -> `<dyn Tr>::assoc` with the current imprecise spans). r? ````@estebank````
2021-03-15Remove inline-instrument-coverage-fail.rs test caseTomasz Miąsko-23/+0
2021-03-15More precise spans for HIR pathsVadim Petrochenkov-1/+1
2021-03-15🍼 for tidyOli Scherer-2/+3
2021-03-15Only allow tait defining uses in function and method return positionOli Scherer-11/+18
2021-03-15Add a test showing how `impl_trait_in_bindings` is a breaking changeOli Scherer-2/+58
2021-03-15Replace `type_alias_impl_trait` by `min_type_alias_impl_trait` with no ↵Oli Scherer-1/+1
actual changes in behaviour This makes `type_alias_impl_trait` not actually do anything anymore
2021-03-05bless mir-inlining warning messageSantiago Pastorino-1/+1
2021-03-05Bump mir-opt-level from 2 to 3 in testsSantiago Pastorino-23/+23
2021-03-05Bump mir-opt-level from 3 to 4 in testsSantiago Pastorino-3/+3
2021-02-04regression test for issue 80949.Felix S. Klock II-0/+34
2021-02-03Allow/fix non_fmt_panic in tests.Mara Bos-1/+1
2021-01-26Avoid describing a method as 'not found' when bounds are unsatisfiedAaron Hill-3/+3
Fixes #76267 When there is a single applicable method candidate, but its trait bounds are not satisfied, we avoid saying that the method is "not found". Insted, we update the error message to directly mention which bounds are not satisfied, rather than mentioning them in a note.
2021-01-21mir: Improve size_of handling when arg is unsizedÖmer Sinan Ağacan-3/+31
2021-01-19Fix ICE in mir when evaluating SizeOf on unsized typeÖmer Sinan Ağacan-0/+75
Fixes #80742
2021-01-17Auto merge of #80942 - c410-f3r:tests-tests-tests, r=petrochenkovbors-0/+20
Move some tests to more reasonable directories - 2 All tests with a score equal or greater than 1.0 were moved to their respective directories by issuing ```bash cat FILE | tr -s " " | tr -d '():' | sort -k3 | awk '$3 >= 1' | cut -d " " -f1-2 | sed 's;\\;/;g' | xargs -n2 git mv ``` **Observation**: The first column values is the only column with results greater zero To attest the confidentiality of the model, some manual revision of at least of tests is needed and this process will be tracked in the following list: * `src/test/ui/abi/issue-28676.rs` OK #28676 * `src/test/ui/array-slice-vec/issue-15730.rs` OK * `src/test/ui/associated-types/issue-24338.rs` OK #54823 * `src/test/ui/associated-types/issue-48551.rs` Looks OK #48551 * `src/test/ui/associated-types/issue-50301.rs` Looks OK #63577 ... cc #73494 r? `@petrochenkov`
2021-01-16Move some tests to more reasonable directories - 2Caio-0/+20
Address comments Update limits