<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_hir_analysis/src/structured_errors, branch 1.76.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.76.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.76.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-12-12T14:40:29+00:00</updated>
<entry>
<title>Move some methods from `tcx.hir()` to `tcx`</title>
<updated>2023-12-12T14:40:29+00:00</updated>
<author>
<name>zetanumbers</name>
<email>dariasukhonina@gmail.com</email>
</author>
<published>2023-12-01T13:28:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=24f009c5e55d18c12563dd74681ca33b8a349936'/>
<id>urn:sha1:24f009c5e55d18c12563dd74681ca33b8a349936</id>
<content type='text'>
Renamings:
- find -&gt; opt_hir_node
- get -&gt; hir_node
- find_by_def_id -&gt; opt_hir_node_by_def_id
- get_by_def_id -&gt; hir_node_by_def_id

Fix rebase changes using removed methods

Use `tcx.hir_node_by_def_id()` whenever possible in compiler

Fix clippy errors

Fix compiler

Apply suggestions from code review

Co-authored-by: Vadim Petrochenkov &lt;vadim.petrochenkov@gmail.com&gt;

Add FIXME for `tcx.hir()` returned type about its removal

Simplify with with `tcx.hir_node_by_def_id`
</content>
</entry>
<entry>
<title>Rollup merge of #116553 - gurry:116464-assoc-type-invalid-suggestion, r=compiler-errors</title>
<updated>2023-10-25T21:37:09+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2023-10-25T21:37:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=824dbb53fbdea5dc3eec644f775de5ec125c7fba'/>
<id>urn:sha1:824dbb53fbdea5dc3eec644f775de5ec125c7fba</id>
<content type='text'>
Do not suggest 'Trait&lt;Assoc=arg&gt;' when in trait impl

Fixes #116464

We now skip the suggestion if we're in an impl of the trait.
</content>
</entry>
<entry>
<title>Do not suggest 'Trait&lt;Assoc=arg&gt;' when in trait impl</title>
<updated>2023-10-25T03:41:16+00:00</updated>
<author>
<name>Gurinder Singh</name>
<email>frederick.the.fool@gmail.com</email>
</author>
<published>2023-10-25T03:41:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=079b29043976afd44cf49eec74486bf2fc15973d'/>
<id>urn:sha1:079b29043976afd44cf49eec74486bf2fc15973d</id>
<content type='text'>
because that would be illegal syntax
</content>
</entry>
<entry>
<title>Format all the let chains in compiler</title>
<updated>2023-10-13T08:59:36+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-10-13T08:58:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b2d2184edea578109a48ec3d8decbee5948e8f35'/>
<id>urn:sha1:b2d2184edea578109a48ec3d8decbee5948e8f35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lower impl const to bind to host effect param</title>
<updated>2023-08-06T13:34:53+00:00</updated>
<author>
<name>Deadbeef</name>
<email>ent3rm4n@gmail.com</email>
</author>
<published>2023-07-25T05:58:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=92f4c59e4847005752a358ccacb5ae264700fbc4'/>
<id>urn:sha1:92f4c59e4847005752a358ccacb5ae264700fbc4</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>Re-format let-else per rustfmt update</title>
<updated>2023-07-13T01:49:27+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2023-07-13T01:49:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cc907f80b95c6ec530c5ee1b05b044a468f07eca'/>
<id>urn:sha1:cc907f80b95c6ec530c5ee1b05b044a468f07eca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use `Option::is_some_and` and `Result::is_ok_and` in the compiler</title>
<updated>2023-05-24T14:20:41+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2023-05-24T14:19:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fb0f74a8c9e8b8f488ec5894d5d314caebf4c662'/>
<id>urn:sha1:fb0f74a8c9e8b8f488ec5894d5d314caebf4c662</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>Add `(..)` syntax for RTN</title>
<updated>2023-03-28T01:14:28+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2023-03-16T22:00:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8b592db27afdc9edac084520bca98508da53c996'/>
<id>urn:sha1:8b592db27afdc9edac084520bca98508da53c996</id>
<content type='text'>
</content>
</entry>
</feed>
