<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs, branch 1.55.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.55.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.55.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>Use () for entry_fn.</title>
<updated>2021-05-12T11:58:42+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2021-05-11T10:00:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=829a9d33a9f08ecdf52f95b07da5e355c3d3966d'/>
<id>urn:sha1:829a9d33a9f08ecdf52f95b07da5e355c3d3966d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement RFC 1260 with feature_name `imported_main`.</title>
<updated>2021-04-29T00:35:08+00:00</updated>
<author>
<name>Charles Lew</name>
<email>crlf0710@gmail.com</email>
</author>
<published>2021-04-25T17:09:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d261df4a72e60e8baa0f21b67eba8f7b91cc2135'/>
<id>urn:sha1:d261df4a72e60e8baa0f21b67eba8f7b91cc2135</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use iter::zip in compiler/</title>
<updated>2021-03-26T16:32:31+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2021-03-08T23:32:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=72ebebe474aae7203a27fdc1296617edd01321f1'/>
<id>urn:sha1:72ebebe474aae7203a27fdc1296617edd01321f1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move debuginfo docs from `doc.rs` module to `doc.md` file</title>
<updated>2021-03-20T21:38:49+00:00</updated>
<author>
<name>Camelid</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-03-20T21:23:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a2e9374048f1c04f025469dde88e13a5037d8db7'/>
<id>urn:sha1:a2e9374048f1c04f025469dde88e13a5037d8db7</id>
<content type='text'>
And use `#[doc = include_str!("doc.md")]` in `mod.rs` so the docs are
rendered as if they were inline in the root module.
</content>
</entry>
<entry>
<title>Auto merge of #82285 - nhwn:nonzero-debug, r=nagisa</title>
<updated>2021-03-07T20:23:23+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-03-07T20:23:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=234781afe33d3f339b002f85f948046d8476cfc9'/>
<id>urn:sha1:234781afe33d3f339b002f85f948046d8476cfc9</id>
<content type='text'>
Use u32 over Option&lt;u32&gt; in DebugLoc

~~Changes `Option&lt;u32&gt;` fields in `DebugLoc` to `Option&lt;NonZeroU32&gt;`. Since the respective fields (`line` and `col`) are guaranteed to be 1-based, this layout optimization is a freebie.~~

EDIT: Changes `Option&lt;u32&gt;` fields in `DebugLoc` to `u32`. As `@bugadani` pointed out, an `Option&lt;NonZeroU32&gt;` is probably an unnecessary layer of abstraction since the `None` variant is always used as `UNKNOWN_LINE_NUMBER` (which is just `0`).  Also, `SourceInfo` in `metadata.rs` already uses a `u32` instead of an `Option&lt;u32&gt;` to encode the same information, so I think this change is warranted.

Since `@jyn514` raised some concerns over measuring performance in a similar PR (#82255), does this need a perf run?
</content>
</entry>
<entry>
<title>fix review</title>
<updated>2021-02-25T01:21:12+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2021-02-25T01:13:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=08b1e8004b06112fb8334155b2cea314bd3e8161'/>
<id>urn:sha1:08b1e8004b06112fb8334155b2cea314bd3e8161</id>
<content type='text'>
</content>
</entry>
<entry>
<title>replaced some map_or with map_or_else</title>
<updated>2021-02-23T23:43:35+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2021-02-23T22:02:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c75c4a579bdea69fc9b93697aa2531daf82540fc'/>
<id>urn:sha1:c75c4a579bdea69fc9b93697aa2531daf82540fc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nhwn: use plain u32 in DebugLoc</title>
<updated>2021-02-20T17:46:58+00:00</updated>
<author>
<name>Nathan Nguyen</name>
<email>nathan.tm.nguyen@gmail.com</email>
</author>
<published>2021-02-19T20:50:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=408d4027d0c469be4ab442b8d0223565cdb09229'/>
<id>urn:sha1:408d4027d0c469be4ab442b8d0223565cdb09229</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nhwn: use Option&lt;NonZeroU32&gt; in DebugLoc</title>
<updated>2021-02-20T17:46:50+00:00</updated>
<author>
<name>Nathan Nguyen</name>
<email>nathan.tm.nguyen@gmail.com</email>
</author>
<published>2021-02-19T05:18:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f5aa1bceb92ce2207a2f3db07c3fe892fa196086'/>
<id>urn:sha1:f5aa1bceb92ce2207a2f3db07c3fe892fa196086</id>
<content type='text'>
</content>
</entry>
</feed>
