<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_ssa/src/debuginfo, branch 1.72.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.72.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.72.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-06-01T14:45:18+00:00</updated>
<entry>
<title>Use translatable diagnostics in `rustc_const_eval`</title>
<updated>2023-06-01T14:45:18+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2023-05-17T10:30:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4f83717cf768adb0b0dfe23b8eecf2b259eec354'/>
<id>urn:sha1:4f83717cf768adb0b0dfe23b8eecf2b259eec354</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restrict `From&lt;S&gt;` for `{D,Subd}iagnosticMessage`.</title>
<updated>2023-05-02T22:44:39+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-04-20T03:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6b62f37402cb2990c7d350379238579af0360b10'/>
<id>urn:sha1:6b62f37402cb2990c7d350379238579af0360b10</id>
<content type='text'>
Currently a `{D,Subd}iagnosticMessage` can be created from any type that
impls `Into&lt;String&gt;`. That includes `&amp;str`, `String`, and `Cow&lt;'static,
str&gt;`, which are reasonable. It also includes `&amp;String`, which is pretty
weird, and results in many places making unnecessary allocations for
patterns like this:
```
self.fatal(&amp;format!(...))
```
This creates a string with `format!`, takes a reference, passes the
reference to `fatal`, which does an `into()`, which clones the
reference, doing a second allocation. Two allocations for a single
string, bleh.

This commit changes the `From` impls so that you can only create a
`{D,Subd}iagnosticMessage` from `&amp;str`, `String`, or `Cow&lt;'static,
str&gt;`. This requires changing all the places that currently create one
from a `&amp;String`. Most of these are of the `&amp;format!(...)` form
described above; each one removes an unnecessary static `&amp;`, plus an
allocation when executed. There are also a few places where the existing
use of `&amp;String` was more reasonable; these now just use `clone()` at
the call site.

As well as making the code nicer and more efficient, this is a step
towards possibly using `Cow&lt;'static, str&gt;` in
`{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing
the `From&lt;&amp;'a str&gt;` impls to `From&lt;&amp;'static str&gt;`, which is doable, but
I'm not yet sure if it's worthwhile.
</content>
</entry>
<entry>
<title>Store hashes in special types so they aren't accidentally encoded as numbers</title>
<updated>2023-04-18T14:52:47+00:00</updated>
<author>
<name>Ben Kimock</name>
<email>kimockb@gmail.com</email>
</author>
<published>2023-04-08T03:11:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0445fbdd835c92156e4d06e42ce99a39e9315343'/>
<id>urn:sha1:0445fbdd835c92156e4d06e42ce99a39e9315343</id>
<content type='text'>
</content>
</entry>
<entry>
<title>s/eval_usize/eval_target_usize/ for clarity</title>
<updated>2023-02-14T08:51:19+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2023-02-14T08:51:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=936bf29d4cec40c328930daf83277d7e77cc9602'/>
<id>urn:sha1:936bf29d4cec40c328930daf83277d7e77cc9602</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce GeneratorWitnessMIR.</title>
<updated>2023-01-27T18:58:44+00:00</updated>
<author>
<name>Camille GILLOT</name>
<email>gillot.camille@gmail.com</email>
</author>
<published>2022-10-01T12:56:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1974b6b68dc168cac046039ce404c8311c4d8765'/>
<id>urn:sha1:1974b6b68dc168cac046039ce404c8311c4d8765</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ADD - fixme in type_names.rs until we are able to translate InterpError</title>
<updated>2022-12-28T01:59:21+00:00</updated>
<author>
<name>Jhonny Bill Mena</name>
<email>jhonnybillm@gmail.com</email>
</author>
<published>2022-11-06T03:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=78796ba637d9c8b575e977ddfc9351e4f1626319'/>
<id>urn:sha1:78796ba637d9c8b575e977ddfc9351e4f1626319</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix more clippy::style findings</title>
<updated>2022-12-25T16:32:26+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2022-12-25T15:42:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d8874f259a00025e65439cd388f2465e412232d0'/>
<id>urn:sha1:d8874f259a00025e65439cd388f2465e412232d0</id>
<content type='text'>
match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed
</content>
</entry>
<entry>
<title>rustc: Remove needless lifetimes</title>
<updated>2022-12-20T21:10:40+00:00</updated>
<author>
<name>Jeremy Stucki</name>
<email>dev@jeremystucki.ch</email>
</author>
<published>2022-12-20T21:10:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3dde32ca974721daa4dfd526226d6c9e707fd8af'/>
<id>urn:sha1:3dde32ca974721daa4dfd526226d6c9e707fd8af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Combine identical alias arms</title>
<updated>2022-12-13T17:48:55+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2022-11-27T17:52:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=96cb18e864eb31f164fdfee5cb011d3576415b5d'/>
<id>urn:sha1:96cb18e864eb31f164fdfee5cb011d3576415b5d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Combine projection and opaque into alias</title>
<updated>2022-12-13T17:48:55+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2022-11-26T21:51:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=61adaf81873101587ffff4e1b8671acbc33d3df1'/>
<id>urn:sha1:61adaf81873101587ffff4e1b8671acbc33d3df1</id>
<content type='text'>
</content>
</entry>
</feed>
