<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_hir_analysis/src/structured_errors, branch 1.74.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.74.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.74.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-08-06T13:34:53+00:00</updated>
<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>
<entry>
<title>migrate `rustc_hir_analysis` to session diagnostic</title>
<updated>2023-03-04T21:01:55+00:00</updated>
<author>
<name>Obei Sideg</name>
<email>obei.sideg@gmail.com</email>
</author>
<published>2023-02-25T17:26:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=44eb974b235df8d5d5fa7daea1203f80918a9de7'/>
<id>urn:sha1:44eb974b235df8d5d5fa7daea1203f80918a9de7</id>
<content type='text'>
part two
files list:
rustc_hir_analysis/variance/*
rustc_hir_analysis/missing_cast_for_variadic_arg.rs
rustc_hir_analysis/sized_unsized_cast.rs
</content>
</entry>
<entry>
<title>diagnostics: remove inconsistent English article "this" from E0107</title>
<updated>2023-02-23T17:27:06+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2023-02-23T17:27:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a5b639dc012e735bd6888a1e513bd925a7e101ba'/>
<id>urn:sha1:a5b639dc012e735bd6888a1e513bd925a7e101ba</id>
<content type='text'>
Consider `tests/ui/const-generics/generic_const_exprs/issue-102768.stderr`,
the error message where it gives additional notes about where the associated
type is defined, and how the dead code lint doesn't have an article,
like in `tests/ui/lint/dead-code/issue-85255.stderr`. They don't have
articles, so it seems unnecessary to have one here.
</content>
</entry>
<entry>
<title>Auto merge of #108324 - notriddle:notriddle/assoc-fn-method, r=compiler-errors,davidtwco,estebank,oli-obk</title>
<updated>2023-02-23T00:19:12+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2023-02-23T00:19:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0978711950b77582e4f8f334f6e9848d48ab7790'/>
<id>urn:sha1:0978711950b77582e4f8f334f6e9848d48ab7790</id>
<content type='text'>
diagnostics: if AssocFn has self argument, describe as method

Discussed in https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.22associated.20function.22.20vs.20.22method.22/near/329265515

This commit also changes the tooltips on rustdoc intra-doc links targeting methods.

For anyone not sure why this is being done, see the Reference definitions of these terms in &lt;https://doc.rust-lang.org/1.67.1/reference/items/associated-items.html#methods&gt;

&gt; Associated functions whose first parameter is named `self` are called methods and may be invoked using the [method call operator](https://doc.rust-lang.org/1.67.1/reference/expressions/method-call-expr.html), for example, `x.foo()`, as well as the usual function call notation.

In particular, while this means it's technically correct for rustc to refer to a method as an associated function (and there are a few cases where it'll still do so), rustc *must never* use the term "method" to refer to an associated function that does not have a `self` parameter.
</content>
</entry>
<entry>
<title>Remove type-traversal trait aliases</title>
<updated>2023-02-22T17:04:58+00:00</updated>
<author>
<name>Alan Egerton</name>
<email>eggyal@gmail.com</email>
</author>
<published>2023-02-22T02:18:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=695072daa6cc04045f2aa79d751d884ad5263080'/>
<id>urn:sha1:695072daa6cc04045f2aa79d751d884ad5263080</id>
<content type='text'>
</content>
</entry>
</feed>
