<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/codegen/generator-debug.rs, branch 1.59.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.59.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.59.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-06-30T18:10:29+00:00</updated>
<entry>
<title>Improve debug symbol names to avoid ambiguity and work better with MSVC's debugger</title>
<updated>2021-06-30T18:10:29+00:00</updated>
<author>
<name>Daniel Paoliello</name>
<email>danpao@microsoft.com</email>
</author>
<published>2021-06-24T17:36:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=aac8a885520854e4b60ea5733b8b06f9e0cc1fcc'/>
<id>urn:sha1:aac8a885520854e4b60ea5733b8b06f9e0cc1fcc</id>
<content type='text'>
There are several cases where names of types and functions in the debug info are either ambiguous, or not helpful, such as including ambiguous placeholders (e.g., `{{impl}}`, `{{closure}}` or `dyn _'`) or dropping qualifications (e.g., for dynamic types).

Instead, each debug symbol name should be unique and useful:
* Include disambiguators for anonymous `DefPathDataName` (closures and generators), and unify their formatting when used as a path-qualifier vs item being qualified.
* Qualify the principal trait for dynamic types.
* If there is no principal trait for a dynamic type, emit all other traits instead.
* Respect the `qualified` argument when emitting ref and pointer types.
* For implementations, emit the disambiguator.
* Print const generics when emitting generic parameters or arguments.

Additionally, when targeting MSVC, its debugger treats many command arguments as C++ expressions, even when the argument is defined to be a symbol name. As such names in the debug info need to be more C++-like to be parsed correctly:
* Avoid characters with special meaning (`#`, `[`, `"`, `+`).
* Never start a name with `&lt;` or `{` as this is treated as an operator.
* `&gt;&gt;` is always treated as a right-shift, even when parsing generic arguments (so add a space to avoid this).
* Emit function declarations using C/C++ style syntax (e.g., leading return type).
* Emit arrays as a synthetic `array$&lt;type, size&gt;` type.
* Include a `$` in all synthetic types as this is a legal character for C++, but not Rust (thus we avoid collisions with user types).
</content>
</entry>
<entry>
<title>Remove artificial flag from generator variants</title>
<updated>2021-04-30T14:36:08+00:00</updated>
<author>
<name>lrh2000</name>
<email>lrh2000@pku.edu.cn</email>
</author>
<published>2021-04-30T12:02:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5bf989ece9e29941f2c517a39289a60bfb8595c0'/>
<id>urn:sha1:5bf989ece9e29941f2c517a39289a60bfb8595c0</id>
<content type='text'>
 - Literally, variants are not artificial. We have `yield` statements,
   upvars and inner variables in the source code.
 - Functionally, we don't want debuggers to suppress the variants. It
   contains the state of the generator, which is useful when debugging.
   So they shouldn't be marked artificial.
 - Debuggers may use artificial flags to find the active variant. In
   this case, marking variants artificial will make debuggers not work
   properly.

Fixes #79009.
</content>
</entry>
<entry>
<title>Remove redundant `ignore-tidy-linelength` annotations</title>
<updated>2021-04-03T20:30:20+00:00</updated>
<author>
<name>Simon Jakobi</name>
<email>simon.jakobi@gmail.com</email>
</author>
<published>2021-04-03T11:05:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3ea62cb5d19846b44172d861ae231c8c09322800'/>
<id>urn:sha1:3ea62cb5d19846b44172d861ae231c8c09322800</id>
<content type='text'>
This is step 2 towards fixing #77548.

In the codegen and codegen-units test suites, the `//` comment markers
were kept in order not to affect any source locations. This is because
these tests cannot be automatically `--bless`ed.
</content>
</entry>
<entry>
<title>Split out async fn and generator test</title>
<updated>2020-06-24T22:08:59+00:00</updated>
<author>
<name>Tyler Mandry</name>
<email>tmandry@gmail.com</email>
</author>
<published>2020-06-24T21:17:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=887fbd9d3411ea7def2cc7a508d74bea6b7f19bb'/>
<id>urn:sha1:887fbd9d3411ea7def2cc7a508d74bea6b7f19bb</id>
<content type='text'>
This keeps FileCheck from tripping over unimportant differences in
codegen.
</content>
</entry>
<entry>
<title>Give up on checking filename</title>
<updated>2020-06-24T22:08:59+00:00</updated>
<author>
<name>Tyler Mandry</name>
<email>tmandry@gmail.com</email>
</author>
<published>2020-06-24T03:19:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fe3df646fe415123d0a6bd09df698dc69074263a'/>
<id>urn:sha1:fe3df646fe415123d0a6bd09df698dc69074263a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Generalize generator-debug test a bit</title>
<updated>2020-06-24T21:53:30+00:00</updated>
<author>
<name>Tyler Mandry</name>
<email>tmandry@gmail.com</email>
</author>
<published>2020-06-23T23:21:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=477ecc51caea03c22eb6c7dedcf5656593b71fb0'/>
<id>urn:sha1:477ecc51caea03c22eb6c7dedcf5656593b71fb0</id>
<content type='text'>
Don't be so reliant on particular line ordering (though FileCheck makes
this hard in general, IMO). Also disable for MSVC.
</content>
</entry>
<entry>
<title>Add test for generator debuginfo</title>
<updated>2020-06-24T21:53:29+00:00</updated>
<author>
<name>Tyler Mandry</name>
<email>tmandry@gmail.com</email>
</author>
<published>2020-06-18T23:17:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=367858aedc1e1dbee5560676c00618a386ed8e37'/>
<id>urn:sha1:367858aedc1e1dbee5560676c00618a386ed8e37</id>
<content type='text'>
</content>
</entry>
</feed>
