about summary refs log tree commit diff
path: root/src/test/mir-opt/funky_arms.float_to_exponential_common.ConstProp.diff
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-146/+0
2022-12-09Remove unneeded field from `SwitchTargets`Jakob Degen-2/+2
2022-10-06Remove `mir::CastKind::Misc`ouz-a-1/+1
2022-09-26address reviewb-naber-4/+4
2022-09-26bless testsb-naber-2/+2
2022-09-23Always print '_, even for erased lifetimes.Camille GILLOT-9/+9
2022-07-28bless mir opt testsNilstrieb-89/+89
2022-07-09tweak names and output and blessRalf Jung-4/+4
2022-06-10Actually fixXavier Denis-22/+22
2022-06-10Revert "More minimal changes"Xavier Denis-8/+8
This reverts commit fe0dedcb06947317d41a8570b7fff7f8690dcbff.
2022-06-10More minimal changesXavier Denis-8/+8
2022-06-10Fix `SourceScope` for `if let` bindings.Xavier Denis-10/+10
2022-04-11Fix tests broken by deaggregation changeJakob Degen-0/+2
2022-02-22change `mir::Constant` in mir dumpslcnr-4/+4
2021-09-25Use larger span for adjustments on method callsAaron Hill-6/+6
Currently, we use a relatively 'small' span for THIR expressions generated by an 'adjustment' (e.g. an autoderef, autoborrow, unsizing). As a result, if a borrow generated by an adustment ends up causing a borrowcheck error, for example: ```rust let mut my_var = String::new(); let my_ref = &my_var my_var.push('a'); my_ref; ``` then the span for the mutable borrow may end up referring to only the base expression (e.g. `my_var`), rather than the method call which triggered the mutable borrow (e.g. `my_var.push('a')`) Due to a quirk of the MIR borrowck implementation, this doesn't always get exposed in migration mode, but it does in many cases. This commit makes THIR building consistently use 'larger' spans for adjustment expressions The intent of this change it make it clearer to users when it's the specific way in which a variable is used (for example, in a method call) that produdes a borrowcheck error. For example, an error message claiming that a 'mutable borrow occurs here' might be confusing if it just points at a usage of a variable (e.g. `my_var`), when no `&mut` is in sight. Pointing at the entire expression should help to emphasize that the method call itself is responsible for the mutable borrow. In several cases, this makes the `#![feature(nll)]` diagnostic output match up exactly with the default (migration mode) output. As a result, several `.nll.stderr` files end up getting removed entirely.
2021-09-01Fix drop handling for `if let` expressionsMatthew Jasper-19/+19
MIR lowering for `if let` expressions is now more complicated now that `if let` exists in HIR. This PR adds a scope for the variables bound in an `if let` expression and then uses an approach similar to how we handle loops to ensure that we reliably drop the correct variables.
2021-08-25Fix debugger stepping behavior around `match` expressionsWesley Wiser-3/+3
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.
2021-08-15Introduce hir::ExprKind::Let - Take 2Caio-23/+23
2021-03-22Preserve signed zero on roundtripJubilee Young-1/+1
This commit removes the previous mechanism of differentiating between "Debug" and "Display" formattings for the sign of -0 so as to comply with the IEEE 754 standard's requirements on external character sequences preserving various attributes of a floating point representation. In addition, numerous tests are fixed.
2021-02-06path trimming: ignore type aliasesDan Aloni-1/+1
2020-09-02pretty: trim paths of unique symbolsDan Aloni-3/+3
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-21Suppress "const" prefix of FnDef in MIR dumpLzu Tao-4/+4
2020-08-20Suppress MIR comments for FnDef in ty::ConstLzu Tao-12/+0
2020-08-17Update MIR tests with comment verbosity fixAustin Lasher-6/+0
2020-08-11move Deaggregate pass to post_borrowck_cleanupRalf Jung-0/+162