<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustdoc/theme.rs, branch lcnr/rustc-dev-guide</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-11-28T02:05:43+00:00</updated>
<entry>
<title>Fix new clippy lints</title>
<updated>2024-11-28T02:05:43+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2024-11-27T14:44:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f0c301ffe47470caf3f809ee8fc0119e4cb49317'/>
<id>urn:sha1:f0c301ffe47470caf3f809ee8fc0119e4cb49317</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Handle `librustdoc` cases of `rustc::potential_query_instability` lint</title>
<updated>2024-10-06T07:39:03+00:00</updated>
<author>
<name>ismailarilik</name>
<email>arilik.ismail@gmail.com</email>
</author>
<published>2024-10-06T07:39:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e0a20b484d0b88183ddd46b82aa47d7bbfe48468'/>
<id>urn:sha1:e0a20b484d0b88183ddd46b82aa47d7bbfe48468</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reformat `use` declarations.</title>
<updated>2024-07-28T22:26:52+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-07-28T22:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84ac80f1921afc243d71fd0caaa4f2838c294102'/>
<id>urn:sha1:84ac80f1921afc243d71fd0caaa4f2838c294102</id>
<content type='text'>
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
</content>
</entry>
<entry>
<title>Use a dedicated type instead of a reference for the diagnostic context</title>
<updated>2024-06-18T15:42:11+00:00</updated>
<author>
<name>Oli Scherer</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2024-06-18T10:35:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186'/>
<id>urn:sha1:7ba82d61eb519c9c8cb8c47a3030a2bd2faaa186</id>
<content type='text'>
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
</content>
</entry>
<entry>
<title>Shorten some error invocations.</title>
<updated>2024-01-09T20:33:06+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-03T23:38:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ff40ad410753d152442192cb01562fe00bf63fe3'/>
<id>urn:sha1:ff40ad410753d152442192cb01562fe00bf63fe3</id>
<content type='text'>
- `struct_foo` + `emit` -&gt; `foo`
- `create_foo` + `emit` -&gt; `emit_foo`

I have made recent commits in other PRs that have removed some of these
shortcuts for combinations with few uses, e.g.
`struct_span_err_with_code`. But for the remaining combinations that
have high levels of use, we might as well use them wherever possible.
</content>
</entry>
<entry>
<title>Rename many `DiagCtxt` arguments.</title>
<updated>2023-12-18T05:06:22+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-17T23:15:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f422dca3ae8b8a8c9a99b8e6ec0899e08dc072c3'/>
<id>urn:sha1:f422dca3ae8b8a8c9a99b8e6ec0899e08dc072c3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename `Handler` as `DiagCtxt`.</title>
<updated>2023-12-18T05:06:19+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-17T10:48:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cde19c016e4608288a02f5bdec0b5330d474c26f'/>
<id>urn:sha1:cde19c016e4608288a02f5bdec0b5330d474c26f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustdoc: merge theme css into rustdoc.css</title>
<updated>2023-09-15T14:40:17+00:00</updated>
<author>
<name>Michael Howell</name>
<email>michael@notriddle.com</email>
</author>
<published>2023-09-13T22:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7e86fd61e83717fc23b6141d2ba728aefbe5e168'/>
<id>urn:sha1:7e86fd61e83717fc23b6141d2ba728aefbe5e168</id>
<content type='text'>
Based on
https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119

Having them in separate files used to make more sense, before the
migration to CSS variables made the theme files as small as they are
nowadays. This is already how docs.rs and mdBook do it.
</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>Correctly handle parens</title>
<updated>2022-09-15T11:53:20+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume.gomez@huawei.com</email>
</author>
<published>2022-09-15T11:53:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d3529ceb6c5eeaaecd3d88e97ad17740258772a8'/>
<id>urn:sha1:d3529ceb6c5eeaaecd3d88e97ad17740258772a8</id>
<content type='text'>
</content>
</entry>
</feed>
