Commit Graph

8 Commits

Author SHA1 Message Date
Camille GILLOT
5d94d42485 Shrink span for bindings with subpatterns. 2022-09-06 20:57:44 +02:00
Nilstrieb
11c0280798 bless mir opt tests 2022-07-28 14:24:44 +02:00
Wesley Wiser
0a42dfc2fa Fix debugger stepping behavior around match expressions
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-25 15:17:22 -04:00
Roxane
2fb1fb7634 Fix diagnostic issue when using FakeReads in closures 2021-04-02 19:11:50 -04:00
mark
b9ecba30bc update tests 2021-03-19 19:45:42 -05:00
Dan Aloni
07e7823c01 pretty: trim paths of unique symbols
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-09-02 22:26:37 +03:00
Austin Lasher
28ac141b72 Update MIR tests with comment verbosity fix 2020-08-17 17:29:48 -04:00
Xavier Denis
f07607f47a Move mir-opt tests to toplevel 2020-07-29 17:36:03 +02:00