about summary refs log tree commit diff
path: root/src/test/mir-opt/simplify_arm.id.SimplifyArmIdentity.diff
AgeCommit message (Collapse)AuthorLines
2022-09-01Simplify MIR opt testsJakob Degen-46/+0
This commit removes many cases of MIR opt tests emitting `.diff`s for more than one pass. These tests cannot be `unit-test`s, and so they are easy to break, and they also provide little value due to having excessively strong opinions over *how* a piece of code should be optimized. Where reasonable, we instead add separate test files that only emit the `PreCodegen.after` MIR for code where we want to track what the result of the net result of the optimization pipeline's output is.
2022-07-28bless mir opt testsNilstrieb-23/+23
2022-04-11Fix tests broken by deaggregation changeJakob Degen-11/+11
2021-08-25Fix debugger stepping behavior around `match` expressionsWesley Wiser-4/+4
Previously, we would set up the source lines for `match` expressions so that the code generated to perform the test of the scrutinee was matched to the line of the arm that required the test and then jump from the arm block to the "next" block was matched to all of the lines in the `match` expression. While that makes sense, it has the side effect of causing strange stepping behavior in debuggers. I've changed the source information so that all of the generated tests are sourced to `match {scrutinee}` and the jumps are sourced to the last line of the block they are inside. This resolves the weird stepping behavior in all debuggers and resolves some instances of "ambiguous symbol" errors in WinDbg preventing the user from setting breakpoints at `match` expressions.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-1/+1
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-16Implement 'considered equal' for statements, so that for example `_0 = _1` ↵Simon Vandel Sillesen-9/+11
and `discriminant(_0) = discriminant(0)` are considered equal if 0 is a fieldless variant of an enum
2020-07-29Move mir-opt tests to toplevelXavier Denis-0/+44