<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_ty_utils/src/needs_drop.rs, branch 1.73.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.73.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.73.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-09-16T21:54:55+00:00</updated>
<entry>
<title>Don't require `Drop` for `[PhantomData&lt;T&gt;; N]` where `N` and `T` are generic, if `T` requires `Drop`</title>
<updated>2023-09-16T21:54:55+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2023-09-04T08:54:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9a545c58b456e187e8e0aa8fd1ab6dd16620dcda'/>
<id>urn:sha1:9a545c58b456e187e8e0aa8fd1ab6dd16620dcda</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use upvar_tys in more places, make it a list</title>
<updated>2023-08-01T23:19:31+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-07-25T23:31:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=99969d282bd853442d7539b83833816b73e642e1'/>
<id>urn:sha1:99969d282bd853442d7539b83833816b73e642e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>inline format!() args from rustc_codegen_llvm to the end (4)</title>
<updated>2023-07-25T21:20:28+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2023-07-25T21:17:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c64ef5e070ee7ae7fb73de2bec06fb7498a9af83'/>
<id>urn:sha1:c64ef5e070ee7ae7fb73de2bec06fb7498a9af83</id>
<content type='text'>
r? @WaffleLapkin
</content>
</entry>
<entry>
<title>some additional refactor</title>
<updated>2023-07-18T13:50:34+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2023-07-18T13:50:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d1b4b458c0584f80cf8c202110d2e3846b2abe58'/>
<id>urn:sha1:d1b4b458c0584f80cf8c202110d2e3846b2abe58</id>
<content type='text'>
also, treat placeholders equal to params
</content>
</entry>
<entry>
<title>exhaustive matches are good</title>
<updated>2023-07-17T13:12:21+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2023-07-17T13:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8a0802089cf057826e057476c2ad184091d88e22'/>
<id>urn:sha1:8a0802089cf057826e057476c2ad184091d88e22</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor(rustc_middle): Substs -&gt; GenericArg</title>
<updated>2023-07-14T12:27:35+00:00</updated>
<author>
<name>Mahdi Dibaiee</name>
<email>mdibaiee@pm.me</email>
</author>
<published>2023-07-11T21:35:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e55583c4b831c601452117a8eb20af59779ef582'/>
<id>urn:sha1:e55583c4b831c601452117a8eb20af59779ef582</id>
<content type='text'>
</content>
</entry>
<entry>
<title>EarlyBinder::new -&gt; EarlyBinder::bind</title>
<updated>2023-05-29T11:46:10+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2023-05-29T11:46:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=08d149ca85b1afe0c554310bd203bd9d1a3f8bb2'/>
<id>urn:sha1:08d149ca85b1afe0c554310bd203bd9d1a3f8bb2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace EarlyBinder(x) with EarlyBinder::new(x)</title>
<updated>2023-05-28T16:44:50+00:00</updated>
<author>
<name>Kyle Matsuda</name>
<email>kyle.yoshio.matsuda@gmail.com</email>
</author>
<published>2023-05-26T17:19:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=03534ac8b70de1134ce7e91b172cd629048a6c8b'/>
<id>urn:sha1:03534ac8b70de1134ce7e91b172cd629048a6c8b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move expansion of query macros in rustc_middle to rustc_middle::query</title>
<updated>2023-05-15T06:49:13+00:00</updated>
<author>
<name>John Kåre Alsaker</name>
<email>john.kare.alsaker@gmail.com</email>
</author>
<published>2023-05-15T04:24:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fff20a703db364d8b91c14cef4779f5e632df191'/>
<id>urn:sha1:fff20a703db364d8b91c14cef4779f5e632df191</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>
</feed>
